HAVEN CHAT
Haven is a voice, video, and text chat service that can be self hosted, unlike its inspiration Discord. Here is a setup that I use, although sanitized.
- If you plan on using a custom domain and an ssl cert, add it to your dns/registrar, and make sure to acquire your cert, whether thru your registrar or LetsEncrypt.
1. PODMAN SYSTEMD CONTAINER FILE
Make /etc/containers/systemd/haven.container with the following (edit ports and such accordingly)
[Container]
ContainerName=haven
Image=ghcr.io/ancsemi/haven:latest
PublishPort=3000:3000
Volume=/opt/docker/haven/haven_data:/data
Environment=SERVER_NAME=My Haven Instance
Environment=ADMIN_USERNAME=your_username_of_choice
2. REFRESH SYSTEMD'S KNOWLEDGE OF UNITFILES
sudo systemctl daemon-reload
3. START & ENABLE HAVEN SERVICE
sudo systemctl start haven
sudo systemctl enable haven
4a. SETUP SSL PROXY (OPTIONAL)
This and the following step is only needed for SSL. Doing this will make Firefox, Edge, Chrome, etc happy with a secure connection. Not so necessary if all folks will be using the official client app.
<VirtualHost *:80>
ServerName servername.com
# Optional: if you ever add aliases
# ServerAlias www.servername.com
Redirect permanent / https://servername.com/
</VirtualHost>
<IfModule mod_ssl.c>
<VirtualHost *:443>
ServerName servername.com
SSLEngine On
SSLCertificateFile /etc/letsencrypt/live/servername/fullchain.pem
SSLCertificateKeyFile /etc/letsencrypt/live/servername/privkey.pem
ProxyRequests Off
ProxyPreserveHost On
SSLProxyEngine On
ProxyPass / https://127.0.0.1:3000/
ProxyPassReverse / https://127.0.0.1:3000/
# Avoid hop-by-hop header issues
RequestHeader unset Connection
RequestHeader unset Upgrade
RequestHeader unset Proxy-Connection
ProxyTimeout 60
ErrorLog /var/log/httpd/haven-error.log
CustomLog /var/log/httpd/haven-access.log combined
</VirtualHost>
</IfModule>
4b. RESTART HTTPD
If you added a proxy config you will need to restart httpd for it to take effect. If not you can skip this step
sudo systemctl reload httpd
5. CONNECT TO INSTANCE
Install the app from here or visit the server from the WebUI (your domain assigned or IP + port chosen).
6. CONFIGURE SERVER
Create a user matching the admin in the container file, and then setup your server.