Update README.md
[KisSync.git] / config.template.yaml
blobbaba2a2ab4606125be9cf9122f2caf54b3c35012
1 # MySQL server details
2 # server: domain or IP of MySQL server
3 # database: a MySQL database that the user specified has read/write access to
4 # user: username to authenticate as
5 # password: password for user
6 mysql:
7   server: 'localhost'
8   port: 3306
9   database: 'cytube3'
10   user: 'cytube3'
11   password: ''
12   pool-size: 10
14 # Define IPs/ports to listen on
15 # Each entry MUST define ip and port (ip can be '' to bind all available addresses)
16 # Each entry should set http, https, and/or io to true to listen for the corresponding
17 # service on that port.  http/io and https/io can be combined, but if http and https
18 # are both specified, only https will be bound to that port.
20 # If you don't specify a url, the url io.domain:port or https.domain:port will be assumed
21 # for non-ssl and ssl websockets, respectively.  You can override this by specifying the
22 # url for a websocket listener.
23 listen:
24 # Default HTTP server - default interface, port 8080
25   - ip: ''
26     port: 8080
27     http: true
28 # Uncomment below to enable HTTPS/SSL websockets
29 # Note that you must also set https->enabled = true in the https definition
30 #  - ip: ''
31 #    port: 8443
32 #    https: true
33 #    io: true
34 # Default Socket.IO server - default interface, port 1337
35   - ip: ''
36     port: 1337
37     io: true
38 # Example of how to bind an extra port to HTTP and Socket.IO
39 #  - ip: ''
40 #    port: 8081
41 #    http: true
42 #    io: true
43 #    url: 'http://my-other-thing.site.com:8081'
45 # HTTP server details
46 http:
47   # Even though you may specify multiple ports to listen on for HTTP above,
48   # one port must be specified as default for the purposes of generating
49   # links with the appropriate port
50   default-port: 8080
51   # Specifies the root domain for cookies.  If you have multiple domains
52   # e.g. a.example.com and b.example.com, the root domain is example.com
53   root-domain: 'localhost'
54   # Specify alternate domains/hosts that are allowed to set the login cookie
55   # Leave out the http://
56   alt-domains:
57     - '127.0.0.1'
58   # Use express-minify to minify CSS and Javascript
59   minify: false
60   # Max-Age for caching.  Value should be an integer in milliseconds or a string accepted by
61   # the `ms` module.  Set to 0 to disable caching.
62   max-age: '7d'
63   # Set to false to disable gzip compression
64   gzip: true
65   # Customize the threshold byte size for applying gzip
66   gzip-threshold: 1024
67   # Secret used for signed cookies.  Can be anything, but make it unique and hard to guess
68   cookie-secret: 'change-me'
69   index:
70     # Maximum number of channels to display on the index page public channel list
71     max-entries: 50
72   # Configure trusted proxy addresses to map X-Forwarded-For to the client IP.
73   # See also: https://github.com/jshttp/proxy-addr
74   trust-proxies: ['loopback']
76 # HTTPS server details
77 https:
78   enabled: false
79   # Even though you may specify multiple ports to listen on for HTTPS above,
80   # one port must be specified as default for the purposes of generating
81   # links with the appropriate port
82   default-port: 8443
83   domain: 'https://localhost'
84   keyfile: 'localhost.key'
85   passphrase: ''
86   certfile: 'localhost.cert'
87   cafile: ''
88   ciphers: 'HIGH:!DSS:!aNULL@STRENGTH'
90 # Page template values
91 # title goes in the upper left corner, description goes in a <meta> tag
92 html-template:
93   title: 'Sync'
94   description: 'Free, open source synchtube'
96 # Socket.IO server details
97 io:
98   # In most cases this will be the same as the http.domain.
99   # However, if your HTTP traffic is going through a proxy (e.g. cloudflare)
100   # you will want to set up a passthrough domain for socket.io.
101   # If the root of this domain is not the same as the root of your HTTP domain
102   # (or HTTPS if SSL is enabled), logins won't work.
103   domain: 'http://localhost'
104   # Even though you may specify multiple ports to listen on for HTTP above,
105   # one port must be specified as default for the purposes of generating
106   # links with the appropriate port
107   default-port: 1337
108   # limit the number of concurrent socket connections per IP address
109   ip-connection-limit: 10
110   cors:
111     # Additional origins to allow socket connections from (io.domain and
112     # https.domain are included implicitly).
113     allowed-origins: []
115 # YouTube v3 API key
116 # 1. Go to https://console.developers.google.com/, create a new "project" (or choose an existing one)
117 # 2. Make sure the YouTube Data v3 API is "enabled" for your project: https://console.developers.google.com/apis/library/youtube.googleapis.com
118 # 3. Go to "Credentials" on the sidebar of https://console.developers.google.com/, click "Create credentials" and choose type "API key"
119 # 4. Optionally restrict the key for security, or just copy the key.
120 # 5. Test your key (may take a few minutes to become active):
122 #    $ export YOUTUBE_API_KEY="your key here"
123 #    $ curl "https://www.googleapis.com/youtube/v3/search?key=$YOUTUBE_API_KEY&part=id&maxResults=1&q=test+video&type=video"
124 youtube-v3-key: ''
125 # Limit for the number of channels a user can register
126 max-channels-per-user: 5
127 # Limit for the number of accounts an IP address can register
128 max-accounts-per-ip: 5
129 # Minimum number of seconds between guest logins from the same IP
130 guest-login-delay: 60
132 # Allows you to customize the path divider. The /r/ in http://localhost/r/yourchannel
133 # Acceptable characters are a-z A-Z 0-9 _ and -
134 channel-path: 'r'
135 # Allows you to blacklist certain channels.  Users will be automatically kicked
136 # upon trying to join one.
137 channel-blacklist: []
138 # Minutes between saving channel state to disk
139 channel-save-interval: 5
141 # Configure periodic clearing of old alias data
142 aliases:
143   # Interval (in milliseconds) between subsequent runs of clearing
144   purge-interval: 3600000
145   # Maximum age of an alias (in milliseconds) - default 1 month
146   max-age: 2592000000
148 # Workaround for Vimeo blocking my domain
149 vimeo-workaround: false
151 # Regular expressions for defining reserved user and channel names and page titles
152 # The list of regular expressions will be joined with an OR, and compared without
153 # case sensitivity.
155 # Default: reserve any name containing "admin[istrator]" or "owner" as a word
156 # but only if it is separated by a dash or underscore (e.g. dadmin is not reserved
157 # but d-admin is)
158 reserved-names:
159   usernames:
160     - '^(.*?[-_])?admin(istrator)?([-_].*)?$'
161     - '^(.*?[-_])?owner([-_].*)?$'
162   channels:
163     - '^(.*?[-_])?admin(istrator)?([-_].*)?$'
164     - '^(.*?[-_])?owner([-_].*)?$'
165   pagetitles: []
167 # Provide a contact list for the /contact page
168 # Example:
169 # contacts:
170 #   - name: 'my_name'
171 #     title: 'administrator
172 #     email: 'me@my.site'
173 contacts: []
175 playlist:
176   max-items: 4000
177   # How often (in seconds), mediaUpdate packets are broadcast to clients
178   update-interval: 5
180 # If set to true, when the ipThrottle and lastguestlogin rate limiters are cleared
181 # periodically, the garbage collector will be invoked immediately.
182 # The server must be invoked with node --expose-gc index.js for this to have any effect.
183 aggressive-gc: false
185 # If you have ffmpeg installed, you can query metadata from raw files, allowing
186 # server-synched raw file playback.  This requires the following:
187 #   * ffmpeg must be installed on the server
188 ffmpeg:
189   enabled: false
190 # Executable name for ffprobe if it is not "ffprobe".  On Debian and Ubuntu (on which
191 # libav is used rather than ffmpeg proper), this is "avprobe"
192   ffprobe-exec: 'ffprobe'
194 link-domain-blacklist: []
196 # Drop root if started as root!!
197 setuid:
198   enabled: false
199   group: 'users'
200   user: 'user'
201 # how long to wait in ms before changing uid/gid
202   timeout: 15
204 # Allows for external services to access the system commandline
205 # Useful for setups where stdin isn't available such as when using PM2
206 service-socket:
207   enabled: false
208   socket: 'service.sock'
210 # Twitch Client ID for the data API (used for VOD lookups)
211 # https://github.com/justintv/Twitch-API/blob/master/authentication.md#developer-setup
212 twitch-client-id: null
214 poll:
215   max-options: 50