deploy/docker runs Entri with MongoDB and Redis next to it. Optional profiles add Caddy for automatic HTTPS and Typesense for full-text search.
What runs
MongoDB, Redis and Typesense publish no host ports. Only containers on the Compose network can reach them.
Prerequisites
- A Linux host with Docker Engine 24+ and the Compose plugin (
docker compose version) gitandopenssl- For HTTPS: a DNS record (for example
entri.example.com) pointing at the host, with ports 80 and 443 open
Install
1
Get the Compose bundle
deploy/docker (docker-compose.yml, .env.example, Caddyfile). You can copy them anywhere.2
Generate secrets
Generate each value and paste it into Or fill them in with one command:(On macOS, use
.env:sed -i ''.)3
Set the public URL and version
In Replace
.env, set the URL users open in the browser, with no trailing slash, and pin a release:1.2.3 with the latest release. ENTRI_VERSION=latest works too, but then docker compose pull can move you to a new major version.4
Start the stack
Choose how to expose Entri:Wait until
- With HTTPS (Caddy)
- Behind your own proxy
Keep port 3333 off the public interface and let Caddy terminate TLS:Caddy requests a Let’s Encrypt certificate for
ENTRI_DOMAIN on first start. DNS must already point at this host.entri is healthy:5
Create the first account
Open Invited users can still create accounts.
https://entri.example.com and sign up. The first account on an empty instance can always sign up. Then create your organization and first project.To stop strangers from signing up, set this in .env and apply it:TLS and reverse proxies
Bundled Caddy
Thetls profile runs Caddy with this Caddyfile:
caddy_data volume.
Using your own reverse proxy
Any proxy works if it:- passes WebSocket upgrades for the progress channel at
/ws/progress - does not buffer
text/event-streamresponses and allows long-lived connections: imports, AI batch translation and GitHub sync stream their progress as Server-Sent Events - accepts request bodies of at least 10 MB (file imports)
- sets
X-Forwarded-ForandX-Forwarded-Proto
TRUST_PROXY already trusts it. If it has a public IP (for example a cloud load balancer), set TRUST_PROXY to its address range or a hop count. See Server settings.
Search (Typesense)
Without a search provider, Entri searches with MongoDB queries. To use the bundled Typesense:1
Configure it in .env
2
Start it
depends_on with required: false, which needs Docker Compose 2.20 or later.3
Index existing projects
New and changed keys are indexed as you work. Keys that existed before you enabled search must be indexed once per project, as a signed-in user or with an API token from the project’s organization:
SEARCH_PROVIDER=algolia, ALGOLIA_APP_ID and ALGOLIA_API_KEY, and run the same sync.
.env:
docker compose up -d. Entri refuses to start if the chosen provider is missing SMTP_HOST, RESEND_API_KEY or EMAIL_FROM. Check docker compose logs entri after a change.
Backups
All durable data is in MongoDB. The commands below are for the bundledmongo container (the image ships the database tools) and dump only the entri database. If you use an external MongoDB, back it up with your provider’s backups, or run mongodump --uri "$MONGO_URI" --archive --gzip > entri-$(date +%F).archive.gz from a machine with the MongoDB database tools.
Bundled MongoDB:
.env. It holds ENCRYPTION_KEY and BETTER_AUTH_SECRET, which a database backup cannot replace. Store it separately from the database dumps.
You do not need to back up:
- Redis: it holds caches and AI batch-job state that expire within minutes, locks, and progress messages. After a loss, Entri rebuilds what it needs.
- Typesense: rebuild it with the search sync.
- Caddy: certificates are requested again when needed.
Logs and health
ENCRYPTION_KEY is missing or BETTER_AUTH_URL points at localhost.
External MongoDB or Redis
docker-compose.yml always starts the bundled mongo and redis containers and waits for them. To use managed databases, use the standalone docker-compose.external.yml in the same directory. It runs only migrate, entri and the optional caddy (--profile tls), with no MongoDB or Redis containers.
Set the connection strings in .env (MONGO_ROOT_PASSWORD and REDIS_PASSWORD are not needed):
MONGO_URImust include the database name in the path (/entri). Migrations refuse to run without it. See Database settings.- A replica set (or Atlas) is recommended. A standalone
mongodworks withMONGO_TRANSACTIONS=false, at the cost of weaker guarantees on auth writes. - Pass
-f docker-compose.external.ymlto everydocker composecommand, includingpull,logsandps.
Building from source
Indocker-compose.yml, replace the image: line under x-entri with the commented build: block:
Upgrading
migrate service applies migrations before the new entri container starts. Back up first. See Upgrading.