Deploy bolt.diy

AI app builder in your browser, any LLM. Prebuilt v1.0.1, login in front.

Deploy bolt.diy

Just deployed

Deploy and Host bolt.diy on Railway

Deploy on Railway

bolt.diy is the open-source AI app builder: describe an app, pick any LLM, and watch it write, run and preview a full-stack project in your browser. This template runs bolt.diy v1.0.1 on Railway from a prebuilt image, behind a login.

This is a community template, not made or supported by StackBlitz or the bolt.diy project.

About Hosting bolt.diy

bolt.diy is hard to host from source. The build needs a 4 GB heap, which kills small build machines, and the project publishes no image for its releases. v1.0.1 also has two faults that show only in a production build: the page stays blank, and provider keys set as environment variables are ignored. And bolt.diy has no login, so a public instance lets anyone spend the keys you set.

This template fixes all of that. The image is built once in GitHub Actions with both faults patched, so a deploy only pulls it and starts in under a minute. A small Caddy server in front asks for a username and password before anything reaches bolt.diy.

Sign in: open your Railway domain. The browser asks for a username (WEB_USER, default admin) and a password (WEB_PASSWORD, generated by the template). Find both in the service's Variables tab. Change either there and redeploy.

Pick a model: set one of the provider variables (OPEN_ROUTER_API_KEY, ANTHROPIC_API_KEY, OPENAI_API_KEY, GOOGLE_GENERATIVE_AI_API_KEY), or leave them empty and paste a key in the app, which keeps it in your browser. bolt.diy supports many more providers. Add any variable from its .env.example to the service and it is passed through.

Your data: chats and projects live in your browser (IndexedDB), not on the server, so the service needs no volume. Use the app's export or its GitHub push to keep a project.

Common Use Cases

  • A private AI app builder for yourself or a small team, with your own LLM keys
  • Prototyping full-stack web apps from a prompt, then exporting them or pushing to GitHub
  • Trying different LLM providers on the same coding task

Dependencies for bolt.diy Hosting

  • An API key for at least one LLM provider
  • A service with 1 GB of memory or more

Deployment Dependencies

Implementation Details

  • Tested on Railway: the page loads and shows the chat box in a real browser, the login refuses a missing or wrong password, the browser isolation headers that the in-browser runtime needs pass through, the model list loads, and a provider key set as a variable is seen by the server. Generating an app with a real LLM key was not tested.
  • Memory: the service uses about 600 MB. It needs a plan with 1 GB or more. With 0.5 GB (Railway's Free plan) bolt.diy cannot start, and the service shows a page saying so in place of a failed deploy.
  • Where code runs: generated projects run in a WebContainer inside your browser tab, not on Railway. Use a recent Chromium-based browser.
  • Login: HTTP basic auth by Caddy. The password is hashed at each start. /healthz is the only path open without it, for Railway's healthcheck.
  • Patches to v1.0.1: one keeps the Buffer polyfill out of the bundler's runtime chunk (without it the page is blank), and CLOUDFLARE_INCLUDE_PROCESS_ENV=true lets the server read the service's variables. Development dependencies are kept in the image because the app is served by vite preview.
  • Image: ghcr.io/two-workspaces/bolt-diy, built from this repository's Dockerfile at the pinned upstream tag. Deploys use the image, so an existing deploy changes only when you point it at a newer tag.

Why Deploy bolt.diy 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 bolt.diy 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

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
View Template
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1