Deploy InsForge
Open-source backend for AI coding agents: Postgres, auth, storage, MCP
Just deployed
/insforge-data
PostgREST
Just deployed
Just deployed
Just deployed
/var/lib/postgresql/data
Deploy and Host InsForge on Railway
InsForge is an open-source backend platform built for agentic coding. It gives you a Postgres database with a REST API, user auth, file storage, edge functions and an AI model gateway, and it exposes all of it to coding agents (Cursor, Claude Code, Codex and others) through its MCP server, so an agent can build and run the backend for your app.
About Hosting InsForge
InsForge is four services that must find each other and share three secrets. This template runs InsForge v2.3.5 (the backend API and admin dashboard) behind a public Railway domain, InsForge's own Postgres 15 build with the extensions its auth and row-level security need, PostgREST for the database REST layer, and a Deno runtime for edge functions. They talk over Railway's private network. The database password, JWT secret, encryption key and admin password are generated for each deploy. Postgres data and uploaded files live on volumes, so they survive redeploys and restarts. Every service builds from a public GitHub repo pinned by version and digest.
Common Use Cases
- Give a coding agent a real backend it can operate over MCP: create tables, set up auth, upload files and deploy functions
- Self-host the backend of a web or mobile app (database, auth, storage, functions) on infrastructure you control
- Run a private, per-project backend for prototypes and internal tools, then delete it when you are done
Dependencies for InsForge Hosting
- PostgreSQL 15 with InsForge's extensions (included:
Postgresservice, InsForge's official image) - PostgREST 12 and a Deno 2 runtime (included)
Deployment Dependencies
- InsForge on GitHub and its v2.3.5 release
- InsForge documentation
- Template repository (Dockerfiles, start scripts, changelog)
Implementation Details
Services
InsForge: backend API and admin dashboard on the public domain (health check/api/health). Uploaded files and logs are kept on its volume at/insforge-data.Postgres: InsForge's Postgres 15 image (pg_cron, http, pgcrypto, insforge_pg_utils), data on a volume. Holds the generatedPOSTGRES_PASSWORD,JWT_SECRETandENCRYPTION_KEYthat the other services reference.PostgREST: turns your tables into a REST API that InsForge proxies (private only).Deno: runs your edge functions (private only; InsForge serves them at/functions/YOUR-SLUG).
After deploy
- Open the
InsForgeservice's domain and sign in asadminwith theROOT_ADMIN_PASSWORDvariable from theInsForgeservice (generated for your deploy). There is no open sign-up for the dashboard. - In the dashboard, open Connect to copy your project API key (
ik_...) and the MCP setup for your agent. A typical MCP client config is:
{
"mcpServers": {
"insforge": {
"command": "npx",
"args": ["-y", "@insforge/mcp@latest"],
"env": { "API_KEY": "ik_YOUR-KEY", "API_BASE_URL": "https://YOUR-DOMAIN" }
}
}
}
- Optional: add an OpenRouter key under AI (or as
OPENROUTER_API_KEYonInsForge) to use the AI gateway, OAuth client IDs for social sign-in, orS3_*variables to move file storage to S3-compatible storage. None are needed to start.
Resources: every service runs within 0.5 GB RAM and 1 vCPU, so the stack fits Railway's small plans; give Postgres and InsForge more for heavy use.
Not included: InsForge's Docker compute provider (it needs the host's Docker socket, which Railway does not provide) and the Vector log shipper from upstream's dev compose file.
Updates: when the template repo moves to a new InsForge release, Railway shows an update notice on your project; read CHANGELOG.md in the repo before you apply it. Migrations run automatically when InsForge starts.
Why Deploy InsForge on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying InsForge on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
