Snikket
Based off official Snikket docker.
Install
Set up the docker, check official quickstart guide and its reverse proxy settings.
DNS
Configure DNS records:
A sendly.cc 144.217.13.168
A chat.zcyph.cc 144.217.13.168
CNAME groups.chat.zcyph.cc chat.zcyph.cc
CNAME share.chat.zcyph.cc chat.zcyph.cc
Snikket Config
Create snikket.conf in the same dir:
SNIKKET_DOMAIN=chat.zcyph.cc
SNIKKET_ADMIN_EMAIL=xmpp@zcyph.cc
SNIKKET_TWEAK_HTTP_PORT=5080
SNIKKET_TWEAK_HTTPS_PORT=5443
SNIKKET_WEB_APPLE_STORE_URL=https://apps.apple.com/us/app/snikket/id1545164189
NGINX
Create an nginx virtualhost /etc/nginx/conf.d/chat.zcyph.cc.conf:
server {
# Accept HTTP connections
listen 80;
listen [::]:80;
server_name chat.zcyph.cc;
server_name groups.chat.zcyph.cc;
server_name share.chat.zcyph.cc;
location / {
proxy_pass http://localhost:5080/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# This is the maximum size of uploaded files in Snikket
client_max_body_size 104857616; # 100MB + 16 bytes
}
}
server {
# Accept HTTPS connections
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate /etc/letsencrypt/live/xmpp.zcyph.cc/fullchain.pem; # managed by Certbot
ssl_certificate_key /etc/letsencrypt/live/xmpp.zcyph.cc/privkey.pem; # managed by Certbot
server_name chat.zcyph.cc;
server_name groups.chat.zcyph.cc;
server_name share.chat.zcyph.cc;
location / {
proxy_pass https://localhost:5443/;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
# REMOVE THIS IF YOU CHANGE `localhost` TO ANYTHING ELSE ABOVE
proxy_ssl_verify off;
proxy_set_header X-Forwarded-Proto https;
proxy_ssl_server_name on;
# This is the maximum size of uploaded files in Snikket
client_max_body_size 104857616; # 100MB + 16 bytes
}
}
user@tld
Optional additional settings to get user@tld instead of user@chat.tld, wasn't able to get it working yet:
SRV _jabber._tcp 0 0 5269 chat.zcyph.cc Auto
SRV _xmpp-client._tcp 0 0 443 chat.zcyph.cc Auto
SRV _xmpp-client._tcp 0 5 5222 chat.zcyph.cc Auto
SRV _xmpp-server._tcp 0 0 443 chat.zcyph.cc Auto
SRV _xmpp-server._tcp 0 5 5269 chat.zcyph.cc Auto
A ns-snikket 51.38.128.6 Auto
NS snikket ns-snikket.zcyph.cc Auto
CNAME _acme-challenge cert.snikket.zcyph.cc Auto