Backup and restore
Tusile has no one-click backup button. You use standard tools: a Postgres dump for the database, an archive of the data volume, and a copy of the uploaded files (a Docker volume or an S3 bucket). Take all of them at the same point in time when you can, so attachment paths in the database still match the files.
What to back up
Section titled “What to back up”| What | Where it lives | Why it matters |
|---|---|---|
| Database | the postgres service, volume community-pgdata |
Channels, messages, roles, invites, members and settings. A logical dump (pg_dump) is enough for backup and migration. |
| Data volume | community-data, mounted at /app/data (DATA_DIR) |
The install ID, an unused Offgrid owner claim token and, on an Offgrid server, community_key. A few small files; back them up every time. |
| Uploads (local storage) | community-uploads, mounted at /app/uploads |
Every attachment, emoji and icon, with the default STORAGE_BACKEND=local. |
| Uploads (S3) | your bucket | With STORAGE_BACKEND=s3, the bucket is the source of truth. Use your provider’s versioning, replication or export tools. |
| Config | .env, Caddyfile, livekit.prod.yaml |
.env holds the server token and the LiveKit keys, so store it as carefully as the dumps. |
Find your volume names
Section titled “Find your volume names”Named volumes are prefixed with the Compose project name, which comes from COMPOSE_PROJECT_NAME in .env. The setup script writes it for new installs as community-<hash> (community-offgrid-<hash> for Offgrid), so the volumes are community-<hash>_community-pgdata, community-<hash>_community-uploads and community-<hash>_community-data.
Installs from before 30 July 2026 have no COMPOSE_PROJECT_NAME line, and Compose falls back to community-${SERVER_TOKEN}, so their volumes look like community-<token>_community-pgdata. That fallback is kept on purpose: adding the line to an existing .env would orphan your database and uploads. Leave it alone.
List the exact names with:
docker volume lsRun every docker compose command from the same folder and .env you use in production, so the project name matches. The commands below use the bundle’s Postgres user and database, both tusile_community; use your own values if you changed them.
Back up
Section titled “Back up”Database
Section titled “Database”From the folder with your docker-compose.yml, with the stack running.
Custom format, restored with pg_restore (recommended):
docker compose exec -T postgres pg_dump -U tusile_community -d tusile_community -Fc > tusile_community.dumpPlain SQL, restored with psql:
docker compose exec -T postgres pg_dump -U tusile_community -d tusile_community --clean --if-exists > tusile_community.sqlStore dump files securely: they contain your community’s data. On Windows, PowerShell’s > works with -T on docker compose exec; Git Bash or WSL work too.
Data and uploads volumes
Section titled “Data and uploads volumes”Replace PROJECT with your project name from docker volume ls:
docker run --rm -v PROJECT_community-data:/data -v "$(pwd):/backup" alpine tar czf /backup/data.tgz -C /data .docker run --rm -v PROJECT_community-uploads:/data -v "$(pwd):/backup" alpine tar czf /backup/uploads.tgz -C /data .On Windows without a Unix shell, find the mountpoint with docker volume inspect and archive that folder with your own tool, or run the commands from WSL or Git Bash.
Restore on a fresh install
Section titled “Restore on a fresh install”-
Set up the new host or folder with the same configuration as before. Copying the old
.envis simplest. A Cloud server re-registers as the same community fromSERVER_TOKENandCOMMUNITY_PUBLIC_URL. On Offgrid keepOFFGRID_MODE=true; the identity comes from the data volume you restore below. -
Start Postgres only, so nothing writes to the database during the restore:
Terminal window docker compose up -d postgres -
Restore the database.
Custom-format dump:
Terminal window docker compose cp tusile_community.dump postgres:/tmp/tusile_community.dumpdocker compose exec postgres pg_restore --clean --if-exists -U tusile_community -d tusile_community /tmp/tusile_community.dumpPlain SQL:
Terminal window docker compose exec -T postgres psql -U tusile_community -d tusile_community < tusile_community.sql -
Restore the data and uploads volumes (empty them first if the stack already ran on this host):
Terminal window docker run --rm -v PROJECT_community-data:/data -v "$(pwd):/backup" alpine sh -c "cd /data && tar xzf /backup/data.tgz"docker run --rm -v PROJECT_community-uploads:/data -v "$(pwd):/backup" alpine sh -c "cd /data && tar xzf /backup/uploads.tgz" -
Start the full stack:
Terminal window docker compose up -dThe community server runs migrations on startup. With a restored database they are no-ops or small incremental steps.
Moving to a newer server version or a new Postgres major version is covered in Upgrades.