Remote Deployment
This guide covers the production self-hosted path for Hoard using Docker + Caddy TLS.
Prerequisites
- A host with Docker and Docker Compose
- A DNS record pointing to your host
- Open ports
80and443
Recommended Path (Docker + Caddy TLS)
-
Clone Hoard on the server
Terminal window git clone https://github.com/thrr87/hoard.gitcd hoard -
Prepare deploy environment
Terminal window cp deploy/.env.example deploy/.envEdit
deploy/.env:HOARD_DOMAIN=your-domainHOARD_SERVER_SECRET=long-random-secret
-
Start services
Terminal window docker compose -f deploy/docker-compose.yml --env-file deploy/.env up -d --build -
Verify health
Terminal window curl -s https://your-domain/healthExpect JSON with
"status": "ok","db_ready": true, and"migrations_pending": false. -
Create client token(s)
Terminal window hoard tokens add codex-laptop --scopes search,get,memory,sync,ingest
Data Directory
In the Docker deployment, Hoard uses:
HOARD_DATA_DIR=/data- Persistent volume mounted at
/data
This controls default locations for:
config.yamlhoard.dbserver.keyartifacts/- daemon/log/sync lock files
Connect Clients to Remote Hoard
Recommended flow (manual token):
hoard setup remote --url https://your-domain --token hoard_sk_... --codexAdvanced automation flow (auto-provisions one token per client type):
hoard setup remote --url https://your-domain --admin-token YOUR_SERVER_SECRET --allRemote Bind Protection
Hoard defaults to loopback-only binding. Non-loopback bind requires explicit opt-in:
hoard serve --host 0.0.0.0 --allow-remoteOr in config:
server: allow_remote: trueSSH Tunnel Alternative
If you do not want to expose Hoard publicly:
ssh -N -L 19850:127.0.0.1:19850 user@your-serverThen clients use http://127.0.0.1:19850/mcp.
Availability Behavior (v1)
Hoard clients use best-effort retries for transient network failures. There is no durable offline write queue in v1.