Self-Hosting
Run Amend with your own deployment, provider keys, and docs URL.
Self-hosting keeps the same product loop while moving ownership of runtime, secrets, model policy, and DNS to your infrastructure.
Deployment pieces
| Piece | Responsibility |
|---|---|
| Web app | Dashboard, portal routes, embed demo, auth surfaces |
| Fumadocs app | Documentation, launch guidance, integration reference |
| Convex backend | Data model, HTTP actions, auth integration, automation state |
| Providers | GitHub, email, billing, AI model, custom domains |
You can deploy docs as a subpath, a subdomain, or a separate instance. Keep the app link portable
with VITE_DOCS_URL.
Local shape
Local development uses portless names:
http://amend.localhost:1355
http://docs.amend.localhost:1355/docsThe web app should point at the docs app through:
VITE_DOCS_URL=http://docs.amend.localhost:1355/docsProduction shape
Choose one docs route before shipping public links:
| Pattern | VITE_DOCS_URL |
|---|---|
| Same app proxy | /docs |
| Main-site proxy | https://amend.sh/docs |
| Docs subdomain | https://docs.amend.sh/docs |
| Separate docs host | https://amend-docs.example.com/docs |
If the route changes later, update the environment variable and redeploy the web app. Product code should not need edits.
API Base URL
Customer-owned products should point SDK and server calls at the Convex HTTP action origin:
AMEND_API_BASE_URL=https://your-production-convex.convex.site/api/v1Use AMEND_API_TOKEN only in trusted server code, CLI automation, or owner tools.
Provider keys
Production should configure these outside the client bundle:
BETTER_AUTH_SECRETGITHUB_WEBHOOK_SECRET- GitHub App ID, slug, client ID, client secret, and private key
AMEND_API_TOKENPOSTHOG_API_KEYandPOSTHOG_HOSTVITE_POSTHOG_TOKEN,VITE_POSTHOG_HOST, andVITE_POSTHOG_PROJECT_IDOPENAI_API_KEYandOPENAI_MODELRESEND_API_KEYandEMAIL_FROMSTRIPE_SECRET_KEYandSTRIPE_WEBHOOK_SECRET
Readiness
Run local readiness during setup:
bun run readinessRun strict readiness only with production secrets available:
bun run readiness:strictLocal green checks mean the repo wiring works. They do not prove DNS, webhook delivery, auth callbacks, billing webhooks, or email sending in production.