Analytics cookies only (Google Analytics, PostHog). No ad networks, no cross-site tracking. See our privacy policy.
Self-host bolt.diy
updated Nov 2026deployed by usprices checked · Jul 2026Install verified on Ubuntu 26.04 · Nov 2026 · how we test
We earn commissions when you shop through the links below. Full disclosure →
An open-source, self-hosted fork of StackBlitz's Bolt.new: describe an app in a chat, pick a model from more than 20 providers (OpenAI, Anthropic, Google, OpenRouter, Groq, Ollama and others) and bolt.diy writes the files, installs packages and runs the project in a WebContainer inside your browser. The server only relays model calls; the code runs client-side, and you bring your own API keys.
Pick bolt.diy when you want a Bolt.new-style prompt-to-app builder that you host yourself and point at whichever model you choose: you describe an app in a chat, bolt.diy writes the files, installs packages and runs the project in a WebContainer inside your browser, and the README's feature list opens with the in-browser full-stack Node.js environment. The repository is MIT-licensed TypeScript (though the WebContainers API it relies on has its own commercial terms for enterprise use) and its provider code covers more than 20 back ends, among them OpenAI, Anthropic, Google, OpenRouter, Groq, Ollama and LM Studio, so a local model works too. Our snippet builds the project's own Dockerfile from the v1.0.1 git tag (released 2026-10-12), because the GHCR image is only published for the main branch and no release tag exists as an image. We did not find an upstream RAM minimum, so our 4096 MB floor is an estimate: the Dockerfile gives the build a 4 GB Node heap (`--max-old-space-size=4096`, a cap rather than a stated requirement), while the running container used about 620 MB on our test run. In the catalog, OpenHands runs a coding agent against a repository and its shell, OpenCode is a terminal-first agent with a web mode, and PR-Agent only reviews merge requests; bolt.diy is the one aimed at generating a new web app from a prompt.
What you need
Any VPS with at least 4096 MB of RAM
A domain you control — most self-hosted setups need HTTPS in front of them
Paid link — we earn a commission if you shop through it.
Install
Run these commands on your server:
# bolt.diy — based on the project's Dockerfile and docker-compose.yaml, built from the v1.0.1 git tag (no release-tag image is published)# builds the Dockerfile's 'build' stage: the 'bolt-ai-production' stage prunes vite, which 'pnpm run dockerstart' needscat > docker-compose.yml <<'EOF'services: bolt: build: context: https://github.com/stackblitz-labs/bolt.diy.git#v1.0.1 dockerfile: Dockerfile target: build image: bolt-diy:1.0.1 restart: unless-stopped ports: - 5173:5173 environment: NODE_ENV: production PORT: "5173" RUNNING_IN_DOCKER: "true" VITE_LOG_LEVEL: info DEFAULT_NUM_CTX: "32768" extra_hosts: - host.docker.internal:host-gateway command: pnpm run dockerstartEOFdocker compose up -d --buildtimeout 900 bash -c 'until curl -fsS -o /dev/null http://localhost:5173/; do sleep 3; done'# → http://SERVER_IP:5173 (no login; open Settings > Providers and paste an API key, or the chat has no model to call)
bolt.diy's README, Dockerfile and Compose file flag these before you rely on it:
non-negotiableIt does nothing useful without a model: the chat needs an API key (or a reachable Ollama or LM Studio) for at least one provider. Keys can be set in the app's Settings or as environment variables from .env.example such as OPENAI_API_KEY and ANTHROPIC_API_KEY. Our snippet sets none, so the UI loads but the first prompt fails until you add one, and every hosted provider bills you directly.
non-negotiableThere is no login. Anyone who can reach port 5173 can use the UI and, if you stored keys on the server, spend them. Keep it on a private network, behind a VPN or an authenticating reverse proxy.
non-negotiableThe Compose file's bolt-ai-production target is the one the README tells you to run, but at v1.0.1 its pnpm prune --prod step removes vite, and the start command pnpm run dockerstart is vite preview. We hit vite: not found and the container exited, so our snippet builds the unpruned build stage instead. That image is about 1.7 GB, and the build is memory-hungry and takes a few minutes. This is our finding, not upstream's documented path, so check the issue tracker before copying it into something long-lived.
non-negotiableGenerated projects run in the browser through WebContainers, which require the Cross-Origin-Embedder-Policy: require-corp and Cross-Origin-Opener-Policy: same-origin headers and a supported browser (the WebContainers docs list Chromium-based browsers as supported out of the box). We only confirmed that the UI loads over plain HTTP; we did not run a generated project, and a page on a bare IP is not a secure context, so plan on HTTPS or an SSH tunnel to localhost.
non-negotiableThere is no versioned image to pull, so updating means rebuilding from a newer git tag, and the build downloads dependencies from the network each time. The Compose file maps host.docker.internal to the host so a container can reach an Ollama running there.
bolt.diy used 518 MB of RAM at idle on GCP e2-standard-2 · Ubuntu 26.04 LTS · Docker 29.9.3 (first boot, measured Nov 2026). We list a minimum of 4096 MB.
Is the bolt.diy install snippet verified?
The bolt.diy install snippet is marked verified on Ubuntu 26.04 (Nov 2026).