Data, Storage & Backups
Everything your hub stores — the database, uploaded files, HTTPS certificates, and (if enabled) local AI models — lives in a handful of folders on the machine running your hub. This page is about those folders directly: where they are, how to move them, and how backups work.
The five data paths
Section titled “The five data paths”Each is a separate variable in your hub’s .env file (the one your setup script created), and each defaults to its own subfolder under ~/citinet-hub/data/ if you don’t set it:
| Variable | What it holds | Default |
|---|---|---|
DB_DIR |
Postgres database — everything structured: posts, members, messages | ./data/postgres |
FILES_DIR |
Uploaded files and media (MinIO object storage) | ./data/storage |
BACKUP_DIR |
Nightly backups (see below) | ./data/backups |
CADDY_DIR |
HTTPS certificate storage | ./data/caddy |
OLLAMA_DIR |
Local AI model cache, only relevant if you enabled the AI assistant | ./data/ollama |
There’s no single “move everything” switch — each one is an independent bind mount, so you can put your database on a fast internal SSD while your files live on a large external drive, for example.
Moving a path to a different drive
Section titled “Moving a path to a different drive”- Stop the hub:
docker compose down(see Command-Line Reference if you haven’t used these commands before) - Copy the folder to its new location
- Update the matching variable in
.envto point at the new path - Start the hub again:
docker compose up -d
For example, moving just file storage to an external drive on Windows:
docker compose downrobocopy "$env:USERPROFILE\citinet-hub\data\storage" "D:\citinet-hub\storage" /E /MOVEdocker compose up -dBackups
Section titled “Backups”The citinet-backup container runs continuously in the background, writing a fresh database dump and a copy of your files to BACKUP_DIR once every 24 hours. Old backups are deleted automatically after 7 days by default (BACKUP_RETENTION_DAYS in .env if you want to keep them longer).
