Browse Source

Adding custom 8448 SSL port listener

master
Miguel Gagliardo 5 months ago
parent
commit
a9ae2c3335
1 changed files with 7 additions and 3 deletions
  1. 7
    3
      install.sh

+ 7
- 3
install.sh View File

142
 cat <<EOF > /etc/nginx/sites-enabled/default
142
 cat <<EOF > /etc/nginx/sites-enabled/default
143
 server {
143
 server {
144
     listen 80;
144
     listen 80;
145
-    listen 8448;
146
-
147
     server_name ${DOMAIN};
145
     server_name ${DOMAIN};
148
 
146
 
149
     location /.well-known/matrix/client {
147
     location /.well-known/matrix/client {
212
 
210
 
213
 echo -e "Generate SSL cert\n"
211
 echo -e "Generate SSL cert\n"
214
 certbot --nginx -d ${DOMAIN} --agree-tos --register-unsafely-without-email
212
 certbot --nginx -d ${DOMAIN} --agree-tos --register-unsafely-without-email
215
-systemctl enable --now coturn
216
 
213
 
217
 # Add certbot SSL cert renewal to crontab
214
 # Add certbot SSL cert renewal to crontab
218
 crontab -l | { cat; echo '43 6 * * * certbot renew --post-hook "systemctl reload nginx"'; } | crontab -
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
 # Finally, start services
224
 # Finally, start services
221
 # Ensuring the DB dir is clean before bootstrapping
225
 # Ensuring the DB dir is clean before bootstrapping
222
 rm -rf ${BASE_DIR}/db/*
226
 rm -rf ${BASE_DIR}/db/*

Loading…
Cancel
Save