Once SocialMate is installed, you’ll want it to stay up on its own. This page answers the common “what happens if…” questions.
If it crashes, does it restart itself?
Yes — automatically, on both.
- Docker: the compose file sets
restart: unless-stopped, so Docker relaunches the container if it ever exits or crashes. - systemd: the service is set to
Restart=on-failure(with a 5-second back-off), so systemd relaunches it if it fails.
Will it come back after the server reboots?
This is the important one for a VPS — you want it up again after any reboot without logging in.
systemd — yes, automatically
The installer already ran systemctl enable socialmate, so the service starts on every boot. Confirm any time:
systemctl is-enabled socialmate # → enabled
If it ever says disabled, turn it back on with sudo systemctl enable socialmate.
Docker — yes, as long as Docker itself starts on boot
restart: unless-stopped only kicks in once the Docker service is running — so the Docker daemon has to be enabled on boot too. It usually is on Ubuntu/Debian, but make sure:
sudo systemctl enable docker
With that in place, your container comes back on its own after every reboot.
One exception. If you deliberately stopped the container (docker compose stop or down), Docker leaves it stopped after a reboot — that’s on purpose. Start it again with docker compose up -d.
Do my linked accounts reconnect too?
On Pro, yes — automatically. When the server restarts, every linked WhatsApp account comes back online on its own (on by default; toggle it under Settings → Server → Auto-reconnect accounts on restart in the console). On Free you reconnect them yourself — the quickest way is Settings → Server → Reconnect all, which brings every disconnected account back in one click.
Restart, stop, start — the everyday commands
Run these from your ~/socialmate folder (Docker) or anywhere (systemd):
| What you want | Docker | systemd |
|---|---|---|
| Restart | docker compose restart |
sudo systemctl restart socialmate |
| Stop | docker compose stop |
sudo systemctl stop socialmate |
| Start | docker compose up -d |
sudo systemctl start socialmate |
| Status | docker compose ps |
systemctl status socialmate |
| Live logs | docker compose logs -f |
journalctl -u socialmate -f |
The live logs carry every log line (one JSON object per line). The same lines are also kept as daily files in the data dir: /data/.wa-agent-server/logs/sm-YYYY-MM-DD.log inside the Docker volume, or /var/lib/socialmate/.wa-agent-server/logs/sm-YYYY-MM-DD.log on systemd. Set SM_LOG_LEVEL to debug, warn or error (default info) to change how much is logged.
Restarting is safe and quick: your linked accounts stay linked (the WhatsApp session lives in the data dir) and the server reconnects on its own.
Updating to a new version
- Docker:
docker compose pull && docker compose up -d - systemd:
sudo socialmate-update
Started it with a docker run command instead of Compose? docker compose pull won’t work for it. Pull the image, remove the container, and run it again on the same volume — with exactly the flags you used the first time:
docker pull ghcr.io/micbwilliam/socialmate-server:latest
docker rm -f socialmate
# then re-run YOUR original docker run command, every -p and -e flag included, e.g.:
docker run -d --name socialmate --restart unless-stopped -p 3456:3456 -v sm-data:/data ghcr.io/micbwilliam/socialmate-server:latest
Dropping a flag is not harmless: losing -p 127.0.0.1:3456:3456 publishes plain HTTP on every interface again (past ufw), and losing an -e SOCIALMATE_VAULT_KEY=… leaves your saved tunnel tokens unreadable. If you customised the command, consider switching to Compose, which keeps the settings in a file.
Database migrations run automatically on the next boot, and your accounts, settings, and license seat survive — they’re in the persisted data dir. See what changed in each release on the changelog.
The console checks for you: open Settings → Updates and it tells you whether a newer release is out and gives you the exact command to run, with one-click Copy. It won’t apply the update for you — for safety the server runs unprivileged and can’t replace its own code or restart its own service — so you run that one command on the host. Docker users who’d rather not think about it can run Watchtower to auto-pull new images.

Back up before a big upgrade
Migrations are forward-only, so take a backup first. Stop the server so the database isn’t copied mid-write, and keep the archive private: it holds the vault key, the database and your WhatsApp sessions — anyone with the file can read your messages and take over the linked numbers. On Docker (Compose or docker run), from the folder you want the backup in:
docker stop socialmate
docker run --rm --volumes-from socialmate -v "$PWD":/backup busybox
sh -c "umask 077 && tar czf /backup/sm-data-backup.tgz -C /data . && chown $(id -u):$(id -g) /backup/sm-data-backup.tgz"
docker start socialmate
--volumes-from socialmate reaches the container’s own data volume whatever it is called (Compose names it <folder>_sm-data, not sm-data), and the archive ends up owned by you with mode 600.
Restore it into the container’s volume — this replaces everything in it. On a new server, create the container first without starting it (docker compose up --no-start, or your original docker run with docker create in place of docker run -d):
docker stop socialmate
docker run --rm --volumes-from socialmate -v "$PWD":/backup busybox
sh -c 'rm -rf /data/* /data/.[!.]* /data/..?* ; tar xzf /backup/sm-data-backup.tgz -C /data && chown -R 10001:10001 /data'
docker start socialmate
Securing the login with HTTPS
A VPS has a public IP, so you can reach http://<ip>:3456/admin straight away — but over plain http your password travels in cleartext and the login cookie can’t be marked secure. Before you depend on it, put TLS in front. Two easy options:
- A reverse proxy such as Caddy, which fetches a free Let’s Encrypt certificate automatically. Point a subdomain at your server and proxy it to
127.0.0.1:3456. Then keep port 3456 itself off the network: on Docker, publish it as"127.0.0.1:3456:3456"(Docker’s published ports bypass ufw, so a firewall rule alone does not close them). - The Pro named tunnel — turn it on in Settings → Network. Cloudflare terminates TLS and gives you a stable HTTPS hostname with no open port at all.
On systemd, install.sh --domain your.domain sets up the reverse proxy for you — Caddy, the certificate, and binding the server to 127.0.0.1 — see the systemd guide.
The exact reverse-proxy recipe is in the self-hosting docs.
Server settings you may want
Set these in the compose file’s environment: (Docker) or in /etc/socialmate/socialmate.env (systemd), then restart:
| Variable | What it does | Default |
|---|---|---|
SOCIALMATE_PUBLIC_URL |
The address the WordPress token, n8n credentials and MCP config name (http(s)://, not loopback) — see reaching it from WordPress, n8n and MCP. |
unset (the console suggests its own address for you to confirm) |
SOCIALMATE_API_HOST |
The address the server listens on. 127.0.0.1 keeps port 3456 off the network when a reverse proxy on the same machine fronts it. |
0.0.0.0 (install.sh --domain writes 127.0.0.1) |
SOCIALMATE_TRUST_PROXY |
Which proxies’ X-Forwarded-For / -Proto headers to believe: comma-separated addresses or CIDRs, or loopback, linklocal, uniquelocal (true = any). The client address it yields feeds the audit log and the login lockout. |
loopback,linklocal,uniquelocal |
SM_LOG_LEVEL |
How much is logged: debug, info, warn or error. |
info |
SOCIALMATE_TELEMETRY |
Set 0 to switch usage analytics off from the first boot (DO_NOT_TRACK=1 works too). |
on |
Change your admin password
Signed in? Open Settings → Server and set a new password. It takes effect immediately and signs out any other open sessions — no restart, no command line.

Lost it and can’t sign in? See Troubleshooting → reset the admin password for the recovery steps.