pf.conf(5)
and reloading with pfctl -f /etc/pf.conf
SRV
yourdomain.com
_salty
TCP
3600
(One hour)0
(highest)0
443
salty.yourdomain.com
SRV
yourdomain.com
_avatars
TCP
3600
(One hour)0
(highest)0
443
salty.yourdomain.com
pkg_add go nginx
to install the web server/reverse proxy and the toolchainnginx
’s configuration file:server {
listen 80;
listen [::]:80;
server_name salty.yourdomain.com;
return 301 https://$host$request_url;
}
server {
listen 443 ssl;
listen [::]:443 ssl;
server_name salty.yourdomain.com;
ssl_certificate /path/to/salty.yourdomain.com/fullchain.pem; # If you use certbot or dehydrated, use the right paths
ssl_certificate_key /path/to/salty.yourdomain.com/privkey.pem; # Same as above
location / {
proxy_pass http://127.0.0.1:8000;
}
}
go install go.mills.io/saltyim/saltyim/cmd/saltyd@latest
to install the broker/webapp, ideally as its own user (i.e. _salty
)/etc/rc.d/saltyd
:#!/bin/ksh
daemon="/usr/local/salty/saltyd"
daemon_user="_saltyd"
daemon_flags="-b 0.0.0.0:8000 -d /path/to/salty/data -u https://salty.yourdomain.com -p yourdomain.com -s bitcask://path/to/salty/salty.db"
. /etc/rc.d/rc.subr
rc_bg=YES
rc_reload=NO
rc_cmd "$1"
The script has to have the execution bit set (mode 0755)
rcctl enable saltyd nginx
and rcctl start saltyd nginx
to get saltyd
and nginx
running.https://salty.yourdomain.com
and view the PWA