Back up, upgrade and move Tamamo
Your settings and your visitors' passes live in the data folder, not in the container, so back up that folder before every upgrade. For what each file holds, see the data folder.
INFO
If you started Tamamo with docker-compose.webui.yml, add -f docker-compose.webui.yml after docker compose in every command on this page.
Treat secret.key like a password
Anyone with secret.key can make valid passes for your sites. Keep backups private. If the key leaks, run docker compose exec tamamo tamamo -rotate-secret and restart Tamamo. That signs every visitor out.
Back up
Stop Tamamo before you copy the folder, so the statistics database is consistent. Visitors can't reach your site while it is stopped, so pick a quiet time.
bash
docker compose stop tamamo
sudo tar -czf "tamamo-backup-$(date +%F).tar.gz" -C ./data .
docker compose start tamamosudo is needed because the container writes the files as user ID 65532.
Restore
- Stop Tamamo:
docker compose stop tamamo. - Move the current data folder aside and make an empty one:
sudo mv data data.old && mkdir data. - Unpack the archive into the data folder:
sudo tar -xzf tamamo-backup-2026-11-01.tar.gz -C ./data. - Give the files back to the container user:
sudo chown -R 65532:65532 ./data. - Start Tamamo:
docker compose start tamamo. Then rundocker compose exec tamamo tamamo -check.
Pin the version
The compose files use :latest, so docker compose pull can jump to a new major version. To choose when you upgrade, pin a version in .env:
text
TAMAMO_VERSION=1.0.0Then point the image at it:
yaml
services:
tamamo:
image: ghcr.io/foxgirlsorg/tamamo:${TAMAMO_VERSION:-latest}Check the running version with docker compose exec tamamo tamamo -version. The web UI image, ghcr.io/foxgirlsorg/tamamo-webui, uses the same kind of tag.
Upgrade
Back up the data folder, as above.
Pull the new image and recreate the containers. Change
TAMAMO_VERSIONfirst if you pin a version.bashdocker compose pull && docker compose up -dCheck the logs. The log should contain
tamamo is protecting your site.bashdocker compose logs --tail=50 tamamo docker compose exec tamamo tamamo -check
If you use the web UI, the same command pulls its image too.
Older files are converted on the first start, and the originals keep a .old or .migrated name. See legacy migration. Settings you don't write keep their defaults, so new settings need nothing from you.
What a restart resets
A restart keeps your settings, secret.key and every visitor's pass. It resets:
- the web UI sign-in sessions, so you sign in again;
- the list of challenges already used;
- the counters of failed checks per IP address, and the counters of the rate limit;
- anything a module keeps only in memory.
Edits to tamamo.yaml don't need a restart. Changes to listen addresses do.
Roll back
A newer version can write settings that an older one doesn't know, and an older version refuses a tamamo.yaml with unknown keys.
- Stop Tamamo:
docker compose stop tamamo. - If the newer version wrote the file, restore the backup you took before the upgrade, as described in Restore.
- Set
TAMAMO_VERSIONto the old version, and rundocker compose up -d.
If you changed nothing since the upgrade, setting the old version is enough.
Move to another server
- On the old server, stop Tamamo and archive
./data, as in the backup step. - On the new server, install Docker, put the compose files in place, unpack the archive into
./data, and runsudo chown -R 65532:65532 ./data. - Set again any environment variables you use, such as
TAMAMO_TARGET,TAMAMO_IP_SOURCEorTAMAMO_ADMIN_DOMAIN. They are not stored intamamo.yaml. See environment variables. - Start Tamamo, and point your DNS records at the new server.
Passes keep working, because secret.key moves with the folder.
Never run two instances on one data folder
Two instances writing to one folder conflict over tamamo.db, and each rewrites tamamo.yaml when you save from the web UI. Stop the old server before the new one starts.
Common problems
- The container keeps restarting after an upgrade. Read
docker compose logs --tail=100 tamamo. The log gives the line of the setting the new version doesn't accept. Fix it, or roll back. permission deniedontamamo.yamlortamamo.db. The files aren't owned by user 65532. Runsudo chown -R 65532:65532 ./data. See permissions.- You can't sign in to the web UI after a restore. Set the login again with
TAMAMO_ADMIN_USERNAMEandTAMAMO_ADMIN_PASSWORD, or rundocker compose exec tamamo tamamo -set-login <username>. See command-line flags.
Related
- Behind a reverse proxy: the proxy settings to keep when you move servers.
- Server settings
- The data folder
