New to this? Read How Socketchat works first.
- a Linux VPS from any provider, such as Hetzner or DigitalOcean. Pick Ubuntu 22.04 or newer, or Debian 12 or newer;
- a domain name you control, such as
example.com; - SSH access to the VPS.
Set it up
1
Point a name at the server
In your domain’s DNS settings, add an A record: a DNS entry that points a name at an IPv4 address.
That makes
chat.example.com reach the VPS. Changes can take a few minutes to spread. Check with ping chat.example.com from your own computer.2
Open port 7444
Allow incoming TCP on port 7444 in two places:
-
On the VPS, if it runs
ufw:If you turnufwon for the first time, allow SSH first withsudo ufw allow OpenSSH, or you lock yourself out. - In the provider’s firewall, often called a cloud firewall or security group, if your VPS has one. Add an inbound rule for TCP port 7444.
3
Install Socketchat
On the VPS:The installer puts the program in
~/.local/bin/socketchat.4
Make a user and a data folder for the server
Run the server as its own user, with its data in
/var/lib/socketchat:5
Set up the server with your domain name
init writes socketchat-server.toml, makes the certificate and prints its fingerprint.Run it as a service
systemd is the program that starts and watches services on most Linux systems. This unit comes from the project’s server guide. Save it as/etc/systemd/system/socketchat.service:
/etc/systemd/system/socketchat.service
KillSignal=SIGINT sends the same signal as Ctrl-C, which the server handles by closing connections and stopping cleanly. Start it, then make your own invite:
journalctl -u socketchat shows the address and certificate fingerprint the server printed at start.
Update the server
1
Get the new release
Run the installer again on the VPS. It replaces
~/.local/bin/socketchat with the newest release.2
Back up the data folder
See Back up.
3
Swap the program and restart