gaia commands from your install folder (~/gaia by default).
Quick reference
Data Persistence
All your data lives in Docker volumes, so updates and restarts keep it.The volumes (all start with gaia-selfhost_)
The volumes (all start with gaia-selfhost_)
Backups
./backups/. To restore the newest backup:
- MongoDB: users, sessions, chats, settings, saved provider keys and the instance secret
- PostgreSQL: agent and conversation state
- Files and workspaces: the
filesandworkspacevolumes - Your
apps/api/.env
More backup and restore options
More backup and restore options
2026-08-27T09-30-00Z, so a second backup never overwrites the first. A run that fails part-way leaves no files.gaia restore puts apps/api/.env back first and restarts GAIA. That file holds INSTANCE_SECRET. With explicit --mongo, pass the same run’s --env file, or the restore warns and keeps the current secret.Backing up without the CLI
Backing up without the CLI
Run from For a fully consistent Mongo snapshot, run
infra/docker/. Keep the stamp format so gaia restore --from finds the files.stop gaia-backend arq_worker before the dump and start gaia-backend arq_worker after. pg_dump is safe on a live stack.To restore MongoDB, then PostgreSQL (restart the app containers afterwards):Backing up ChromaDB and RabbitMQ (optional)
Backing up ChromaDB and RabbitMQ (optional)
ChromaDB’s vectors can be rebuilt from your content, but a backup saves the re-embedding. Stop the writers first:To restore, untar into a fresh volume before starting GAIA:RabbitMQ holds only temporary messages and is rebuilt on boot. To keep custom queue setup, export it. The file contains password hashes, so treat it like a credential:
Memory sizing
GAIA needs 8 GB of RAM. It starts in less, but the embedding model loads about 1.8 GB into bothgaia-backend and arq_worker, on top of the databases. On smaller machines the system kills processes the first time memory features run, not at boot.
Upgrades
.env files and backups/ stay. If the download or pull fails, nothing changes. For a newer GAIA, update the CLI first, then run it again.
Updating without the CLI
Updating without the CLI
From the install folder, with the download step for your new version Delete any file the old
V:gaia-selfhost.json listed that the new one doesn’t. Set GAIA_VERSION=v0.7.0 in infra/docker/.env, then from infra/docker/:More about updates
More about updates
gaia update checks the download against its checksum, swaps in the new setup files (removing any the release dropped), pins GAIA_VERSION in infra/docker/.env, restarts, and prints the old and new version.An install made by an older gaia up is a git checkout. Its next gaia update converts it: tracked files and .git are removed, and your .env files and backups/ stay. A checkout on a branch, or with local edits, is refused and pointed at gaia update --git. Contributors use gaia update --git to pull and rebuild from source.After an update that changes the embedding model, old vectors can go stale. Failures are logged and flagged for reindexing instead of stopping writes. Watch for them:The instance secret
On first boot GAIA makes a root secret. It signs sessions and encrypts your saved AI keys.gaia up writes it to INSTANCE_SECRET in apps/api/.env.
If you lose the secret, every session ends and every saved key becomes unreadable. Keep your backups current.
Rules for the secret
Rules for the secret
INSTANCE_SECRETinapps/api/.envalways wins over the stored value.- Without it, GAIA keeps a generated secret in MongoDB (the
instance_settingscollection). Its only copy is in your Mongo backups. - Set
INSTANCE_SECRETbefore you save any provider keys. The value must match whatever encrypted them. - Never set a fresh random value on an instance whose keys were encrypted under another secret. It orphans every saved key.
Uninstalling
gaia up picks it back up. Deleting offers a backup to ~/gaia-backups first. For no questions, use gaia uninstall --yes (keeps data) and add --delete-data to delete it.
What it removes, and cleaning up by hand
What it removes, and cleaning up by hand
It removes GAIA’s containers, networks and images, the Remove the CLI with
gaia.local name and its portless service, the install folder and ~/.gaia. If you kept the data, the volumes and the .env files stay.To delete data an uninstall kept:npm rm -g @heygaia/cli (or pnpm remove -g / bun remove -g). Docker, Node.js, portless and avahi-utils stay.Troubleshooting
Ollama connection test fails
Ollama connection test fails
Check that Ollama runs:
curl http://localhost:11434/api/tags. On Linux, start it with OLLAMA_HOST=0.0.0.0 ollama serve so containers can reach it. GAIA connects through http://host.docker.internal:11434.Something else is broken
Something else is broken
Run
gaia doctor. It checks Docker, containers, every dependency, the web app, disk and memory, and prints a fix for each problem.
