Docs Run Entropix yourself

Install and run

Run Entropix on your own server: what it needs, first start, upgrades and backups.

You can run Entropix on your own server. It is one program, entropixd, that serves the portal, the /mcp endpoint for coding agents and the public webhooks, and does the background work, all against one Postgres database. This page takes you from an empty server to a running portal, then covers health checks, the proxy in front of it, upgrades, backups and running more than one process.

On your server A shell on the machine that runs entropixd, and a Postgres 17 database Operator

Before you start

You needWhy
Postgres 17All data lives in one database. Two roles are used: an owner that runs migrations, and an app role the portal works as.
Go 1.26To build entropixd from the source.
The git and ssh programsReviews and repository scans fetch code over SSH. Without them the portal starts, warns git or ssh not found — branch reviews will fail until both are installed, and reviews fail.
A model that can call toolsReviews, chat, goals, scans and PRD drafts all use a model with tool calling. You can set one model for the whole server, and each organisation can add its own on Settings › Models (see Choose a model). With no model at all, the portal still runs but calls no model.
A reverse proxy with TLSFor anyone to reach the portal from another machine. The portal itself does not do TLS or rate limiting.

Prepare the database

Create the two roles and the database as a Postgres superuser. Use your own passwords. The database must use the C collation, and the app role must not be able to bypass row-level security: the portal relies on it to keep each organisation's data apart. The portal does not check either at start, so set both up as shown.

CREATE ROLE entropix_owner LOGIN PASSWORD '…';
CREATE ROLE entropix_app LOGIN PASSWORD '…' NOBYPASSRLS NOSUPERUSER NOCREATEDB;
GRANT entropix_app TO entropix_owner;
CREATE DATABASE entropix OWNER entropix_owner TEMPLATE template0 LC_COLLATE 'C' LC_CTYPE 'C';
\connect entropix
GRANT USAGE ON SCHEMA public TO entropix_app;
ALTER DEFAULT PRIVILEGES FOR ROLE entropix_owner IN SCHEMA public
  GRANT SELECT, INSERT, UPDATE, DELETE ON TABLES TO entropix_app;
ALTER DEFAULT PRIVILEGES FOR ROLE entropix_owner IN SCHEMA public
  GRANT USAGE, SELECT ON SEQUENCES TO entropix_app;
Careful

Run the grants before the first start or the first restore. Tables made before them do not give the app role its rights, and the portal then fails with "permission denied".

Build and start it

  1. Build the program from the source: make build (the same as go build -o bin/entropixd ./cmd/entropixd).
  2. Generate a secret key and keep it safe: for example openssl rand -hex 32. It encrypts every secret organisations store (SSH keys, model keys, tokens). See Configuration.
  3. Set the environment. At least:
    ENTROPIX_DATABASE_URL='postgres://entropix_app:…@db.internal:5432/entropix?sslmode=require'
    ENTROPIX_DATABASE_MIGRATE_URL='postgres://entropix_owner:…@db.internal:5432/entropix?sslmode=require'
    ENTROPIX_SECRET_KEY='…'
    ENTROPIX_PUBLIC_URL='https://entropix.example.com'
    ENTROPIX_ADDR='127.0.0.1:4173'
    Add a model with ENTROPIX_LLM_BASE_URL and ENTROPIX_LLM_MODEL if you want one for the whole server. Every setting is on Configuration.
  4. Start it: ./bin/entropixd. On start it applies any pending database migrations, then prints three lines:
    Portal: https://entropix.example.com
    MCP endpoint: https://entropix.example.com/mcp (agents connect with a personal access token from https://entropix.example.com/account)
    Create an organisation: https://entropix.example.com/signup
  5. Open the /signup address. Whoever signs up names a new organisation and becomes its admin (see Sign up and sign in).
  6. Read the warnings the program printed at start. Each names a missing setting and what will not work without it, for example GitHub or the secret key.

To stop it, send SIGINT or SIGTERM. It stops taking new requests, gives open requests up to 5 seconds, and lets background work finish its current write. Background work that was cut off is picked up again on the next start.

Database roles in short

SetupHow to set it
RecommendedENTROPIX_DATABASE_URL connects as entropix_app; ENTROPIX_DATABASE_MIGRATE_URL connects as entropix_owner and is used only for migrations.
One login (for a trial)ENTROPIX_DATABASE_URL connects as entropix_owner, and ENTROPIX_DATABASE_ROLE=entropix_app makes every connection switch to the app role after migrations.

Check that it is healthy

GET /healthz is the health check for your load balancer or monitor. It needs no sign-in.

AnswerMeans
200 with the body okThe portal is up and the database answered a simple query within 2 seconds.
503 with the body database unavailableThe database did not answer in time, or could not be reached.

The answer names nothing else (no version, no counts, no error text) and is never cached.

curl -fsS https://entropix.example.com/healthz

Put a proxy in front

The portal refuses to listen on anything but a loopback address (localhost, 127.0.0.1 or [::1]) unless ENTROPIX_PUBLIC_URL starts with https://. This stops passwords and session cookies crossing the network in the clear. So: run a reverse proxy that ends TLS, point it at entropixd, and set ENTROPIX_PUBLIC_URL to the proxy's https address. With an https public URL, session cookies are also marked secure.

Configure the proxy to:

  • Rate limit sign-in. Limit POST requests to /login, /signup and /links/. Each attempt does deliberately slow password hashing, so many at once load the server. The portal also holds back repeated failed sign-ins on its own: after 5 failures for one email, each new try waits, starting at 5 seconds and doubling up to 5 minutes. It is a pause, not a lockout.
  • Pass the client address. Behind a proxy on the same machine, the portal takes the client's address from the last X-Forwarded-For entry, and an X-Request-Id header if you send one. Both appear in the audit log.
  • Allow responses of at least 30 seconds. Runners hold a request to /hooks/runner/ open for up to 25 seconds while they wait for work, and a Chat API client can ask to wait up to 30 seconds for an answer. A proxy timeout shorter than that cuts them off.

What must be public, and what must not

Anyone who can reach the portal can sign up, so decide who can reach it. Of everything the portal serves, only the webhook addresses under /hooks/ need to be open to the internet, so that GitHub, GitLab, Slack, Teams, runners and the Chat API can call in. People also need the sign-in pages (/login, /signup, invite links and /assets/) wherever they work from. Each one checks its own signature or key; see Webhooks and public endpoints. Everything else can stay on your network or VPN.

Careful

Never expose /mcp through a tunnel (such as a public forwarding service). Restrict it to your developers' addresses. It is the door coding agents use, with personal access tokens, and it should not face the open internet.

Connect GitHub (optional)

For organisations on your portal to review GitHub pull requests, register one GitHub App for the whole server. GitLab needs no server setup: each organisation connects it on Settings › Integrations.

  1. On GitHub, under the account that will own it, create a new GitHub App.
  2. Set the callback URL to <public URL>/settings/integrations/github/callback and turn on Request user authorization (OAuth) during installation.
  3. Make the webhook active, with the URL <public URL>/hooks/github and a long random secret (openssl rand -hex 32).
  4. Give it these repository permissions: Pull requests read and write, Contents read-only, Commit statuses read and write, Checks read-only, Metadata read-only.
  5. Subscribe to the events Pull request, Issue comment and Pull request review comment. Let it be installed on any account.
  6. Note the App ID and the Client ID, generate a client secret and a private key, and set the six ENTROPIX_GITHUB_* settings (see Configuration). Restart.

Organisations then connect it from Settings › Integrations (see Connect GitHub or GitLab).

Upgrade

  1. Take a backup (below).
  2. Build the new version.
  3. See what it will change: ./bin/entropixd migrate --check lists each pending migration and exits with status 1 when any is pending, 0 when none is.
  4. Either restart and let the start apply them, or apply them first with ./bin/entropixd migrate and then restart. With ENTROPIX_DATABASE_MIGRATE=off the portal refuses to start while any migration is pending, so a migration only ever runs when you choose.

Migrations run under a lock, so two processes starting at once apply them once. Each applied migration is checksummed: if a file already applied has been changed or is missing, the portal refuses to start rather than guess. Full syntax is on Operator commands.

Back up and restore

  1. Dump the database in custom format with pg_dump 17:
    pg_dump -Fc -d "$OWNER_URL" -f entropix-$(date +%Y%m%d).dump
    pg_restore --list entropix-$(date +%Y%m%d).dump > /dev/null   # checks the file reads
  2. Keep ENTROPIX_SECRET_KEY with your backups, somewhere separate and safe. Without the same key, every stored secret in a restored database is unreadable.
  3. To restore, create the roles and an empty database with the grants (as above), then restore as the owner:
    pg_restore --no-owner --no-acl --role=entropix_owner -d "$OWNER_URL" entropix-20261102.dump
    The default privileges give the app role its rights on the restored tables.

You do not need to back up the Git cache (ENTROPIX_GIT_CACHE_DIR): it holds copies of your organisations' repositories, and the portal fetches them again. It does hold source code unencrypted, so protect the disk it is on.

Run more than one process

You can run several entropixd processes against the same Postgres, for more capacity or so one can restart while another serves.

  • Any process can serve any request; put them all behind your proxy.
  • Background work is claimed in the database, so each job runs once. If a process dies, its claims are picked up again after 45 seconds. A goal in progress renews its lease every 30 seconds, so another process resumes it after a crash.
  • ENTROPIX_LLM_PARALLEL (model calls per model server) and ENTROPIX_WORKER_PER_ORG (PRD drafts, reviews and goals at once per organisation) are shared across all processes. ENTROPIX_WORKER_REVIEW_SLOTS and ENTROPIX_WORKER_GOAL_SLOTS count per process.
  • Give each process its own Git cache directory. Do not share one between processes.
  • All processes need the same settings, especially the same ENTROPIX_SECRET_KEY.

How it works

  • Organisations are kept apart in the database. Every row belongs to one organisation, and Postgres row-level security lets each request see only its own organisation's rows. That is why the app role must not bypass row-level security.
  • The portal reads Git, never writes. It fetches over SSH with each organisation's own keys and strict host key checks, and never pushes. Code changes happen only on developers' machines.
  • Outbound connections are guarded. Addresses organisations enter (model servers, tool servers, repositories) may not point at private or local networks, unless you allow a network with ENTROPIX_GITLAB_ALLOWED_NETWORKS.
  • Organisations can move their outbound work into their own network with a runner; see Runners.

What you can and can't do

You can
  • Run the portal on your own server against your own Postgres 17.
  • Set one model for the whole server, or leave models to each organisation.
  • Check health with /healthz, check for migrations with migrate --check, and choose when they run.
  • Run several processes on one database.
  • Turn features on or off per organisation (see Feature switches).
You can't
  • Listen on a non-loopback address without an https public URL.
  • Restore secrets without the same ENTROPIX_SECRET_KEY.
  • Rely on the portal for TLS or rate limiting: that is the proxy's job.

Troubleshooting

Message at startWhat to do
ENTROPIX_DATABASE_URL is requiredSet it to a postgres:// URL with a host.
refusing to listen on "0.0.0.0:4173": passwords and session cookies would cross the network in the clear…Listen on a loopback address behind your proxy, or set ENTROPIX_PUBLIC_URL to the proxy's https address.
ENTROPIX_DATABASE_MIGRATE=off and N migration(s) are pending…Run entropixd migrate, then start again.
ENTROPIX_SECRET_KEY unset — no organisation can connect GitLab or add an SSH key…Set a secret key. Until then, no organisation can store a key or token.
git or ssh not found…Install both programs on the server.
"permission denied" from PostgresThe app role is missing its rights. Run the grants above as the owner; for tables made before them, grant the rights on those tables too.