Linux

Where Does a Tuwunel Server Store Data?

Tuwunel reads tuwunel.toml and keeps its RocksDB database under database_path (/var/lib/tuwunel by default). Back up both.

Last updated

Tuwunel configures through tuwunel.toml: server_name, ports, registration, federation, media, and call (livekit) blocks. Packages and guides place it at /etc/tuwunel/tuwunel.toml, and the 4000-line example file documents every knob. Env vars (TUWUNEL_*) or -c/-O flags override any value, which Docker setups lean on heavily.

The database is RocksDB under database_path, defaulting to /var/lib/tuwunel. It holds rooms, messages, media metadata, and device keys: the entire homeserver. Docker mounts that path as a volume, so the volume plus the toml is the backup pair. Stop cleanly before copying; mid-migration kills corrupt the store, which is why the image ships a long stop timeout.

Where Tuwunel stores this, by platform

Linux
/etc/tuwunel/tuwunel.toml

server_name, registration, federation, media, livekit blocks. Copy from tuwunel-example.toml and set server_name plus database_path first. Env vars override any key for container use.

Linux
/var/lib/tuwunel (database)

Rooms, messages, media, and device keys in RocksDB. Mount persistently (Docker volume or host bind). This plus the toml is the full backup; neither half restores alone.

Frequently asked questions

how do i back up tuwunel

Stop the server and copy tuwunel.toml plus the database_path directory together. Media, messages, and device keys travel in RocksDB. Restore to identical paths (or update the toml) and keep file ownership.

can i change the tuwunel server name later

Effectively no. server_name becomes the @user:server identity across federation on first use. Pick the final domain before opening registration; changing it later strands every account and room alias.

Notice an outdated path? Let us know.