|
@@ -142,8 +142,6 @@ echo -e "Configuring nginx\n"
|
142
|
142
|
cat <<EOF > /etc/nginx/sites-enabled/default
|
143
|
143
|
server {
|
144
|
144
|
listen 80;
|
145
|
|
- listen 8448;
|
146
|
|
-
|
147
|
145
|
server_name ${DOMAIN};
|
148
|
146
|
|
149
|
147
|
location /.well-known/matrix/client {
|
|
@@ -212,11 +210,17 @@ systemctl enable --now nginx
|
212
|
210
|
|
213
|
211
|
echo -e "Generate SSL cert\n"
|
214
|
212
|
certbot --nginx -d ${DOMAIN} --agree-tos --register-unsafely-without-email
|
215
|
|
-systemctl enable --now coturn
|
216
|
213
|
|
217
|
214
|
# Add certbot SSL cert renewal to crontab
|
218
|
215
|
crontab -l | { cat; echo '43 6 * * * certbot renew --post-hook "systemctl reload nginx"'; } | crontab -
|
219
|
216
|
|
|
217
|
+# Add custom 8448 SSL port for Matrix Federation
|
|
218
|
+sed -i '/listen\ 443\ ssl/a\\tlisten\ 8448\ ssl\;' /etc/nginx/sites-enabled/default
|
|
219
|
+nginx -s reload
|
|
220
|
+
|
|
221
|
+# Enable coturn
|
|
222
|
+systemctl enable --now coturn
|
|
223
|
+
|
220
|
224
|
# Finally, start services
|
221
|
225
|
# Ensuring the DB dir is clean before bootstrapping
|
222
|
226
|
rm -rf ${BASE_DIR}/db/*
|