Here is my server info. This was installed with Snaps on Ubuntu
Key : Value
backup-on-refresh : disable
ignore-errors : false
mongo-oplog-url : mongodb://localhost:27017/local
mongo-url : mongodb://localhost:27017/parties
port 3000
siteurl myserver
Here is my caddy file config
# Enable HTTPS
tls {
dns route53
}
# Proxy WebSocket connections to your Rocket.Chat server
reverse_proxy /websocket http://localhost:3000/websocket {
header_up Host {host}
header_up X-Real-IP {remote}
header_up X-Forwarded-Proto {scheme}
header_up X-Forwarded-For {remote}
header_up Connection {>Connection}
header_up Upgrade {>Upgrade}
header_up Origin {>Origin}
}
}
Here is the error message I am getting when I replace the BLANK caddyfile with the updated one
× snap.rocketchat-server.rocketchat-caddy.service - Service for snap application rocketchat-server.rocketchat-caddy
Loaded: loaded (/etc/systemd/system/snap.rocketchat-server.rocketchat-caddy.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2024-02-05 22:27:09 UTC; 22s ago
Process: 514596 ExecStart=/usr/bin/snap run rocketchat-server.rocketchat-caddy (code=exited, status=1/FAILURE)
Main PID: 514596 (code=exited, status=1/FAILURE)
CPU: 54ms
systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Main process exited, code=exited, status=1/FAILURE
systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’.
systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Scheduled restart job, restart counter is at 5.
systemd[1]: Stopped Service for snap application rocketchat-server.rocketchat-caddy.
systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Start request repeated too quickly.
systemd[1]: snap.rocketchat-server.rocketchat-caddy.service: Failed with result ‘exit-code’.
systemd[1]: Failed to start Service for snap application rocketchat-server.rocketchat-caddy.
If I then replace the updated Caddyfile with a BLANK Caddyfile everything works again. But that is not what I want. I want to enable Websockets because whenever I try to run a custom app on my server I get this error message:
error=EOF wsURL="wss://myserver.com:3000/websocket
Obviously if solved I’d replace myserver with my actual https:// server address. I feel like an idiot because I installed this using Snaps and I should have used Docker I guess. I already have had the server up and running for months now and I dont want to recreate all the users. I assume i’d have to move over the mongodb?