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

PartRuns onRequired?Without it
Web app (Next.js)Vercel, or any container hostYesNothing runs.
Postgres 17 + Better AuthNeon or any Postgres 17 with vector and pg_trgmYesThe app cannot boot or sign anyone in.
Email (Resend)ResendYes, for email sign-inEmail and password sign-up cannot verify addresses. Social sign-in still works.
GitHub AppYour own GitHub AppFor repo workNo repo access, webhooks, PR reviews, or GitHub triggers.
Background jobsTrigger.dev, cloud or self-hostedFor agent workAutomations, Slack runs, syncs, and long agent runs do not start.
SandboxesVercel SandboxFor code executionAgents cannot clone, edit, or run code.
ModelsVercel AI Gateway key, or per-user provider keysFor agent workChat and agents have no model to call.
Slack appYour own Slack appOptionalNo Slack integration.
SentryYour own Sentry projectOptionalNo error tracking.
StripeYour own Stripe accountOptionalNo 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.
Edit on GitHub

On this page