For server operators

Recover a snug server

Finish interrupted work, restore a backup, or get admin access back.

snug is built to finish interrupted work, but only if the evidence is intact. Run every command on this page from the private snug/ folder, and keep state/operations/, state/.env, and the named Docker volumes. Deleting them to force progress destroys the way back.

cd /path/to/snug

Finish an interrupted backup, update, or restore

If a backup, update, or restore was interrupted, run:

./snug-ops recover

Recovery either completes the work or returns safely to the previous server. Run ./snug-ops status afterward to confirm which one happened.

Restore a backup on the same host

Use restore when no other operation is in progress and the backup matches the running server release; snug-ops refuses a mismatch before live data changes.

./snug-ops restore /path/to/snug-backup

The command spells out what will happen (messages and uploads return to the backup's state) and asks you to type yes. It verifies the backup before making it live and keeps the current data for recovery.

Move to a new host

Restoring a backup onto a new host is unsupported. Don't install the existing license there: the license moves before restore can confirm the backup matches, and there's no way back from that halfway state. Keep the old snug/ folder and volumes, the backup, and the original .lic file so the existing server remains recoverable.

Recover admin access

If nobody has joined yet and you lost the admin setup code, replace SNUG_ADMIN_SETUP_CODE in state/.env with at least 16 letters, digits, underscores, or hyphens, then run:

./snug-ops restart

The replacement is the new admin setup code. It stops working when the first admin account exists. After that, admission settings belong to the admins inside snug.

If one admin can still sign in, ask them to make a one-time sign-in code for the locked-out person. That's the shortest and safest path.

If no admin can return, promote an existing member from the host:

./snug-ops admin list

Pick someone from that list who can still sign in, and pass the nickname exactly as admin list printed it:

./snug-ops admin restore --nickname "existing name"

Host recovery cannot create a person or print a sign-in secret. The promoted admin then makes a one-time code for whoever else is locked out.

Find the failing part

  • The address doesn't open: check the DNS A record and TCP 80 and 443, then run ./snug-ops logs.
  • Calls fail or report TCP: check that every firewall and router allows UDP and TCP 40000-40400 and that install used the reachable public IPv4 address.
  • The license is locked: run ./snug-ops license status. Reinstall a license only when you intend to move it back to this host.
  • Media links fail while chat works: run ./snug-ops logs, retry the link once, and keep the error for support.
  • Backup, update, or restore refuses to start: keep state/operations/current.json, then run ./snug-ops recover.

Rolling back a release is a last resort. ./snug-ops help advanced describes it, and snug-ops allows it only when it can prove the data did not migrate. Force old code onto migrated data and a backup becomes the only way back.

If these steps don't bring the server back, see what to include when asking for help.