Self-host ยท v0.1.0
Run Direx on your own server
One installer sets up Postgres and Direx with Docker Compose. Your data lives in your database, and you choose which model providers and platforms Direx talks to.
What you need
- A Linux server with Docker and Compose.
- An SMTP account, for sign-in mail.
- A domain pointed at the server, if people should reach it on the public internet.
Install
On the server, get the release and run the installer from the checkout:
git clone https://github.com/trydirex/direx.git
cd direx
git checkout v0.1.0
docker build -f deploy/docker/Dockerfile -t ghcr.io/trydirex/direx:local .
sh deploy/compose/install.sh --version localThe installer asks for the address people will open, the From address for mail and your SMTP URL. It starts Postgres and Direx, prepares the database, checks the install and prints a link. Open it to become the server's first Server admin. The link works once.
The SMTP URL goes into Direx's vault, not into a file, and nothing the installer prints holds a password. It is safe to run again: it keeps .env and every password, and skips what is already done.
Public or private
- A public domain: add
--public direx.example.com. Caddy serves Direx there and renews its own certificate. Keep ports 80 and 443 open. - A private server: leave it out. Direx listens on
127.0.0.1:3000only, for Tailscale or a proxy you run.
After the install
- Back up the
direx-datavolume apart from the database. It holds the vault's root key, and stored credentials can't be read without it. - API keys go into the vault, typed by a person:
docker compose exec -T direx bun apps/api/src/secrets.ts set provider.anthropic. - To use a Claude Code or Codex subscription instead of an API key, see model adapters.
What leaves your server
Direx sends drafts and business context to the model providers you connect, email through the Mailboxes you connect, and posts to the social accounts you connect. Each send goes through the ledger, after a person's approval or an auto-approve rule a person set.
Just trying it?
A development install runs on your own machine with bun run setup and bun run dev. It keeps its ports local and prints mail to the terminal. Or point a coding agent at the checkout and ask it to set up Direx: the direx-setup skill tells it what to run, and it hands over at the sign-in page.