Skip to main content
The Compose bundle in 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)
  • git and openssl
  • 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

You only need the three files in deploy/docker (docker-compose.yml, .env.example, Caddyfile). You can copy them anywhere.
2

Generate secrets

Generate each value and paste it into .env:
Or fill them in with one command:
(On macOS, use sed -i ''.)
Use URL-safe passwords for MongoDB and Redis: they become part of the connection strings. The hex values above are safe. Back up ENCRYPTION_KEY now. Without it, Entri cannot decrypt the AI keys that organizations store.
3

Set the public URL and version

In .env, set the URL users open in the browser, with no trailing slash, and pin a release:
Replace 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:
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.
Wait until entri is healthy:
5

Create the first account

Open 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:
Invited users can still create accounts.
Profiles must be passed on every docker compose command, or the services they add are left out. To avoid that, put them in .env: COMPOSE_PROFILES=tls,search.

TLS and reverse proxies

Bundled Caddy

The tls profile runs Caddy with this Caddyfile:
Caddy proxies WebSockets and streams Server-Sent Events without extra configuration. Certificates are stored in the 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-stream responses 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-For and X-Forwarded-Proto
Do not add response compression in the proxy. Entri compresses responses itself and skips event streams. Example for nginx:
If the proxy runs on the same host or a private network, the default 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

Always set TYPESENSE_API_KEY. If it is empty, the Typesense container starts with the key change-me.
2

Start it

With the profile active, Entri waits until Typesense passes its healthcheck. This uses 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:
To use Algolia instead, set SEARCH_PROVIDER=algolia, ALGOLIA_APP_ID and ALGOLIA_API_KEY, and run the same sync.

Email

Without an email transport, Entri writes emails (invitations, password resets) to the container log. To send them, configure SMTP or Resend in .env:
Then run 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 bundled mongo 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:
To restore into the same stack:
Also keep a copy of .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

The readiness endpoint checks MongoDB and Redis. Entri also logs configuration warnings at startup, for example when 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):
Then start the stack:
  • MONGO_URI must 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 mongod works with MONGO_TRANSACTIONS=false, at the cost of weaker guarantees on auth writes.
  • Pass -f docker-compose.external.yml to every docker compose command, including pull, logs and ps.

Building from source

In docker-compose.yml, replace the image: line under x-entri with the commented build: block:
Then build and start:
The build needs no secrets. It compiles the API and web app, so give Docker a few GB of memory.

Upgrading

The migrate service applies migrations before the new entri container starts. Back up first. See Upgrading.