You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The server will be restarted when necessary, or the Docker service or Syncplay may need to be updated. Whether it is expected or not, it is necessary to persist Syncplay at this time, which means that the room data will be saved to disk. You need to choose a working directory to save them, such as `/etc/syncplay/` , execute the following command, the data will be saved to the `rooms.db` file.
33
+
The server will be restarted when necessary, or the Docker service may need to be updated. Whether it is expected or not, it is necessary to persist Syncplay at this time, which means that the room data will be saved to disk. You need to choose a working directory to save them, such as `/etc/syncplay/` , execute the following command, the data will be saved to the `rooms.db` file.
36
34
37
35
```bash
38
36
docker run -d --net=host \
@@ -41,7 +39,7 @@ docker run -d --net=host \
41
39
dnomd343/syncplay --persistent
42
40
```
43
41
44
-
This directory has more uses. For example, adding the `--enable-stats` option will enable the statistics function, and the data will be saved to the file `stats.db` in the directory. You can also create a `config.yml` file in the directory and write the configuration parameters in it, Syncplay will automatically read it when it starts, avoiding the need to type a large number of parameters in the command line.
42
+
This directory has more uses. For example, adding the `--enable-stats` option will enable the statistics function, and the data will be saved to the file `stats.db` in the directory. You can also create a `config.yml` file in the directory and write the configuration options in it, Syncplay will automatically read it when it starts, avoiding the need to type a large number of arguments in the command line.
45
43
46
44
```yaml
47
45
# /etc/syncplay/config.yml
@@ -97,7 +95,7 @@ You can customize the Syncplay server by specifying the following command line a
97
95
98
96
+ `--motd [MESSAGE]` :The welcome text after the user enters the room, not enabled by default.
99
97
100
-
+ `--salt [SALT]` :A string used to secure passwords (e.g. Rainbow-tables), defaults to empty.
98
+
+ `--salt [TEXT]` :A string used to secure passwords (e.g. Rainbow-tables), defaults to empty.
101
99
102
100
+ `--random-salt` :Use a randomly generated salt value, valid when `--salt` is not specified, not enabled by default.
103
101
@@ -113,49 +111,58 @@ You can customize the Syncplay server by specifying the following command line a
113
111
114
112
+ `--persistent` :Enable room data persistence, the information will be saved to the `rooms.db` file, only valid when `--isolate-rooms` is not specified, not enabled by default.
115
113
116
-
+ `--max-username [N]` :Maximum length of usernames, default is `150` .
114
+
+ `--max-username [NUM]` :Maximum length of usernames, default is `150` .
117
115
118
-
+ `--max-chat-message [N]` :Maximum length of chat messages, default is `150` .
116
+
+ `--max-chat-message [NUM]` :Maximum length of chat messages, default is `150` .
119
117
120
118
+ `--permanent-rooms [ROOM ...]` :Specifies a list of rooms that will still be listed even if their playlist is empty, only valid when `--persistent` is specified, defaults to empty.
121
119
120
+
+ `--listen-ipv4` :Customize the listening address of the Syncplay service on the IPv4 network, not enabled by default.
121
+
122
+
+ `--listen-ipv6` :Customize the listening address of the Syncplay service on the IPv6 network, not enabled by default.
123
+
124
+
> Only when you specify `--listen-ipv4`, Syncplay will not listen on IPv6 and vice versa. When both are specified, Syncplay will work under dual-stack networking.
125
+
122
126
You can also use the following command to output help information.
-p PORT, --port PORT listen port of syncplay server
138
-
--password PASSWORD authentication of syncplay server
139
-
--motd MOTD welcome text after the user enters the room
140
-
--salt SALT string used to secure passwords
142
+
--password PASSWD authentication of syncplay server
143
+
--motd MESSAGE welcome text after the user enters the room
144
+
--salt TEXT string used to secure passwords
141
145
--random-salt use a randomly generated salt value
142
146
--isolate-rooms room isolation enabled
143
147
--disable-chat disables the chat feature
144
148
--disable-ready disables the readiness indicator feature
145
149
--enable-stats enable syncplay server statistics
146
150
--enable-tls enable tls support of syncplay server
147
151
--persistent enables room persistence
148
-
--max-username MAX_USERNAME
149
-
maximum length of usernames
150
-
--max-chat-message MAX_CHAT_MESSAGE
152
+
--max-username NUM maximum length of usernames
153
+
--max-chat-message NUM
151
154
maximum length of chat messages
152
-
--permanent-rooms [PERMANENT_ROOMS ...]
155
+
--permanent-rooms [ROOM ...]
153
156
permanent rooms of syncplay server
157
+
--listen-ipv4 INTERFACE
158
+
listening address of ipv4
159
+
--listen-ipv6 INTERFACE
160
+
listening address of ipv6
154
161
```
155
162
156
163
## Configure File
157
164
158
-
If you configure a lot of options, it will be quite troublesome and error-prone to enter a large number of command line parameters every time you start. At this time, you can write them into the configuration file. Create a `config.yml` file in the working directory. It uses YAML format and supports all parameters in the command line. Syncplay will automatically read and load it when starting, but it should be noted that if the same parameters are specified on the command line, will override the configuration file's options.
165
+
If you configure a lot of options, it will be quite troublesome and error-prone to enter a large number of command line arguments every time you start. At this time, you can write them into the configuration file. Create a `config.yml` file in the working directory. It uses YAML format and supports all arguments in the command line. Syncplay will automatically read and load it when starting, but it should be noted that if the same arguments are specified on the command line, will override the configuration file's options.
159
166
160
167
```yaml
161
168
port: 7999
@@ -170,6 +177,8 @@ disable-chat: true
170
177
disable-ready: true
171
178
max-username: 256
172
179
max-chat-message: 2048
180
+
listen-ipv4: 127.0.0.1
181
+
listen-ipv6: ::1
173
182
permanent-rooms:
174
183
- ROOM_1
175
184
- ROOM_2
@@ -179,6 +188,18 @@ motd: |
179
188
More information...
180
189
```
181
190
191
+
## Environment Variables
192
+
193
+
The Syncplay container also supports configuration through environment variables. It supports three types of fields: numbers, strings, and boolean, this means that `permanent-rooms` is not supported. Environment variables are named in uppercase letters, and `-` is replaced by `_` , boolean values are represented by `ON` or `TRUE`. The following is an example of using environment variables.
194
+
195
+
```bash
196
+
docker run -d --net=host --restart=always --name=syncplay \
You may have noticed that we support three configuration methods: command line arguments, configuration file and environment variables. Their priority is from high to low, that is, the command line arguments will override the options of the configuration file, and the configuration file will override the environment variables. You can use them together.
202
+
182
203
## Docker Compose
183
204
184
205
Using `docker-compose` to deploy Syncplay is a more elegant way. You need to create a `docker-compose.yml` configuration file and write the following example.
@@ -202,7 +223,7 @@ We save this file in the `/etc/syncplay/` directory. Since a relative path is us
202
223
> docker-compose up
203
224
Recreating syncplay ... done
204
225
Attaching to syncplay
205
-
syncplay | Welcome to Syncplay server, ver. 1.7.0
226
+
syncplay | Welcome to Syncplay server, ver. 1.7.1
206
227
```
207
228
208
229
> Adding the `-d` option allows the service to run in the background.
@@ -215,12 +236,30 @@ If you encounter any errors, please first use the `docker logs syncplay` command
215
236
216
237
```bash
217
238
> docker run --rm --env DEBUG=ON dnomd343/syncplay
For some reason, you may need to change the path of the configuration files or working directory. This is possible in the Syncplay container, which requires you to specify it using environment variables.
254
+
255
+
+ `TEMP_DIR` :Temporary directory, it does not need to be persisted, defaults to `/tmp/`
256
+
257
+
+ `WORK_DIR` :The working directory, which stores data related to Syncplay, defaults to `/data/`
258
+
259
+
+ `CERT_DIR` :Certificate directory, which is used to store TLS certificates and private key files, defaults to `/certs/`
260
+
261
+
+ `CONFIG` :Configuration file, which defines the YAML configuration read by the bootstrap script, defaults to `config.yml`
262
+
224
263
## Build Image
225
264
226
265
You can build an image directly from the source code using the following command.
0 commit comments