Both sides previous revisionPrevious revisionNext revision | Previous revision |
computing:synapse [2022/11/26 01:56] – oemb1905 | computing:synapse [2024/01/30 03:17] (current) – oemb1905 |
---|
* **Jonathan Haack** | * **Jonathan Haack** |
* **Haack's Networking** | * **Haack's Networking** |
* **webmaster@haacksnetworking.org** | * **webmaster@haacksnetworking.org** |
| |
------------------------------------------- | ------------------------------------------- |
sudo --user elementweb tar -xvf element-v1.10.12.tar.gz | sudo --user elementweb tar -xvf element-v1.10.12.tar.gz |
rm element-v1.10.12.tar.gz | rm element-v1.10.12.tar.gz |
cd /var/www/elemenet.gnulinux.club/ | cd /var/www/element.gnulinux.club/ |
ln -s element-v1.10.12/ element | ln -s element-v1.10.12/ element |
cd /var/www/elemenet.gnulinux.club/element | cd /var/www/element.gnulinux.club/element |
cp config-sample.json config.jason | cp config-sample.json config.json |
nano config.json | nano config.json |
<"base_url": "https://matrix.gnulinux.club",> | <"base_url": "https://matrix.gnulinux.club",> |
systemctl restart matrix-synapse | systemctl restart matrix-synapse |
| |
You can verify that jitsi is working by ''ps -aux | jitsi'' and then visit jitsi.gnulinux.club (adjusted for your domain) to verify you can create and join a new meeting. Additionally, you can navigate to ''etc/turnserver.conf'' to see the entries jitsi created and likewise verify the server block it created at ''/etc/nginx/sites-enabled/jitsi.gnulinux.club''. You are now done! However, make sure to run regular snapshots on a cron job, and consider some simple shell scripts to monitor nginx, postgres, and fail2ban and if they fail, to restart them and email you. I also have a separate script that dumps the entire database daily with a time stamp. Here are the scripts currently in use: | You can verify that jitsi is working by ''ps -aux | jitsi'' and then visit jitsi.gnulinux.club (adjusted for your domain) to verify you can create and join a new meeting. Additionally, you can navigate to ''etc/turnserver.conf'' to see the entries jitsi created and likewise verify the server block it created at ''/etc/nginx/sites-enabled/jitsi.gnulinux.club''. To upgrade, find the latest release, and download it: |
| |
- Keep Fail2Ban Running:[[https://repo.haacksnetworking.org/oemb1905/haackingclub/-/blob/master/scripts/fail2ban-restart.sh|fail2ban-restart.sh]] | https://github.com/element-hq/element-web/releases |
- Keep Postgres Running: [[https://repo.haacksnetworking.org/oemb1905/haackingclub/-/blob/master/scripts/postgres-restart.sh|postgres-restart.sh]] | wget https://github.com/element-hq/element-web/releases/download/v1.11.55/element-v1.11.55.tar.gz |
- Keep Nginx Running: [[https://repo.haacksnetworking.org/oemb1905/haackingclub/-/blob/master/scripts/nginx-restart.sh|nginx-restart.sh]] | tar -xvf element-v1.11.55.tar.gz |
- Nightly DB Dumps: [[https://repo.haacksnetworking.org/oemb1905/haackingclub/-/blob/master/scripts/postgres-dump.sh|postgres-dump.sh]] | cd /var/www/gnulinux.club/element |
| cp -ar config.json ../ |
| ln -s element-v1.10.12/ element |
| |
Also, there's no point in setting this up unless you have regular backups! In my case, since this is a VM, I just use the same script as I use for all my other instances. That script powers down the VM, and copies a sparse file, then tarballs it. After restarting the VM, my backup workstation pulls down the tarballs (also sparse) on a set schedule, keeping approximately 90 days of restore points. The backup script I use is found here and, of course, this runs on the host OS (not the Synapse VM instance): | Make sure to have .well-knowns established for client and support as well: |
| |
| sudo touch /var/www/gnulinux.club/.well-known/matrix/client |
| |
| With the following: |
| |
| { |
| "m.homeserver": { |
| "base_url": "https://matrix.gnulinux.club" |
| } |
| } |
| |
| Also identify support: |
| |
| sudo touch /var/www/gnulinux.club/.well-known/matrix/support |
| |
| With the following: |
| |
| {"contacts": [{"matrix_id": "@oemb1905:gnulinux.club", "email_address": "webmaster@haacksnetworking.org","club.gnulinux.phone_number": "+13105651874", "role": "m.role.admin"}],"support_page": "https://gnulinux.club/code-conduct.pdf"} |
| |
- VM Backup Script: [[https://repo.haacksnetworking.org/oemb1905/haackingclub/-/blob/master/scripts/sane-vm-backup.sh|sane-vm-backup.sh]] | Finally, make sure that browsers don't download these by adding a location to your TLD block: |
| |
Lastly, I also have a hot-spare in case my co-located hardware fails. Swing on by: | location /.well-known/matrix { |
| allow all; |
| add_header access-control-allow-origin *; |
| add_header content-type application/json; |
| } |
| |
- [[https://element.gnulinux.club|GNU/Linux Club]] | More updates below when they come. |
| |
--- //[[jonathan@haacksnetworking.org|oemb1905]] 2022/11/25 18:52// | --- //[[jonathan@haacksnetworking.org|oemb1905]] 2024/01/30 03:09// |