For self-hosters
Recover your own snug server
Finish interrupted work, restore a backup, or get admin access back.
snug resumes interrupted work if it still has its operation records. Run
recovery commands from the private snug/ folder:
cd /path/to/snug
Recovery needs state/operations/, state/.env, and the server's Docker
volumes. The volume names start with snug_ unless you installed with
--name. Keep them so snug can resume interrupted work.
Finish an interrupted backup, update, or restore
./snug-ops recover
recover either completes the work or returns to the previous server. Run
./snug-ops status afterward to see which. When nothing stopped partway, it
prints Nothing to recover and changes nothing.
Restore a backup on the same host
Restore when no other operation is running. restore verifies an older backup
with its original release, then upgrades its data to the current release. For
a backup from a newer release, update the server before you restore.
restore refuses the newer backup before changing live data.
./snug-ops restore /path/to/snug-backup
Type yes to confirm, because messages and uploads go back to the backup's
state. restore verifies the backup before making it live, and keeps the
current data so recover can return to it.
The restored server keeps its current address, call ports, front-door ports,
license, and the public address calls announce. Every other line in
state/.env, the backup lines included, goes back to the backup's value. A
backup from before an address change still answers at today's address.
Move to a new host
A backup moves the whole server: its messages, members, uploads, and settings.
Keep the old snug/ folder, its volumes, the backup, and your .lic file
until the new host serves.
-
On the old host, make a backup and stop snug, so nothing said afterwards stays behind:
./snug-ops backup ~/snug-move ./snug-ops stopCopy
~/snug-moveand your.licfile to the new host. -
Point the server's domain at the new host. Members stay signed in when the address stays the same.
-
On the new host, set up snug with the same address. When it asks for the license, press Enter to add it later.
-
Check the backup:
./snug-ops verify ~/snug-move -
Move the license, then restore right away, so nobody finds an empty server in between:
./snug-ops license install /path/to/your.lic ./snug-ops restore ~/snug-moveThe license leaves the old host, which stops letting members in at its next license check. The new host keeps its own address, call ports, and license, and takes every other setting from the backup.
To bring only the messages, members, and uploads and keep the new host's
settings, make the backup with ./snug-ops backup ~/snug-move --data-only and
restore it with ./snug-ops restore --import ~/snug-move. verify doesn't
read that kind of backup.
To call the move off, run ./snug-ops license install with the same .lic
file on the old host, then ./snug-ops start.
A server can move to snug hosting instead, with snug-ops export. Bring a
server you run yourself walks
through it.
Bring a server from snug hosting
A hosted server's owner downloads a backup from Backups in snug hosting:
download a backup. The .tar file holds
the server's messages, members, and uploads. It restores onto a server you
run, which keeps its own address, settings, and license. Set up your own
server first. The copy comes from snug's newest release, so
update yours, then import it:
./snug-ops upgrade
mkdir ~/snug-export
tar -xf /path/to/the-download.tar -C ~/snug-export
./snug-ops restore --import ~/snug-export
Type yes to confirm. The import replaces this server's messages, members,
and uploads. Then delete ~/snug-export and the file; they hold every message.
Each browser and app stays signed in only at the address it joined through. If the hosted server used your own domain, point its DNS at this machine and move this server to that address. Otherwise everyone signs in again at this server's address, as if every device is gone describes.
Recover admin access
If nobody has joined yet and you've lost the admin setup code, replace the
SNUG_ADMIN_SETUP_CODE line in state/.env with at least 16 letters, digits,
underscores, or hyphens. Then run:
./snug-ops restart
The new value is the admin setup code. It stops working once the first admin account exists, and the line does nothing after that.
If an admin can still sign in, ask them to make a one-time sign-in code for whoever is locked out.
If no admin can sign in, promote an existing member from the host. List the people on the server:
./snug-ops admin list
Choose someone who can still sign in. Use the nickname exactly as admin list
printed it:
./snug-ops admin restore --nickname "existing name"
Host recovery can't create a person or print a sign-in secret. The promoted admin then makes one-time sign-in codes for anyone else who's locked out.
Find the failing part
Run ./snug-ops status. If it says Needs attention, use the command on the
next line.
If the address doesn't open
Check the domain's A record and that TCP 80 and 443 reach the host, then read
./snug-ops logs. An empty error page means the machine answers but snug itself
doesn't. If status reads Stopped, run ./snug-ops start.
If calls fail or connection info shows TCP
Run ./snug-ops ports. Every firewall and router in front of the machine must
allow the call ports: UDP and TCP 40000-40400, unless you chose others at
install. Calls must also announce the public IPv4 address that reaches the
machine, and ports warns when they don't. If that address changed, run
./snug-ops address --ip with the new one.
If the license is locked
Run ./snug-ops license status. Its output is safe to share with the snug team.
Install a license again only to move it back to this host.
If media links fail while chat works
Run ./snug-ops logs, retry the link once, and keep the error for the snug
team.
If someone keeps dropping out
Run ./snug-ops logs and look for their name.
[connection]lines show when the app disconnected and why.ping timeoutmeans it stopped responding.transport closemeans its connection closed.[voice]lines show failed call steps and reconnects.is holding its callmeans the call stayed open while the app reconnected.took its call backmeans the app rejoined without a visible drop for others.
If the kernel dropped lines appear at the same times, the server fell behind
reading call traffic. Run ./snug-ops doctor. If it warns about
net.core.rmem_max, run ./snug-ops prepare. Keep the lines for the snug team
if drops continue.
If a share freezes for one viewer
A cannot keep up with the screen share from line names a viewer whose
connection can't carry the video it receives: for ten seconds or more they
asked for a fresh picture at least every two seconds while the server's
estimate of their connection sat under everything it sends them, every share
and camera together. Every request makes the sharer encode a keyframe that
every other viewer receives too, so the share gets heavier for everyone. A
keeps up with line closes it. The server doesn't slow the share for one
viewer. Ask that viewer to move to a better network, or the sharer to lower
sharpness or smoothness in Settings > Video. If you watch the server's
metrics, snug_voice_video_viewers_starving counts these viewers.
If screen shares never use AV1
Run ./snug-ops logs and look for started a. A Windows native screen share
line names its codec and why the app chose it. A WebRTC screen share line
means the share didn't use the Windows desktop app's own encoder, so it can't be
AV1.
If a backup, update, or restore refuses to start
Run ./snug-ops status. Running now: means another snug-ops command is
still working on the server, so let it finish. Operation needs recovery:
means one stopped partway. Keep state/operations/, then run
./snug-ops recover.
Roll back a release
Rolling back is a last resort, and ./snug-ops help advanced lists its forms.
Rolling back the code alone works only when the update didn't migrate the
database. Otherwise the rollback restores the update's safety backup and
loses everything written since the update.
A rollback switches this folder back to the earlier release and pins updates,
so the next update window doesn't update the server again. When you're ready
for new releases, run ./snug-ops updates follow.
If these steps don't bring the server back, write to the snug team with what to send.