/
/
/
1###############################################################################
2# ______ #
3# / _____) #
4# ( (____ ____ _____ ____ ___ _____ ____ _ _ _____ ____ #
5# \____ \ | _ \ (____ || _ \ /___)| ___ | / ___)| | | || ___ | / ___) #
6# _____) )| | | |/ ___ || |_| ||___ || ____|| | \ V / | ____|| | #
7# (______/ |_| |_|\_____|| __/ (___/ |_____)|_| \_/ |_____)|_| #
8# |_| #
9# #
10# Snapserver config file #
11# #
12###############################################################################
13
14# default values are commented
15# uncomment and edit to change them
16
17# Settings can be overwritten on command line with:
18# "--<section>.<name>=<value>", e.g. --server.threads=4
19
20
21# General server settings #####################################################
22#
23[server]
24# Number of additional worker threads to use
25# - For values < 0 the number of threads will be 2 (on single and dual cores)
26# or 4 (for quad and more cores)
27# - 0 will utilize just the processes main thread and might cause audio drops
28# in case there are a couple of longer running tasks, such as encoding
29# multiple audio streams
30#threads = -1
31
32# the pid file when running as daemon (-d or --daemon)
33#pidfile = /var/run/snapserver/pid
34
35# the user to run as when daemonized (-d or --daemon)
36#user = snapserver
37# the group to run as when daemonized (-d or --daemon)
38#group = snapserver
39
40# directory where persistent data is stored (server.json)
41# if empty, data dir will be
42# - "/var/lib/snapserver/" when running as daemon
43# - "$HOME/.config/snapserver/" when not running as daemon
44#datadir =
45
46# enable mDNS to publish services
47#mdns_enabled = true
48#
49###############################################################################
50
51
52# Secure Socket Layer #########################################################
53#
54[ssl]
55# Certificate files are either specified by their full or relative path. Certificates with
56# relative path are searched for in the current path and in "/etc/snapserver/certs"
57
58# Certificate file in PEM format
59#certificate =
60
61# Private key file in PEM format
62#certificate_key =
63
64# Password for decryption of the certificate_key (only needed for encrypted certificate_key file)
65#key_password =
66
67# Verify client certificates
68#verify_clients = false
69
70# List of client CA certificate files, can be configured multiple times
71#client_cert =
72#client_cert =
73#
74###############################################################################
75
76
77# HTTP RPC ####################################################################
78#
79[http]
80# enable HTTP Control and streaming (HTTP POST and websockets)
81#enabled = true
82
83# address to listen on, can be specified multiple times
84# use "0.0.0.0" to bind to any IPv4 address or :: to bind to any IPv6 address
85# or "127.0.0.1" or "::1" to bind to localhost IPv4 or IPv6, respectively
86# use the address of a specific network interface to just listen on and accept
87# connections from that interface
88#bind_to_address = ::
89
90# which port the server should listen on
91#port = 1780
92
93# Publish HTTP service via mDNS as '_snapcast-http._tcp'
94#publish_http = true
95
96# enable HTTPS Json RPC (HTTPS POST and ssl websockets)
97#ssl_enabled = false
98
99# same as 'bind_to_address' but for SSL
100#ssl_bind_to_address = ::
101
102# same as 'port' but for SSL
103#ssl_port = 1788
104
105# Publish HTTPS service via mDNS as '_snapcast-https._tcp'
106#publish_https = true
107
108# serve a website from the doc_root location
109# disabled if commented or empty
110# doc_root = /usr/share/snapserver/snapweb
111
112# Hostname or IP under which clients can reach this host
113# used to serve cached cover art
114# use <hostname> as placeholder for your actual host name
115#host = <hostname>
116
117# Optional custom URL prefix for generated URLs where clients can reach
118# cached album art, to e.g. match scheme behind a reverse proxy.
119#url_prefix = https://<hostname>
120#
121###############################################################################
122
123
124# TCP #########################################################################
125#
126[tcp-control]
127# enable TCP Json RPC
128#enabled = true
129
130# address to listen on, can be specified multiple times
131# use "0.0.0.0" to bind to any IPv4 address or :: to bind to any IPv6 address
132# or "127.0.0.1" or "::1" to bind to localhost IPv4 or IPv6, respectively
133# use the address of a specific network interface to just listen on and accept
134# connections from that interface
135#bind_to_address = ::
136
137# which port the control server should listen on
138#port = 1705
139
140# Publish TCP control service via mDNS as '_snapcast-ctrl._tcp'
141#publish = true
142
143[tcp-streaming]
144# enable TCP streaming
145#enabled = true
146
147# address to listen on, can be specified multiple times
148# use "0.0.0.0" to bind to any IPv4 address or :: to bind to any IPv6 address
149# or "127.0.0.1" or "::1" to bind to localhost IPv4 or IPv6, respectively
150# use the address of a specific network interface to just listen on and accept
151# connections from that interface
152#bind_to_address = ::
153
154# which port the streaming server should listen on
155#port = 1704
156
157# Publish TCP streaming service via mDNS as '_snapcast._tcp'
158#publish = true
159#
160###############################################################################
161
162
163# Stream settings #############################################################
164#
165[stream]
166# source URI of the PCM input stream, can be configured multiple times
167# The following notation is used in this paragraph:
168# <angle brackets>: the whole expression must be replaced with your specific setting
169# [square brackets]: the whole expression is optional and can be left out
170# [key=value]: if you leave this option out, "value" will be the default for "key"
171#
172# Format: TYPE://host/path?name=<name>[&codec=<codec>][&sampleformat=<sampleformat>][&chunk_ms=<chunk ms>][&controlscript=<control script filename>[&controlscriptparams=<control script command line arguments>]]
173# parameters have the form "key=value", they are concatenated with an "&" character
174# parameter "name" is mandatory for all sources, while codec, sampleformat and chunk_ms are optional
175# and will override the default codec, sampleformat or chunk_ms settings
176# Available types are:
177# pipe: pipe:///<path/to/pipe>?name=<name>[&mode=create], mode can be "create" or "read"
178# librespot: librespot:///<path/to/librespot>?name=<name>[&username=<my username>&password=<my password>][&devicename=Snapcast][&bitrate=320][&wd_timeout=7800][&volume=100][&onevent=""][&normalize=false][&autoplay=false][¶ms=<generic librepsot process arguments>]
179# note that you need to have the librespot binary on your machine
180# sampleformat will be set to "44100:16:2"
181# file: file:///<path/to/PCM/file>?name=<name>
182# process: process:///<path/to/process>?name=<name>[&wd_timeout=0][&log_stderr=false][¶ms=<process arguments>]
183# airplay: airplay:///<path/to/airplay>?name=<name>[&port=5000]
184# note that you need to have the airplay binary on your machine
185# sampleformat will be set to "44100:16:2"
186# tcp server: tcp://<listen IP, e.g. 127.0.0.1>:<port>?name=<name>[&mode=server]
187# tcp client: tcp://<server IP, e.g. 127.0.0.1>:<port>?name=<name>&mode=client
188# alsa: alsa:///?name=<name>&device=<alsa device>[&send_silence=false][&idle_threshold=100][&silence_threshold_percent=0.0]
189# meta: meta:///<name of source#1>/<name of source#2>/.../<name of source#N>?name=<name>
190# source = pipe:///tmp/snapfifo?name=default
191
192# Plugin directory, containing scripts, referred by "controlscript"
193#plugin_dir = /usr/share/snapserver/plug-ins
194
195# Sandbox directory, containing executables, started by "process" and "librespot" streams
196#sandbox_dir = /usr/share/snapserver/sandbox
197
198# Default sample format: <sample rate>:<bits per sample>:<channels>
199#sampleformat = 48000:16:2
200
201# Default transport codec
202# (flac|ogg|opus|pcm)[:options]
203# Start Snapserver with "--stream:codec=<codec>:?" to get codec specific options
204#codec = flac
205
206# Default source stream read chunk size [ms].
207# The server will continuously read this number of milliseconds from the source into buffer and pass this buffer to the encoder.
208# The encoded buffer is sent to the clients. Some codecs have a higher latency and will need more data, e.g. Flac will need ~26ms chunks
209#chunk_ms = 20
210
211# Buffer [ms]
212# The end-to-end latency, from capturing a sample on the server until the sample is played-out on the client
213#buffer = 1000
214
215# Send audio to muted clients
216#send_to_muted = false
217#
218###############################################################################
219
220
221# Streaming client options ####################################################
222#
223[streaming_client]
224
225# Volume assigned to new snapclients [percent]
226# Defaults to 100 if unset
227#initial_volume = 100
228#
229###############################################################################
230
231
232# Logging options #############################################################
233#
234[logging]
235
236# log sink [null,system,stdout,stderr,file:<filename>]
237# when left empty: if running as daemon "system" else "stdout"
238#sink =
239
240# log filter <tag>:<level>[,<tag>:<level>]*
241# with tag = * or <log tag> and level = [trace,debug,info,notice,warning,error,fatal]
242#filter = *:info
243#
244###############################################################################
245