Skip to main content
New to this? Read How Socketchat works first.
A VPS (virtual private server) is a small Linux machine you rent from a cloud provider by the month. It stays on, has its own public IP address, and keeps your home address out of the picture. The smallest plan most providers offer is enough to start. You need:
  • 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 turn ufw on for the first time, allow SSH first with sudo 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:
Join with that link from your own computer, as in the Quick start. 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

Servers and apps from different releases work together, so you can update the server before or after your members. A feature that needs a newer server says so in the app and leaves the rest working.

Next

Server settings and backups covers the config file, limits, cleanup of old data and backups.