---
title: "Deploy Bolt.diy — Self-Hosted AI App Builder, No Credits"
description: "Self-host Bolt.diy: AI app builder, any LLM, your own key. No credits."
category: "Other"
url: https://railway.com/deploy/boltdiy-ai-app-builder
---

# Deploy Bolt.diy — Self-Hosted AI App Builder, No Credits

Self-host Bolt.diy: AI app builder, any LLM, your own key. No credits.

**[Deploy Bolt.diy — Self-Hosted AI App Builder, No Credits on Railway](https://railway.com/template/boltdiy-ai-app-builder)**

- **Creator:** SilverBanana
- **Category:** Other
- **Total deploys:** 11

## Template content

### Bolt Docker https://raw.githubusercontent.com/stackblitz/bolt.new/refs/heads/main/public/logo.svg

- **Image:** minixxie/bolt-diy:85d864f607d7778d759582e464ea478a4b6ed2cc

## Documentation

# Deploy and Host Bolt.diy on Railway

![Bolt.diy AI app builder interface](https://res.cloudinary.com/dh2nt6hgh/image/upload/v1758194283/Bolt_DIY_Dashboard_nmorfl.png)

Bolt.diy is the open-source, self-hostable version of Bolt.new — an AI full-stack app builder
that writes, runs, and previews web apps live in your browser. Describe what you want and it
generates the code, installs the dependencies, runs it in an in-browser WebContainer, and shows
you the result — then you edit by chatting. Bring your own model: OpenAI, Anthropic Claude,
Google Gemini, Groq, Mistral, Ollama, and more.

**Hosted AI app builders meter you on message credits.** Bolt.new, Lovable, and v0 all charge
per generation and cap you by plan. Bolt.diy on Railway uses *your* API key — pay only for the
tokens you actually use, with no per-message credits and no monthly builder subscription.

---

## What This Template Deploys

| Service | Purpose |
|---|---|
| **Bolt.diy** | The full app — chat UI, code editor, in-browser WebContainer runtime, and live preview, served on the public web service |

Single-service deployment. Code generation and execution happen client-side in the browser's
WebContainer, so there's no separate build server to run. Add a persistent volume if you want
generated projects and chat history to survive redeploys.

---

## About Hosting Bolt.diy

Bolt.diy (the community fork of StackBlitz's Bolt.new) lets you use any LLM instead of being
locked to one provider, and self-hosting means your prompts, generated code, and API keys stay
on infrastructure you control. Running it means serving the app, wiring an API key for each
provider you want available, and giving it a public HTTPS endpoint.

Railway handles the hosting and HTTPS automatically. Add your provider API keys as Railway
Variables — only the providers you configure appear in the model picker — and the app is live
at your Railway domain.

Typical cost: **~$5–10/month** on Railway's Hobby plan for the app itself, plus whatever your
chosen LLM charges per token. Groq and Gemini offer free API tiers, and local Ollama is free —
so your per-generation model cost can be zero while hosted builders keep charging credits.

---

## Deploy in Under 5 Minutes

1. Click **Deploy on Railway** — Bolt.diy builds automatically (~2–3 minutes)
2. Add an API key for at least one provider in Railway Variables (e.g. `ANTHROPIC_API_KEY`,
   `OPENAI_API_KEY`, `GROQ_API_KEY`, or `GOOGLE_GENERATIVE_AI_API_KEY`)
3. Open your Railway-assigned URL
4. Pick a configured provider and model from the picker
5. Describe the app you want — Bolt.diy generates, runs, and previews it in the browser

No local Node setup. No cloning. No credit meter.

---

## Common Use Cases

- **Self-hosted alternative to Bolt.new** — the same in-browser AI app builder without
  StackBlitz's message-credit metering; use your own API key and pay only for tokens
- **Self-hosted alternative to Lovable and v0** — build and preview full-stack apps by chatting,
  on your own infrastructure, with any model instead of a fixed provider
- **Multi-model AI coding workspace** — switch between Claude, GPT-4o, Gemini, Groq, and local
  Ollama models for the same project without changing tools
- **Private prototyping for client work** — prompts, generated code, and keys stay on your
  instance, not a third-party builder's servers
- **Learning and rapid MVP building** — spin up working React, Vite, and Node prototypes from a
  prompt, edit them live, and export the code
- **Team app-builder on a shared instance** — one deployment, one place to manage provider keys,
  accessible to your whole team from a browser

---

## Configuration

| Variable | Required | Description |
|---|---|---|
| `ANTHROPIC_API_KEY` | One provider required | Enables Anthropic Claude models |
| `OPENAI_API_KEY` | Alternative | Enables OpenAI GPT models |
| `GOOGLE_GENERATIVE_AI_API_KEY` | Alternative | Enables Google Gemini models |
| `GROQ_API_KEY` | Alternative | Enables Groq-hosted models (fast, free tier) |
| `MISTRAL_API_KEY` | Alternative | Enables Mistral models |
| `OLLAMA_API_BASE_URL` | Optional | Point at an Ollama endpoint for fully local models |
| `OPENAI_LIKE_API_BASE_URL` | Optional | Any OpenAI-compatible endpoint (OpenRouter, LM Studio) |
| `PORT` | Auto-set | Railway injects the port automatically |

> Only the providers you configure appear in the model picker. You need at least one API key —
> everything else is optional. Add a persistent volume if you want generated projects to survive
> redeploys; otherwise the workspace is per-session.

---

## Bolt.diy vs. AI App Builders

| | Bolt.diy (Railway) | Bolt.new | Lovable | v0 |
|---|---|---|---|---|
| **Pricing model** | ~$5–10/mo + your tokens | Message credits | Message credits | Message credits |
| **Bring your own model** | ✅ Any provider | ❌ Fixed | ❌ Fixed | ❌ Fixed |
| **Local models (Ollama)** | ✅ Yes | ❌ No | ❌ No | ❌ No |
| **Self-hostable** | ✅ Yes | ❌ No | ❌ No | ❌ No |
| **Data / code privacy** | ✅ Your instance | ❌ Their servers | ❌ Their servers | ❌ Their servers |
| **Live in-browser preview** | ✅ WebContainer | ✅ Yes | ✅ Yes | ✅ Yes |
| **Open source** | ✅ MIT | ❌ No | ❌ No | ❌ No |

---

## Dependencies for Bolt.diy Hosting

- Railway account — Hobby plan (~$5–10/month) for the app
- At least one LLM API key — Groq and Gemini have free tiers; Ollama is free and local
- Optional: a persistent volume for generated projects and chat history

### Deployment Dependencies

- [Bolt.diy GitHub Repository](https://github.com/stackblitz-labs/bolt.diy) — source and releases
- [Bolt.diy Documentation](https://stackblitz-labs.github.io/bolt.diy/) — setup and provider config
- [Groq Console](https://console.groq.com) — free-tier API keys
- [Railway Volumes Documentation](https://docs.railway.com/volumes) — persistent storage

### Implementation Details

This template deploys Bolt.diy as a single web service on Railway with automatic HTTPS. Code
generation and execution run client-side in the browser's WebContainer, so there is no separate
execution backend to manage. Provider API keys are read from Railway Variables at runtime — only
configured providers appear in the model picker.

Because the WebContainer runs in the visitor's browser, use a modern Chromium-based browser for
best compatibility. Add a Railway volume if you want generated projects and chat history to
persist across redeploys; without one, each session starts fresh.

---

## Frequently Asked Questions

**How is Bolt.diy different from Bolt.new?**
Bolt.diy is the open-source, self-hostable community fork of StackBlitz's Bolt.new. Bolt.new is
hosted and meters you on message credits with a fixed model. Bolt.diy runs on your own
infrastructure, works with any LLM provider (including local Ollama), and charges nothing beyond
your own token usage.

**Do I need an OpenAI key?**
No — any one provider works: Anthropic, OpenAI, Gemini, Groq, Mistral, or a local Ollama /
OpenAI-compatible endpoint. Groq and Gemini have free tiers, and Ollama is free, so you can run
Bolt.diy with zero per-generation cost.

**Why does the model picker only show some providers?**
Bolt.diy only lists providers you've configured with an API key. Add the relevant key in Railway
Variables (e.g. `ANTHROPIC_API_KEY`) and redeploy — the provider then appears in the picker. A
blank or missing provider almost always means the key isn't set.

**Do generated projects survive a redeploy?**
Only if you add a persistent volume. By default the WebContainer workspace is per-session. Mount
a Railway volume to keep generated projects and chat history across redeploys.

**Which browser should I use?**
Bolt.diy runs its code execution in an in-browser WebContainer, which works best in modern
Chromium-based browsers (Chrome, Edge, Brave). Older or restricted browsers may fail to boot the
WebContainer.

**Is my code and data private?**
Yes. Self-hosted on Railway, your prompts, generated code, and API keys stay on your instance.
The model provider you choose sees the prompts you send it, but nothing routes through a
third-party builder platform.

---

## Why Deploy and Host 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 get an open-source AI full-stack app builder — live
in-browser preview, any LLM provider, and full code privacy — at ~$5–10/month plus your own
token usage, with no message credits and no builder subscription.

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/boltdiy-ai-app-builder
