Note: this guide is based on Alpine Linux setups, but you may use them for other distributions as well.
yoursalty.domain.com
to the public-routable IP address of your system, ensure proxy is checked.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
Run: apk add go nginx
to install the web server/reverse proxy and the toolchain
Use the following snippet and then add it to nginx
’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;
}
}
Run: go install go.mills.io/saltyim/saltyim/cmd/saltyd@latest
to install the broker/webapp, ideally as its own user (i.e. _salty
)
Use the following snippet for OpenRC:
#!/sbin/openrc-run
depend() {
need net
use dns
}
command="/path/to/saltyd"
command_args="--base-url salty.yourdomain.com --bind 0.0.0.0:8000 --primary-domain yourdomain.com --store bitcask://path/to/saltyd_directory/saltyim.db --data /path/to/saltyd_directory/data"
command_background=true
command_user="_salty:_salty"
procname="saltyd"
Run: rc-update add saltyd default
and rc-service saltyd start
to get saltyd
running
If there are no issues, you should be able to visit https://salty.yourdomain.com
and view the PWA