Here are the steps I took to configure the livematrix package on top of Caddy web server.
It is important to note, that SSL encrypted communication requires a trusted domain name with a certificate.
Step 0 - Subdomain
Create an A record for a subdomain you are going to use to serve the HTTP and WebSocket communication with the communicator. e.g. lm.your_domain.com
Step 1 - proxy
Add reverse_proxy handler for the livematrix subdomain to the Caddy config
MATRIX_SERVER=matrix.your_domain.com #This needs to lead directly to ip reverse_proxy of your matrix server. The livematrix server does not check the /matrix directory to be correctly redirected from the base domain to the subdomain
MATRIX_USERNAME and MATRIX_PASSWORD are login information for a user you don't mind getting taken over by someone. Such user can be easily created with register_new_matrix_user
SERVER_IFACE=127.0.0.1 if you are running the livematrix server on the same machine as your Caddy server (that's why we set localhost:8000 in the caddyfile)
Now you can run the server
Step 3 - client
Create a webpage you want to add the client to and copy the html & js & css & config.json components in locations according to the readme.md
This website can be hosted anywhere. Does not have to be where the livematrix server is located.
Here are the steps I took to configure the livematrix package on top of Caddy web server. It is important to note, that SSL encrypted communication requires a trusted domain name with a certificate.
Step 0 - Subdomain
lm.your_domain.com
Step 1 - proxy
nano /etc/caddy/Caddyfile
sudo systemctl reload caddy
Step 2 - server
.env
file somewhere on your serverMATRIX_RECIPIENT=your_private_user:your_domain.com
MATRIX_SERVER=matrix.your_domain.com #This needs to lead directly to ip reverse_proxy of your matrix server. The livematrix server does not check the /matrix directory to be correctly redirected from the base domain to the subdomain
Now you can run the server
Step 3 - client