Ver código fonte

First commit, adding project + docs

master
Miguel Gagliardo 6 meses atrás
commit
c1d449dfa4

+ 55
- 0
README.md Ver arquivo

@@ -0,0 +1,55 @@
1
+# Matrix server installation
2
+
3
+## Prerequisites
4
+
5
+- A Linux VM with Ubuntu Server (20.04 minimum, 22.04 recommended)
6
+- A Domain name (can be root or subdomain) but it is a must the A record for the domain to be pointed to the server's public IP.
7
+  - e.g. `example.com A 1.1.1.1`: Being `example.com` the domain record and `1.1.1.1` the public IP of the server
8
+
9
+## Components
10
+
11
+The following components are included in the installer:
12
+
13
+1. Docker
14
+2. Matrix backend (synapse)
15
+3. Matrix frontend (element)
16
+4. Matrix DB (PostgreSQL)
17
+5. Matrix Admin Panel: `https://<URL>/admin`
18
+6. Coturn server (required for voice chat/videocalls)
19
+7. Nginx server (required for reverse proxying)
20
+8. SSL certificate via LetsEncrypt with automatic renewal
21
+
22
+## Installation
23
+
24
+**Note**: Please remember that it's a prerequisite the Domain A record needs to be pointed to the server's public IP and resolving.
25
+
26
+1. Copy `matrix.zip` to a server directory, recommended: `/tmp`
27
+2. Unzip the file: `unzip matrix.zip`
28
+3. Go to the directory and run the installer, you will need the domain name:
29
+
30
+```shell
31
+cd /tmp/matrix
32
+./install.sh <DOMAIN>
33
+```
34
+
35
+4. Wait for the installer to finish. Enjoy the matrix server :)
36
+
37
+
38
+## How to use the server
39
+
40
+Simply open your favourite web browser and go to **https://<YOUR_DOMAIN>**, which will show the Element Web UI. Registrations are disabled by default.
41
+
42
+## Creating users
43
+
44
+The first user will need to be created via command line interface, this is unique and it will be the admin user. To do this simply:
45
+
46
+1. SSH into the host
47
+2. Go to the directory `/opt/matrix`
48
+3. Create the user running the following command:
49
+
50
+```shell
51
+% cd /opt/matrix
52
+% docker compose exec synapse register_new_matrix_user --user <USER_NAME> --password <PASSWORD> --admin --config /data/homeserver.yaml
53
+```
54
+
55
+From there after, you can just use the admin panel to create users, the admin panel is located in `https://<DOMIN>/admin` (it requires admin user login)

+ 64
- 0
matrix/config/element/element-config.json Ver arquivo

@@ -0,0 +1,64 @@
1
+{
2
+    "default_server_config": {
3
+        "m.homeserver": {
4
+            "base_url": "https://DOMAIN"
5
+        },
6
+        "m.identity_server": {
7
+            "base_url": "https://DOMAIN"
8
+        },
9
+        "org.matrix.msc3575.proxy": {
10
+            "url": "https://DOMAIN"
11
+        }
12
+    },
13
+    "brand": "Element",
14
+    "integrations_ui_url": "https://scalar.vector.im/",
15
+    "integrations_rest_url": "https://scalar.vector.im/api",
16
+    "integrations_widgets_urls": [
17
+        "https://scalar.vector.im/_matrix/integrations/v1",
18
+        "https://scalar.vector.im/api",
19
+        "https://scalar-staging.vector.im/_matrix/integrations/v1",
20
+        "https://scalar-staging.vector.im/api",
21
+        "https://scalar-staging.riot.im/scalar/api"
22
+    ],
23
+    "bug_report_endpoint_url": "https://element.io/bugreports/submit",
24
+    "uisi_autorageshake_app": "element-auto-uisi",
25
+    "showLabsSettings": true,
26
+    "roomDirectory": {
27
+        "servers": [
28
+            "matrix.org",
29
+            "gitter.im",
30
+            "libera.chat"
31
+        ]
32
+    },
33
+    "enable_presence_by_hs_url": {
34
+        "https://matrix.org": false,
35
+        "https://matrix-client.matrix.org": false
36
+    },
37
+    "terms_and_conditions_links": [
38
+        {
39
+            "url": "https://element.io/privacy",
40
+            "text": "Privacy Policy"
41
+        },
42
+        {
43
+            "url": "https://element.io/cookie-policy",
44
+            "text": "Cookie Policy"
45
+        }
46
+    ],
47
+    "sentry": {
48
+        "dsn": "https://029a0eb289f942508ae0fb17935bd8c5@sentry.matrix.org/6",
49
+        "environment": "develop"
50
+    },
51
+    "posthog": {
52
+        "projectApiKey": "phc_Jzsm6DTm6V2705zeU5dcNvQDlonOR68XvX2sh1sEOHO",
53
+        "apiHost": "https://posthog.element.io"
54
+    },
55
+    "privacy_policy_url": "https://element.io/cookie-policy",
56
+    "features": {
57
+        "feature_spotlight": true,
58
+        "feature_video_rooms": true
59
+    },
60
+    "element_call": {
61
+        "url": "https://element-call.netlify.app"
62
+    },
63
+    "map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
64
+}

+ 751
- 0
matrix/config/turnserver.conf Ver arquivo

@@ -0,0 +1,751 @@
1
+# Coturn TURN SERVER configuration file
2
+#
3
+# Boolean values note: where a boolean value is supposed to be used,
4
+# you can use '0', 'off', 'no', 'false', or 'f' as 'false,
5
+# and you can use '1', 'on', 'yes', 'true', or 't' as 'true'
6
+# If the value is missing, then it means 'true' by default.
7
+#
8
+
9
+# Listener interface device (optional, Linux only).
10
+# NOT RECOMMENDED.
11
+#
12
+#listening-device=eth0
13
+
14
+# TURN listener port for UDP and TCP (Default: 3478).
15
+# Note: actually, TLS & DTLS sessions can connect to the
16
+# "plain" TCP & UDP port(s), too - if allowed by configuration.
17
+#
18
+listening-port=3478
19
+
20
+# TURN listener port for TLS (Default: 5349).
21
+# Note: actually, "plain" TCP & UDP sessions can connect to the TLS & DTLS
22
+# port(s), too - if allowed by configuration. The TURN server
23
+# "automatically" recognizes the type of traffic. Actually, two listening
24
+# endpoints (the "plain" one and the "tls" one) are equivalent in terms of
25
+# functionality; but Coturn keeps both endpoints to satisfy the RFC 5766 specs.
26
+# For secure TCP connections, Coturn currently supports
27
+# TLS version 1.0, 1.1 and 1.2.
28
+# For secure UDP connections, Coturn supports DTLS version 1.
29
+#
30
+tls-listening-port=5443
31
+
32
+# Alternative listening port for UDP and TCP listeners;
33
+# default (or zero) value means "listening port plus one".
34
+# This is needed for RFC 5780 support
35
+# (STUN extension specs, NAT behavior discovery). The TURN Server
36
+# supports RFC 5780 only if it is started with more than one
37
+# listening IP address of the same family (IPv4 or IPv6).
38
+# RFC 5780 is supported only by UDP protocol, other protocols
39
+# are listening to that endpoint only for "symmetry".
40
+#
41
+#alt-listening-port=0
42
+
43
+# Alternative listening port for TLS and DTLS protocols.
44
+# Default (or zero) value means "TLS listening port plus one".
45
+#
46
+#alt-tls-listening-port=0
47
+
48
+# Some network setups will require using a TCP reverse proxy in front
49
+# of the STUN server. If the proxy port option is set a single listener
50
+# is started on the given port that accepts connections using the
51
+# haproxy proxy protocol v2.
52
+# (https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt)
53
+#
54
+#tcp-proxy-port=5555
55
+
56
+# Listener IP address of relay server. Multiple listeners can be specified.
57
+# If no IP(s) specified in the config file or in the command line options,
58
+# then all IPv4 and IPv6 system IPs will be used for listening.
59
+#
60
+listening-ip=0.0.0.0
61
+#listening-ip=10.207.21.238
62
+#listening-ip=2607:f0d0:1002:51::4
63
+
64
+# Auxiliary STUN/TURN server listening endpoint.
65
+# Aux servers have almost full TURN and STUN functionality.
66
+# The (minor) limitations are:
67
+#
68
+# 1) Auxiliary servers do not have alternative ports and
69
+# they do not support STUN RFC 5780 functionality (CHANGE REQUEST).
70
+#
71
+# 2) Auxiliary servers also are never returning ALTERNATIVE-SERVER reply.
72
+#
73
+# Valid formats are 1.2.3.4:5555 for IPv4 and [1:2::3:4]:5555 for IPv6.
74
+#
75
+# There may be multiple aux-server options, each will be used for listening
76
+# to client requests.
77
+#
78
+#aux-server=172.17.19.110:33478
79
+#aux-server=[2607:f0d0:1002:51::4]:33478
80
+
81
+# (recommended for older Linuxes only)
82
+# Automatically balance UDP traffic over auxiliary servers (if configured).
83
+# The load balancing is using the ALTERNATE-SERVER mechanism.
84
+# The TURN client must support 300 ALTERNATE-SERVER response for this
85
+# functionality.
86
+#
87
+#udp-self-balance
88
+
89
+# Relay interface device for relay sockets (optional, Linux only).
90
+# NOT RECOMMENDED.
91
+#
92
+#relay-device=eth1
93
+
94
+# Relay address (the local IP address that will be used to relay the
95
+# packets to the peer).
96
+# Multiple relay addresses may be used.
97
+# The same IP(s) can be used as both listening IP(s) and relay IP(s).
98
+#
99
+# If no relay IP(s) specified, then the turnserver will apply the default
100
+# policy: it will decide itself which relay addresses to be used, and it
101
+# will always be using the client socket IP address as the relay IP address
102
+# of the TURN session (if the requested relay address family is the same
103
+# as the family of the client socket).
104
+#
105
+#relay-ip=172.17.19.105
106
+#relay-ip=2607:f0d0:1002:51::5
107
+
108
+# For Amazon EC2 users:
109
+#
110
+# TURN Server public/private address mapping, if the server is behind NAT.
111
+# In that situation, if a -X is used in form "-X <ip>" then that ip will be reported
112
+# as relay IP address of all allocations. This scenario works only in a simple case
113
+# when one single relay address is be used, and no RFC5780 functionality is required.
114
+# That single relay address must be mapped by NAT to the 'external' IP.
115
+# The "external-ip" value, if not empty, is returned in XOR-RELAYED-ADDRESS field.
116
+# For that 'external' IP, NAT must forward ports directly (relayed port 12345
117
+# must be always mapped to the same 'external' port 12345).
118
+#
119
+# In more complex case when more than one IP address is involved,
120
+# that option must be used several times, each entry must
121
+# have form "-X <public-ip/private-ip>", to map all involved addresses.
122
+# RFC5780 NAT discovery STUN functionality will work correctly,
123
+# if the addresses are mapped properly, even when the TURN server itself
124
+# is behind A NAT.
125
+#
126
+# By default, this value is empty, and no address mapping is used.
127
+#
128
+external-ip=EXTERNAL_IP
129
+#
130
+#OR:
131
+#
132
+#external-ip=60.70.80.91/172.17.19.101
133
+#external-ip=60.70.80.92/172.17.19.102
134
+
135
+
136
+# Number of the relay threads to handle the established connections
137
+# (in addition to authentication thread and the listener thread).
138
+# If explicitly set to 0 then application runs relay process in a
139
+# single thread, in the same thread with the listener process
140
+# (the authentication thread will still be a separate thread).
141
+#
142
+# If this parameter is not set, then the default OS-dependent
143
+# thread pattern algorithm will be employed. Usually the default
144
+# algorithm is optimal, so you have to change this option
145
+# if you want to make some fine tweaks.
146
+#
147
+# In the older systems (Linux kernel before 3.9),
148
+# the number of UDP threads is always one thread per network listening
149
+# endpoint - including the auxiliary endpoints - unless 0 (zero) or
150
+# 1 (one) value is set.
151
+#
152
+#relay-threads=0
153
+
154
+# Lower and upper bounds of the UDP relay endpoints:
155
+# (default values are 49152 and 65535)
156
+#
157
+min-port=49152
158
+max-port=65535
159
+
160
+# Uncomment to run TURN server in 'normal' 'moderate' verbose mode.
161
+# By default the verbose mode is off.
162
+verbose
163
+
164
+# Uncomment to run TURN server in 'extra' verbose mode.
165
+# This mode is very annoying and produces lots of output.
166
+# Not recommended under normal circumstances.
167
+#
168
+#Verbose
169
+
170
+# Uncomment to use fingerprints in the TURN messages.
171
+# By default the fingerprints are off.
172
+#
173
+fingerprint
174
+
175
+# Uncomment to use long-term credential mechanism.
176
+# By default no credentials mechanism is used (any user allowed).
177
+#
178
+lt-cred-mech
179
+
180
+# This option is the opposite of lt-cred-mech.
181
+# (TURN Server with no-auth option allows anonymous access).
182
+# If neither option is defined, and no users are defined,
183
+# then no-auth is default. If at least one user is defined,
184
+# in this file, in command line or in usersdb file, then
185
+# lt-cred-mech is default.
186
+#
187
+#no-auth
188
+
189
+# Enable prometheus exporter
190
+# If enabled the turnserver will expose an endpoint with stats on a prometheus format
191
+# this endpoint is listening on a different port to not conflict with other configurations.
192
+#
193
+# You can simply run the turnserver and access the port 9641 and path /metrics
194
+#
195
+# For mor info on the prometheus exporter and metrics
196
+# https://prometheus.io/docs/introduction/overview/
197
+# https://prometheus.io/docs/concepts/data_model/
198
+#
199
+#prometheus
200
+
201
+# TURN REST API flag.
202
+# (Time Limited Long Term Credential)
203
+# Flag that sets a special authorization option that is based upon authentication secret.
204
+#
205
+# This feature's purpose is to support "TURN Server REST API", see
206
+# "TURN REST API" link in the project's page
207
+# https://github.com/coturn/coturn/
208
+#
209
+# This option is used with timestamp:
210
+#
211
+# usercombo -> "timestamp:userid"
212
+# turn user -> usercombo
213
+# turn password -> base64(hmac(secret key, usercombo))
214
+#
215
+# This allows TURN credentials to be accounted for a specific user id.
216
+# If you don't have a suitable id, then the timestamp alone can be used.
217
+# This option is enabled by turning on secret-based authentication.
218
+# The actual value of the secret is defined either by the option static-auth-secret,
219
+# or can be found in the turn_secret table in the database (see below).
220
+#
221
+# Read more about it:
222
+#  - https://tools.ietf.org/html/draft-uberti-behave-turn-rest-00
223
+#  - https://www.ietf.org/proceedings/87/slides/slides-87-behave-10.pdf
224
+#
225
+# Be aware that use-auth-secret overrides some parts of lt-cred-mech.
226
+# The use-auth-secret feature depends internally on lt-cred-mech, so if you set
227
+# this option then it automatically enables lt-cred-mech internally
228
+# as if you had enabled both.
229
+#
230
+# Note that you can use only one auth mechanism at the same time! This is because,
231
+# both mechanisms conduct username and password validation in different ways.
232
+#
233
+# Use either lt-cred-mech or use-auth-secret in the conf
234
+# to avoid any confusion.
235
+#
236
+#use-auth-secret
237
+
238
+# 'Static' authentication secret value (a string) for TURN REST API only.
239
+# If not set, then the turn server
240
+# will try to use the 'dynamic' value in the turn_secret table
241
+# in the user database (if present). The database-stored  value can be changed on-the-fly
242
+# by a separate program, so this is why that mode is considered 'dynamic'.
243
+#
244
+static-auth-secret=STATIC_SECRET
245
+
246
+# Server name used for
247
+# the oAuth authentication purposes.
248
+# The default value is the realm name.
249
+#
250
+server-name=DOMAIN
251
+
252
+# Flag that allows oAuth authentication.
253
+#
254
+#oauth
255
+
256
+# 'Static' user accounts for the long term credentials mechanism, only.
257
+# This option cannot be used with TURN REST API.
258
+# 'Static' user accounts are NOT dynamically checked by the turnserver process,
259
+# so they can NOT be changed while the turnserver is running.
260
+#
261
+user=turn:TURN_PWD
262
+#user=username2:key2
263
+# OR:
264
+#user=username1:password1
265
+#user=username2:password2
266
+#
267
+# Keys must be generated by turnadmin utility. The key value depends
268
+# on user name, realm, and password:
269
+#
270
+# Example:
271
+# $ turnadmin -k -u ninefingers -r north.gov -p youhavetoberealistic
272
+# Output: 0xbc807ee29df3c9ffa736523fb2c4e8ee
273
+# ('0x' in the beginning of the key is what differentiates the key from
274
+# password. If it has 0x then it is a key, otherwise it is a password).
275
+#
276
+# The corresponding user account entry in the config file will be:
277
+#
278
+#user=ninefingers:0xbc807ee29df3c9ffa736523fb2c4e8ee
279
+# Or, equivalently, with open clear password (less secure):
280
+#user=ninefingers:youhavetoberealistic
281
+#
282
+
283
+# SQLite database file name.
284
+#
285
+# The default file name is /var/db/turndb or /usr/local/var/db/turndb or
286
+# /var/lib/turn/turndb.
287
+#
288
+#userdb=/var/db/turndb
289
+
290
+# PostgreSQL database connection string in the case that you are using PostgreSQL
291
+# as the user database.
292
+# This database can be used for the long-term credential mechanism
293
+# and it can store the secret value for secret-based timed authentication in TURN REST API.
294
+# See http://www.postgresql.org/docs/8.4/static/libpq-connect.html for 8.x PostgreSQL
295
+# versions connection string format, see
296
+# http://www.postgresql.org/docs/9.2/static/libpq-connect.html#LIBPQ-CONNSTRING
297
+# for 9.x and newer connection string formats.
298
+#
299
+#psql-userdb="host=<host> dbname=<database-name> user=<database-user> password=<database-user-password> connect_timeout=30"
300
+
301
+# MySQL database connection string in the case that you are using MySQL
302
+# as the user database.
303
+# This database can be used for the long-term credential mechanism
304
+# and it can store the secret value for secret-based timed authentication in TURN REST API.
305
+#
306
+# Optional connection string parameters for the secure communications (SSL):
307
+# ca, capath, cert, key, cipher
308
+# (see http://dev.mysql.com/doc/refman/5.1/en/ssl-options.html for the
309
+# command options description).
310
+#
311
+# Use the string format below (space separated parameters, all optional):
312
+#
313
+#mysql-userdb="host=<host> dbname=<database-name> user=<database-user> password=<database-user-password> port=<port> connect_timeout=<seconds> read_timeout=<seconds>"
314
+
315
+# If you want to use an encrypted password in the MySQL connection string,
316
+# then set the MySQL password encryption secret key file with this option.
317
+#
318
+# Warning: If this option is set, then the mysql password must be set in "mysql-userdb" in an encrypted format!
319
+# If you want to use a cleartext password then do not set this option!
320
+#
321
+# This is the file path for the aes encrypted secret key used for password encryption.
322
+#
323
+#secret-key-file=/path/
324
+
325
+# MongoDB database connection string in the case that you are using MongoDB
326
+# as the user database.
327
+# This database can be used for long-term credential mechanism
328
+# and it can store the secret value for secret-based timed authentication in TURN REST API.
329
+# Use the string format described at http://hergert.me/docs/mongo-c-driver/mongoc_uri.html
330
+#
331
+#mongo-userdb="mongodb://[username:password@]host1[:port1][,host2[:port2],...[,hostN[:portN]]][/[database][?options]]"
332
+
333
+# Redis database connection string in the case that you are using Redis
334
+# as the user database.
335
+# This database can be used for long-term credential mechanism
336
+# and it can store the secret value for secret-based timed authentication in TURN REST API.
337
+# Use the string format below (space separated parameters, all optional):
338
+#
339
+#redis-userdb="ip=<ip-address> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>"
340
+
341
+# Redis status and statistics database connection string, if used (default - empty, no Redis stats DB used).
342
+# This database keeps allocations status information, and it can be also used for publishing
343
+# and delivering traffic and allocation event notifications.
344
+# The connection string has the same parameters as redis-userdb connection string.
345
+# Use the string format below (space separated parameters, all optional):
346
+#
347
+#redis-statsdb="ip=<ip-address> dbname=<database-number> password=<database-user-password> port=<port> connect_timeout=<seconds>"
348
+
349
+# The default realm to be used for the users when no explicit
350
+# origin/realm relationship is found in the database, or if the TURN
351
+# server is not using any database (just the commands-line settings
352
+# and the userdb file). Must be used with long-term credentials
353
+# mechanism or with TURN REST API.
354
+#
355
+# Note: If the default realm is not specified, then realm falls back to the host domain name.
356
+#       If the domain name string is empty, or set to '(None)', then it is initialized as an empty string.
357
+#
358
+realm=DOMAIN
359
+
360
+# This flag sets the origin consistency
361
+# check. Across the session, all requests must have the same
362
+# main ORIGIN attribute value (if the ORIGIN was
363
+# initially used by the session).
364
+#
365
+#check-origin-consistency
366
+
367
+# Per-user allocation quota.
368
+# default value is 0 (no quota, unlimited number of sessions per user).
369
+# This option can also be set through the database, for a particular realm.
370
+#
371
+#user-quota=0
372
+
373
+# Total allocation quota.
374
+# default value is 0 (no quota).
375
+# This option can also be set through the database, for a particular realm.
376
+#
377
+#total-quota=0
378
+
379
+# Max bytes-per-second bandwidth a TURN session is allowed to handle
380
+# (input and output network streams are treated separately). Anything above
381
+# that limit will be dropped or temporarily suppressed (within
382
+# the available buffer limits).
383
+# This option can also be set through the database, for a particular realm.
384
+#
385
+#max-bps=0
386
+
387
+#
388
+# Maximum server capacity.
389
+# Total bytes-per-second bandwidth the TURN server is allowed to allocate
390
+# for the sessions, combined (input and output network streams are treated separately).
391
+#
392
+# bps-capacity=0
393
+
394
+# Uncomment if no UDP client listener is desired.
395
+# By default UDP client listener is always started.
396
+#
397
+#no-udp
398
+
399
+# Uncomment if no TCP client listener is desired.
400
+# By default TCP client listener is always started.
401
+#
402
+#no-tcp
403
+
404
+# Uncomment if no TLS client listener is desired.
405
+# By default TLS client listener is always started.
406
+#
407
+#no-tls
408
+
409
+# Uncomment if no DTLS client listener is desired.
410
+# By default DTLS client listener is always started.
411
+#
412
+#no-dtls
413
+
414
+# Uncomment if no UDP relay endpoints are allowed.
415
+# By default UDP relay endpoints are enabled (like in RFC 5766).
416
+#
417
+#no-udp-relay
418
+
419
+# Uncomment if no TCP relay endpoints are allowed.
420
+# By default TCP relay endpoints are enabled (like in RFC 6062).
421
+#
422
+#no-tcp-relay
423
+
424
+# Uncomment if extra security is desired,
425
+# with nonce value having a limited lifetime.
426
+# The nonce value is unique for a session.
427
+# Set this option to limit the nonce lifetime.
428
+# Set it to 0 for unlimited lifetime.
429
+# It defaults to 600 secs (10 min) if no value is provided. After that delay,
430
+# the client will get 438 error and will have to re-authenticate itself.
431
+#
432
+#stale-nonce=600
433
+
434
+# Uncomment if you want to set the maximum allocation
435
+# time before it has to be refreshed.
436
+# Default is 3600s.
437
+#
438
+#max-allocate-lifetime=3600
439
+
440
+
441
+# Uncomment to set the lifetime for the channel.
442
+# Default value is 600 secs (10 minutes).
443
+# This value MUST not be changed for production purposes.
444
+#
445
+#channel-lifetime=600
446
+
447
+# Uncomment to set the permission lifetime.
448
+# Default to 300 secs (5 minutes).
449
+# In production this value MUST not be changed,
450
+# however it can be useful for test purposes.
451
+#
452
+#permission-lifetime=300
453
+
454
+# Certificate file.
455
+# Use an absolute path or path relative to the
456
+# configuration file.
457
+# Use PEM file format.
458
+#
459
+cert=/etc/letsencrypt/live/DOMAIN/fullchain.pem
460
+
461
+# Private key file.
462
+# Use an absolute path or path relative to the
463
+# configuration file.
464
+# Use PEM file format.
465
+#
466
+pkey=/etc/letsencrypt/live/DOMAIN/privkey.pem
467
+
468
+# Private key file password, if it is in encoded format.
469
+# This option has no default value.
470
+#
471
+#pkey-pwd=...
472
+
473
+# Allowed OpenSSL cipher list for TLS/DTLS connections.
474
+# Default value is "DEFAULT".
475
+#
476
+#cipher-list="DEFAULT"
477
+
478
+# CA file in OpenSSL format.
479
+# Forces TURN server to verify the client SSL certificates.
480
+# By default this is not set: there is no default value and the client
481
+# certificate is not checked.
482
+#
483
+# Example:
484
+#CA-file=/etc/ssh/id_rsa.cert
485
+
486
+# Curve name for EC ciphers, if supported by OpenSSL
487
+# library (TLS and DTLS). The default value is prime256v1,
488
+# if pre-OpenSSL 1.0.2 is used. With OpenSSL 1.0.2+,
489
+# an optimal curve will be automatically calculated, if not defined
490
+# by this option.
491
+#
492
+#ec-curve-name=prime256v1
493
+
494
+# Use 566 bits predefined DH TLS key. Default size of the key is 2066.
495
+#
496
+#dh566
497
+
498
+# Use 1066 bits predefined DH TLS key. Default size of the key is 2066.
499
+#
500
+#dh1066
501
+
502
+# Use custom DH TLS key, stored in PEM format in the file.
503
+# Flags --dh566 and --dh2066 are ignored when the DH key is taken from a file.
504
+#
505
+#dh-file=<DH-PEM-file-name>
506
+
507
+# Flag to prevent stdout log messages.
508
+# By default, all log messages go to both stdout and to
509
+# the configured log file. With this option everything will
510
+# go to the configured log only (unless the log file itself is stdout).
511
+#
512
+#no-stdout-log
513
+
514
+# Option to set the log file name.
515
+# By default, the turnserver tries to open a log file in
516
+# /var/log, /var/tmp, /tmp and the current directory
517
+# (Whichever file open operation succeeds first will be used).
518
+# With this option you can set the definite log file name.
519
+# The special names are "stdout" and "-" - they will force everything
520
+# to the stdout. Also, the "syslog" name will force everything to
521
+# the system log (syslog).
522
+# In the runtime, the logfile can be reset with the SIGHUP signal
523
+# to the turnserver process.
524
+#
525
+log-file=/var/tmp/turnserver.log
526
+
527
+# Option to redirect all log output into system log (syslog).
528
+#
529
+syslog
530
+
531
+# This flag means that no log file rollover will be used, and the log file
532
+# name will be constructed as-is, without PID and date appendage.
533
+# This option can be used, for example, together with the logrotate tool.
534
+#
535
+#simple-log
536
+
537
+# Enable full ISO-8601 timestamp in all logs.
538
+#new-log-timestamp
539
+
540
+# Set timestamp format (in strftime(1) format)
541
+#new-log-timestamp-format "%FT%T%z"
542
+
543
+# Disabled by default binding logging in verbose log mode to avoid DoS attacks.
544
+# Enable binding logging and UDP endpoint logs in verbose log mode.
545
+#log-binding
546
+
547
+# Option to set the "redirection" mode. The value of this option
548
+# will be the address of the alternate server for UDP & TCP service in the form of
549
+# <ip>[:<port>]. The server will send this value in the attribute
550
+# ALTERNATE-SERVER, with error 300, on ALLOCATE request, to the client.
551
+# Client will receive only values with the same address family
552
+# as the client network endpoint address family.
553
+# See RFC 5389 and RFC 5766 for the description of ALTERNATE-SERVER functionality.
554
+# The client must use the obtained value for subsequent TURN communications.
555
+# If more than one --alternate-server option is provided, then the functionality
556
+# can be more accurately described as "load-balancing" than a mere "redirection".
557
+# If the port number is omitted, then the default port
558
+# number 3478 for the UDP/TCP protocols will be used.
559
+# Colon (:) characters in IPv6 addresses may conflict with the syntax of
560
+# the option. To alleviate this conflict, literal IPv6 addresses are enclosed
561
+# in square brackets in such resource identifiers, for example:
562
+# [2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478 .
563
+# Multiple alternate servers can be set. They will be used in the
564
+# round-robin manner. All servers in the pool are considered of equal weight and
565
+# the load will be distributed equally. For example, if you have 4 alternate servers,
566
+# then each server will receive 25% of ALLOCATE requests. A alternate TURN server
567
+# address can be used more than one time with the alternate-server option, so this
568
+# can emulate "weighting" of the servers.
569
+#
570
+# Examples:
571
+#alternate-server=1.2.3.4:5678
572
+#alternate-server=11.22.33.44:56789
573
+#alternate-server=5.6.7.8
574
+#alternate-server=[2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478
575
+
576
+# Option to set alternative server for TLS & DTLS services in form of
577
+# <ip>:<port>. If the port number is omitted, then the default port
578
+# number 5349 for the TLS/DTLS protocols will be used. See the previous
579
+# option for the functionality description.
580
+#
581
+# Examples:
582
+#tls-alternate-server=1.2.3.4:5678
583
+#tls-alternate-server=11.22.33.44:56789
584
+#tls-alternate-server=[2001:db8:85a3:8d3:1319:8a2e:370:7348]:3478
585
+
586
+# Option to suppress TURN functionality, only STUN requests will be processed.
587
+# Run as STUN server only, all TURN requests will be ignored.
588
+# By default, this option is NOT set.
589
+#
590
+#stun-only
591
+
592
+# Option to hide software version. Enhance security when used in production.
593
+# Revealing the specific software version of the agent through the
594
+# SOFTWARE attribute might allow them to become more vulnerable to
595
+# attacks against software that is known to contain security holes.
596
+# Implementers SHOULD make usage of the SOFTWARE attribute a
597
+# configurable option (https://tools.ietf.org/html/rfc5389#section-16.1.2)
598
+#
599
+#no-software-attribute
600
+
601
+# Option to suppress STUN functionality, only TURN requests will be processed.
602
+# Run as TURN server only, all STUN requests will be ignored.
603
+# By default, this option is NOT set.
604
+#
605
+#no-stun
606
+
607
+# This is the timestamp/username separator symbol (character) in TURN REST API.
608
+# The default value is ':'.
609
+# rest-api-separator=:
610
+
611
+# Flag that can be used to allow peers on the loopback addresses (127.x.x.x and ::1).
612
+# This is an extra security measure.
613
+#
614
+# (To avoid any security issue that allowing loopback access may raise,
615
+# the no-loopback-peers option is replaced by allow-loopback-peers.)
616
+#
617
+# Allow it only for testing in a development environment!
618
+# In production it adds a possible security vulnerability, so for security reasons
619
+# it is not allowed using it together with empty cli-password.
620
+#
621
+#allow-loopback-peers
622
+
623
+# Flag that can be used to disallow peers on well-known broadcast addresses (224.0.0.0 and above, and FFXX:*).
624
+# This is an extra security measure.
625
+#
626
+#no-multicast-peers
627
+
628
+# Option to set the max time, in seconds, allowed for full allocation establishment.
629
+# Default is 60 seconds.
630
+#
631
+#max-allocate-timeout=60
632
+
633
+# Option to allow or ban specific ip addresses or ranges of ip addresses.
634
+# If an ip address is specified as both allowed and denied, then the ip address is
635
+# considered to be allowed. This is useful when you wish to ban a range of ip
636
+# addresses, except for a few specific ips within that range.
637
+#
638
+# This can be used when you do not want users of the turn server to be able to access
639
+# machines reachable by the turn server, but would otherwise be unreachable from the
640
+# internet (e.g. when the turn server is sitting behind a NAT)
641
+#
642
+# Examples:
643
+# denied-peer-ip=83.166.64.0-83.166.95.255
644
+# allowed-peer-ip=83.166.68.45
645
+
646
+# File name to store the pid of the process.
647
+# Default is /var/run/turnserver.pid (if superuser account is used) or
648
+# /var/tmp/turnserver.pid .
649
+#
650
+#pidfile="/var/run/turnserver.pid"
651
+
652
+# Require authentication of the STUN Binding request.
653
+# By default, the clients are allowed anonymous access to the STUN Binding functionality.
654
+#
655
+#secure-stun
656
+
657
+# Mobility with ICE (MICE) specs support.
658
+#
659
+#mobility
660
+
661
+# Allocate Address Family according
662
+# If enabled then TURN server allocates address family according  the TURN
663
+# Client <=> Server communication address family.
664
+# (By default Coturn works according RFC 6156.)
665
+# !!Warning: Enabling this option breaks RFC6156 section-4.2 (violates use default IPv4)!!
666
+#
667
+#keep-address-family
668
+
669
+
670
+# User name to run the process. After the initialization, the turnserver process
671
+# will attempt to change the current user ID to that user.
672
+#
673
+#proc-user=<user-name>
674
+
675
+# Group name to run the process. After the initialization, the turnserver process
676
+# will attempt to change the current group ID to that group.
677
+#
678
+#proc-group=<group-name>
679
+
680
+# Turn OFF the CLI support.
681
+# By default it is always ON.
682
+# See also options cli-ip and cli-port.
683
+#
684
+#no-cli
685
+
686
+#Local system IP address to be used for CLI server endpoint. Default value
687
+# is 127.0.0.1.
688
+#
689
+#cli-ip=127.0.0.1
690
+
691
+# CLI server port. Default is 5766.
692
+#
693
+#cli-port=5766
694
+
695
+# CLI access password. Default is empty (no password).
696
+# For the security reasons, it is recommended that you use the encrypted
697
+# form of the password (see the -P command in the turnadmin utility).
698
+#
699
+# Secure form for password 'qwerty':
700
+#
701
+#cli-password=$5$79a316b350311570$81df9cfb9af7f5e5a76eada31e7097b663a0670f99a3c07ded3f1c8e59c5658a
702
+#
703
+# Or unsecure form for the same password:
704
+#
705
+#cli-password=qwerty
706
+
707
+# Enable Web-admin support on https. By default it is Disabled.
708
+# If it is enabled it also enables a http a simple static banner page
709
+# with a small reminder that the admin page is available only on https.
710
+#
711
+#web-admin
712
+
713
+# Local system IP address to be used for Web-admin server endpoint. Default value is 127.0.0.1.
714
+#
715
+#web-admin-ip=127.0.0.1
716
+
717
+# Web-admin server port. Default is 8080.
718
+#
719
+#web-admin-port=8080
720
+
721
+# Web-admin server listen on STUN/TURN worker threads
722
+# By default it is disabled for security resons! (Not recommended in any production environment!)
723
+#
724
+#web-admin-listen-on-workers
725
+
726
+#acme-redirect=http://redirectserver/.well-known/acme-challenge/
727
+# Redirect ACME, i.e. HTTP GET requests matching '^/.well-known/acme-challenge/(.*)' to '<URL>$1'.
728
+# Default is '', i.e. no special handling for such requests.
729
+
730
+# Server relay. NON-STANDARD AND DANGEROUS OPTION.
731
+# Only for those applications when you want to run
732
+# server applications on the relay endpoints.
733
+# This option eliminates the IP permissions check on
734
+# the packets incoming to the relay endpoints.
735
+#
736
+#server-relay
737
+
738
+# Maximum number of output sessions in ps CLI command.
739
+# This value can be changed on-the-fly in CLI. The default value is 256.
740
+#
741
+#cli-max-output-sessions
742
+
743
+# Set network engine type for the process (for internal purposes).
744
+#
745
+#ne=[1|2|3]
746
+
747
+# Do not allow an TLS/DTLS version of protocol
748
+#
749
+#no-tlsv1
750
+#no-tlsv1_1
751
+#no-tlsv1_2

+ 78
- 0
matrix/docker-compose.yaml Ver arquivo

@@ -0,0 +1,78 @@
1
+---
2
+services:
3
+
4
+  synapse:
5
+    image: ghcr.io/element-hq/synapse:latest
6
+    restart: unless-stopped
7
+    environment:
8
+      - SYNAPSE_CONFIG_PATH=/data/homeserver.yaml
9
+    volumes:
10
+      - ./config/synapse:/data
11
+      - /etc/default/matrix_shared_secret:/etc/default/matrix_shared_secret:ro
12
+    depends_on:
13
+      - db
14
+    networks:
15
+      matrix_server:
16
+        ipv4_address: 10.10.10.4
17
+    ports:
18
+      - 8008:8008
19
+
20
+  db:
21
+    image: docker.io/postgres:16-alpine
22
+    environment:
23
+      - POSTGRES_DB=synapse
24
+      - POSTGRES_USER=synapse
25
+      - POSTGRES_PASSWORD=PG_PASS
26
+      - POSTGRES_INITDB_ARGS=--encoding=UTF8 --lc-collate=C --lc-ctype=C
27
+    volumes:
28
+      - ./db:/var/lib/postgresql/data
29
+    networks:
30
+      matrix_server:
31
+        ipv4_address: 10.10.10.2
32
+  
33
+  element:
34
+    image: vectorim/element-web:latest
35
+    restart: unless-stopped
36
+    volumes:
37
+      - ./config/element/element-config.json:/app/config.json
38
+    networks:
39
+      matrix_server:
40
+        ipv4_address: 10.10.10.3
41
+    depends_on:
42
+      - synapse
43
+
44
+  sydent:
45
+    image: matrixdotorg/sydent:latest
46
+    restart: unless-stopped
47
+    networks:
48
+      matrix_server:
49
+        ipv4_address: 10.10.10.5
50
+    depends_on:
51
+      - synapse
52
+
53
+  synapse-admin:
54
+    image: awesometechnologies/synapse-admin:latest
55
+    restart: unless-stopped
56
+    networks:
57
+      matrix_server:
58
+        ipv4_address: 10.10.10.6
59
+    depends_on:
60
+      - synapse
61
+
62
+  sliding-sync:
63
+    image: ghcr.io/matrix-org/sliding-sync:latest
64
+    restart: unless-stopped
65
+    environment:
66
+      - SYNCV3_BINDADDR=:8008
67
+      - SYNCV3_SERVER=https://DOMAIN
68
+      - SYNCV3_SECRET=SLIDING_SYNC_KEY
69
+      - SYNCV3_DB=user=synapse dbname=synapse sslmode=disable host=db password=PG_PASS
70
+    networks:
71
+      matrix_server:
72
+        ipv4_address: 10.10.10.7
73
+    depends_on:
74
+      - synapse
75
+
76
+networks:
77
+  matrix_server:
78
+    external: true

+ 9
- 0
matrix/homeserver.yaml.db Ver arquivo

@@ -0,0 +1,9 @@
1
+database:
2
+  name: psycopg2
3
+  args:
4
+    user: synapse
5
+    password: PG_PASS
6
+    dbname: synapse
7
+    host: db
8
+    cp_min: 5
9
+    cp_max: 10

+ 217
- 0
matrix/install.sh Ver arquivo

@@ -0,0 +1,217 @@
1
+#!/bin/bash
2
+
3
+set -euo pipefail
4
+
5
+DOMAIN=$1
6
+if [ -z ${DOMAIN} ]; then
7
+    echo "Script usage: ./install.sh <DOMAIN>"
8
+    return 1
9
+fi
10
+
11
+BASE_DIR=/opt/matrix
12
+
13
+# Create directory and copy configs + docker-compose YAML
14
+mkdir -p ${BASE_DIR}
15
+cp -R . ${BASE_DIR}
16
+cd ${BASE_DIR}
17
+
18
+# Baseline utils
19
+echo -e "Installing baseline utils\n"
20
+apt update
21
+apt upgrade -y
22
+apt install -y ca-certificates curl pwgen nginx python3-certbot-nginx ufw coturn
23
+
24
+# Open only needed ports
25
+echo -e "Opening ports and enabling ufw\n"
26
+# SSH
27
+ufw allow 22/tcp
28
+
29
+# Nginx (HTTP/HTTPS)
30
+ufw allow 80/tcp        
31
+ufw allow 443/tcp
32
+ufw allow 8448/tcp
33
+
34
+# Coturn Ports
35
+ufw allow 3478/tcp
36
+ufw allow 5443/tcp
37
+ufw allow 49152:65535/tcp
38
+ufw allow 49152:65535/udp
39
+
40
+# Enable firewall
41
+ufw --force enable
42
+
43
+# Configure Coturn TURN server
44
+echo -e "Install and configure coturn server\n"
45
+
46
+echo "TURNSERVER_ENABLED=1" > /etc/default/coturn
47
+cp config/turnserver.conf /etc/
48
+
49
+TURN_PWD=$(pwgen -s 28 -1)
50
+TURN_STATIC_SECRET=$(pwgen -s 64 1)
51
+EXTERNAL_IP=$(curl -s checkip.amazonaws.com)
52
+
53
+sed -i "s|DOMAIN|${DOMAIN}|g" /etc/turnserver.conf
54
+sed -i "s|TURN_PWD|${TURN_PWD}|g" /etc/turnserver.conf
55
+sed -i "s|EXTERNAL_IP|${EXTERNAL_IP}|g" /etc/turnserver.conf
56
+sed -i "s|STATIC_SECRET|${TURN_STATIC_SECRET}|g" /etc/turnserver.conf
57
+
58
+# Add Docker's official GPG key
59
+echo -e "Install docker\n"
60
+
61
+install -m 0755 -d /etc/apt/keyrings
62
+curl -fsSL https://download.docker.com/linux/ubuntu/gpg -o /etc/apt/keyrings/docker.asc
63
+chmod a+r /etc/apt/keyrings/docker.asc
64
+
65
+# Add the repository to APT sources
66
+echo \
67
+  "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu \
68
+  $(. /etc/os-release && echo "${VERSION_CODENAME}") stable" | \
69
+  tee /etc/apt/sources.list.d/docker.list > /dev/null
70
+apt update
71
+
72
+# Install docker
73
+apt install -y docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin
74
+
75
+# Create docker network `matrix_server`
76
+echo -e "Create docker network\n"
77
+
78
+docker network create --driver=bridge --subnet=10.10.10.0/24 --gateway=10.10.10.1 matrix_server
79
+
80
+# Generate synapse file
81
+echo -e "Generating synapse file..\n"
82
+
83
+docker compose run --rm -e SYNAPSE_SERVER_NAME=${DOMAIN} -e SYNAPSE_REPORT_STATS=yes synapse generate
84
+
85
+# Replace DB config in Synapse's homeserver.yaml
86
+echo -e "Configuring homeserver.yaml\n"
87
+
88
+# Granting all read permissions to cert files
89
+chmod 444 ${BASE_DIR}/config/synapse/${DOMAIN}.*
90
+
91
+# Config homeserver.yaml
92
+sed -i '$ d' "${BASE_DIR}/config/synapse/homeserver.yaml"
93
+sed -e '22r homeserver.yaml.db' -e '22,25d' "${BASE_DIR}/config/synapse/homeserver.yaml" > /tmp/homeserver.yaml
94
+cp /tmp/homeserver.yaml "${BASE_DIR}/config/synapse/homeserver.yaml"
95
+
96
+# Configure User Directory and TURN
97
+cat <<EOF >> "${BASE_DIR}/config/synapse/homeserver.yaml"
98
+user_directory:
99
+    enabled: true
100
+    search_all_users: true
101
+    prefer_local_users: true
102
+    show_locked_users: true
103
+turn_allow_guests: False
104
+turn_user_lifetime: 86400000
105
+turn_shared_secret: "${TURN_STATIC_SECRET}"
106
+turn_uris: [ "turn:${DOMAIN}?transport=udp", "turn:${DOMAIN}?transport=tcp" ]
107
+EOF
108
+
109
+# Randomly pick a DB password
110
+PG_PASS=$(pwgen -s 28 -1)
111
+
112
+# Replace Password in homeserver.yaml
113
+sed -i "s|PG_PASS|\"${PG_PASS}\"|g" "${BASE_DIR}/config/synapse/homeserver.yaml"
114
+
115
+# Replace PG_PASS Password and DOMAIN in docker compose YAML
116
+sed -i "s|DOMAIN|${DOMAIN}|g" "${BASE_DIR}/docker-compose.yaml"
117
+sed -i "s|PG_PASS|${PG_PASS}|g" "${BASE_DIR}/docker-compose.yaml"
118
+
119
+# Replace Sliding Sync key
120
+SLIDING_SYNC_KEY=$(openssl rand -hex 32)
121
+sed -i "s|SLIDING_SYNC_KEY|${SLIDING_SYNC_KEY}|g" "${BASE_DIR}/docker-compose.yaml"
122
+
123
+# Replace domain in element config
124
+sed -i "s|DOMAIN|${DOMAIN}|g" "${BASE_DIR}/config/element/element-config.json"
125
+
126
+# Copy SystemD file and start the service
127
+echo -e "Setting up SystemD service\n"
128
+
129
+cp "${BASE_DIR}/matrix.service" /etc/systemd/system/
130
+systemctl daemon-reload
131
+systemctl enable --now matrix.service
132
+
133
+# Configure Nginx
134
+echo -e "Configuring nginx\n"
135
+
136
+cat <<EOF > /etc/nginx/sites-enabled/default
137
+server {
138
+    listen 80;
139
+    listen 8448;
140
+
141
+    server_name ${DOMAIN};
142
+
143
+    location /.well-known/matrix/client {
144
+        default_type application/json;
145
+        add_header Access-Control-Allow-Origin *;
146
+        return 200 '{"m.homeserver": {"base_url": "https://${DOMAIN}"}, "org.matrix.msc3575.proxy": {"url": "https://${DOMAIN}"}}';
147
+    }
148
+
149
+    # Admin panel
150
+    location /admin/ {
151
+        proxy_pass http://10.10.10.6/;
152
+        proxy_set_header X-Forwarded-For \$remote_addr;
153
+        proxy_set_header X-Forwarded-Proto \$scheme;
154
+        proxy_set_header Host \$host;
155
+        proxy_http_version 1.1;
156
+    }
157
+
158
+    # Sydent identity server
159
+    location ~ ^(/_matrix/identity) {
160
+        proxy_pass http://10.10.10.5:8090;
161
+        proxy_set_header X-Forwarded-For \$remote_addr;
162
+        proxy_set_header X-Forwarded-Proto \$scheme;
163
+        proxy_set_header Host \$host;
164
+        proxy_http_version 1.1;
165
+    }
166
+
167
+    # Sliding Sync
168
+    location ~ ^/(client/|_matrix/client/unstable/org.matrix.msc3575/sync) {
169
+        proxy_pass http://10.10.10.7:8008;
170
+        proxy_set_header X-Forwarded-For \$remote_addr;
171
+        proxy_set_header X-Forwarded-Proto \$scheme;
172
+        proxy_set_header Host \$host;
173
+    }
174
+
175
+    # Synapse Backend
176
+    location ~ ^(\/_matrix|\/_synapse\/(client|admin)) {
177
+        # Synapse Container Network IP
178
+        proxy_pass http://10.10.10.4:8008;
179
+        proxy_set_header X-Forwarded-For \$remote_addr;
180
+        proxy_set_header X-Forwarded-Proto \$scheme;
181
+        proxy_set_header Host \$host;
182
+        client_max_body_size 50M;
183
+        proxy_http_version 1.1;
184
+    }
185
+
186
+    # Element Frontend
187
+    location / {
188
+        # Element chat Container Network IP
189
+        proxy_pass http://10.10.10.3;
190
+        proxy_set_header X-Forwarded-For \$remote_addr;
191
+        proxy_set_header X-Forwarded-Proto \$scheme;
192
+        proxy_set_header Host \$host;
193
+
194
+        # Nginx by default only allows file uploads up to 1M in size
195
+        # Increase client_max_body_size to match max_upload_size defined in homeserver.yaml
196
+        client_max_body_size 50M;
197
+ 
198
+        # Synapse responses may be chunked, which is an HTTP/1.1 feature.
199
+        proxy_http_version 1.1;
200
+    }
201
+}
202
+EOF
203
+
204
+systemctl restart nginx
205
+systemctl enable --now nginx
206
+
207
+echo -e "Generate SSL cert\n"
208
+certbot --nginx -d ${DOMAIN} --agree-tos --register-unsafely-without-email
209
+systemctl enable --now coturn
210
+
211
+# Add certbot SSL cert renewal to crontab
212
+crontab -l | { cat; echo '43 6 * * * certbot renew --post-hook "systemctl reload nginx"'; } | crontab -
213
+
214
+# Finally, start services
215
+# Ensuring the DB dir is clean before bootstrapping
216
+rm -rf ${BASE_DIR}/db/*
217
+systemctl enable --now matrix.service

+ 12
- 0
matrix/matrix.service Ver arquivo

@@ -0,0 +1,12 @@
1
+[Unit]
2
+Description=Matrix Chat Service
3
+After=network-online.target docker.service
4
+
5
+[Service]
6
+Type=simple
7
+WorkingDirectory=/opt/matrix
8
+ExecStart=/usr/bin/docker compose up --remove-orphans --build
9
+ExecStop=/usr/bin/docker compose down
10
+
11
+[Install]
12
+WantedBy=multi-user.target

Carregando…
Cancelar
Salvar