Skip to content

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.

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.

  1. Stop the hub: docker compose down (see Command-Line Reference if you haven’t used these commands before)
  2. Copy the folder to its new location
  3. Update the matching variable in .env to point at the new path
  4. Start the hub again: docker compose up -d

For example, moving just file storage to an external drive on Windows:

\citinet-hub\storage
docker compose down
robocopy "$env:USERPROFILE\citinet-hub\data\storage" "D:\citinet-hub\storage" /E /MOVE
docker compose up -d

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).