Self-Hosting
Run Mogplex on your own infrastructure. Learn which services it depends on, what each one unlocks, and which deployment shape to choose.
Mogplex is open source under Apache-2.0. The code in github.com/Mogplex/mogplex is the same code that runs mogplex.com. Self-hosting has no license fee, no seat limit, and no gated features.
You run the Next.js app. Your own accounts supply the database, background jobs, sandboxes, models, and GitHub App. You control the data, the credentials, and the bill.
Community supported
Self-hosting has no SLA. Ask questions in GitHub Discussions and file bugs as issues. The project treats friction in the self-hosting path as a bug.
How a deployment fits together
| Part | Runs on | Required? | Without it |
|---|---|---|---|
| Web app (Next.js) | Vercel, or any container host | Yes | Nothing runs. |
| Postgres 17 + Better Auth | Neon or any Postgres 17 with vector and pg_trgm | Yes | The app cannot boot or sign anyone in. |
| Email (Resend) | Resend | Yes, for email sign-in | Email and password sign-up cannot verify addresses. Social sign-in still works. |
| GitHub App | Your own GitHub App | For repo work | No repo access, webhooks, PR reviews, or GitHub triggers. |
| Background jobs | Trigger.dev, cloud or self-hosted | For agent work | Automations, Slack runs, syncs, and long agent runs do not start. |
| Sandboxes | Vercel Sandbox | For code execution | Agents cannot clone, edit, or run code. |
| Models | Vercel AI Gateway key, or per-user provider keys | For agent work | Chat and agents have no model to call. |
| Slack app | Your own Slack app | Optional | No Slack integration. |
| Sentry | Your own Sentry project | Optional | No error tracking. |
| Stripe | Your own Stripe account | Optional | No billing. See Give users access. |
The app boots with only Postgres configured. Each additional service unlocks one feature area, so you can bring Mogplex up in stages.
Turn on self-host mode before you test agents
Hosted AI and sandboxes are gated per user. On mogplex.com, the gate is a
funded billing account. Without Stripe, nobody has a balance, so set
MOGPLEX_SELF_HOSTED=1. If you skip this step, every run fails with
"requires a positive billing balance". See
Give users access.
Choose a deployment shape
Containers. Pull the published image, ghcr.io/mogplex/mogplex (amd64 and
arm64), and run it with Docker Compose, Kubernetes, or any platform that runs
OCI images, on any cloud or your own hardware. Compose starts Postgres with
pgvector, applies the migrations, runs the app, and calls the cron routes on
schedule. You still provide Trigger.dev, sandboxes, models, and the GitHub App,
and you copy env vars into Trigger.dev by hand. Sandboxes still need a Vercel
account.
Vercel. Fork the repo, link it to a project in your own Vercel team, set the environment variables, and deploy. This is how mogplex.com runs. Vercel also runs the cron routes and syncs env vars to Trigger.dev for you.
Time to plan
- App shell (Postgres, auth, one sign-in provider): about 15 minutes, or less with Docker Compose.
- Full product (GitHub App, Trigger.dev, sandboxes, models, Slack): an afternoon. Each service has its own sign-up, billing, and credential rotation.
Read next
Quickstart
Go from a fork to a signed-in deployment, then add services one at a time.
Environment variables
Every variable, grouped by feature, with required and optional marked.
GitHub App
Create the GitHub App: permissions, events, URLs, and keys.
Operations
The setup doctor, upgrades, migrations, secrets, and known constraints.