---
title: "Deploy Botpress | (Just Updated) Chatbot Builder And NLU Studio With REST API, Admin Password Generated"
description: "Botpress v12 chatbot builder and NLU studio with REST API, on Postgres"
category: "Bots"
url: https://railway.com/deploy/botpress-or-just-updated-chatbot-builder
---

# Deploy Botpress | (Just Updated) Chatbot Builder And NLU Studio With REST API, Admin Password Generated

Botpress v12 chatbot builder and NLU studio with REST API, on Postgres

**[Deploy Botpress | (Just Updated) Chatbot Builder And NLU Studio With REST API, Admin Password Generated on Railway](https://railway.com/template/botpress-or-just-updated-chatbot-builder)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/botpress-or-just-updated-chatbot-builder/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** Bots

## Template content

### botpress

- **Image:** ghcr.io/bon5co/botpress-railway:12.31.10@sha256:0ba76e4010adc0bf2c4022ea7fce86b1fe8596867d049db434a0b0ccb508184f
- **Health check:** /status
- **Public domain:** Yes

### postgres

- **Image:** postgres:17.10-alpine@sha256:742f40ea20b9ff2ff31db5458d127452988a2164df9e17441e191f3b72252193
- **Start command:** `/bin/sh -c 'export POSTGRES_USER=botpress POSTGRES_DB=botpress; exec docker-entrypoint.sh postgres'`

## Documentation

# Deploy and Host Botpress on Railway

**Built for an LLM agent to deploy and use.** The deploy form has nothing to fill in: the administrator password, the application secret and the database password are generated, the super administrator is created at first boot, the REST API is reachable with a bearer token, and your bots, their configuration and the Postgres database survive redeploys. Botpress v12 is the open-source conversational AI platform: a visual flow editor and studio, built-in NLU, channels for web chat and messaging apps, and a REST API.

## About Hosting Botpress

This template runs two services on one public domain. **botpress** is the upstream Botpress server 12.31.10 image pinned by digest (studio, admin panel, messaging, NLU and the bundled duckling entity extractor) with a volume at `/botpress/data`. **postgres** is PostgreSQL 17 with a volume at `/var/lib/postgresql`; bots, flows, content and configuration are stored there (`BPFS_STORAGE=database`), so a redeploy keeps every bot.

**No open first-user signup.** A stock Botpress instance makes whoever registers first the super administrator. The wrapper creates `admin@example.com` itself at first boot from the generated `BOTPRESS_ADMIN_PASSWORD` (32 characters), after which Botpress closes self sign-up. It refuses to start with an empty password or an application secret under 32 characters.

**What the wrapper fixes for Railway.** The bundled duckling reads `PORT` too and would take Railway's injected port before Botpress, which then slides to 8081 and answers nothing at the edge; the wrapper pins duckling to 8000. It builds the database URL from the postgres service's private host and password, waits for the database, sets the public URL from the generated domain, fixes the application secret so issued tokens survive redeploys, and chowns the root-owned volume for the `botpress` user.

**Using it.** Open `https://YOUR_DOMAIN/` and sign in with `admin@example.com` and `BOTPRESS_ADMIN_PASSWORD`, create a bot from a template, build its flows in the studio and add a channel. Botpress v12 is the maintained self-hosted 12.x line under AGPL-3.0, separate from the hosted Botpress Cloud product.

### Agent contract

- Public URL: `https://RAILWAY_PUBLIC_DOMAIN` (the generated domain of the `botpress` service)
- Private URL: `http://botpress.railway.internal:8080`
- Credentials: the variable `BOTPRESS_ADMIN_PASSWORD` on the `botpress` service (the password of the fixed user `admin@example.com`, which is not a template variable)
- Auth: sign in with `POST /api/v1/auth/login/basic/default` (JSON `email` and `password`) to get a JWT, then send it as `Authorization: Bearer JWT` with `X-BP-Workspace: default` on every `/api/v1/admin` call. A request with no token or a wrong token answers `401`.
- Health: `GET /status` returns 200

```bash
#!/bin/sh
# needs: RAILWAY_PUBLIC_DOMAIN, BOTPRESS_ADMIN_PASSWORD (variables of the botpress service); also curl.
R="https://$RAILWAY_PUBLIC_DOMAIN"; J="Content-Type: application/json"; W="X-BP-Workspace: default"; B=$(mktemp)
n=0; until [ "$(curl -s -o /dev/null -w '%{http_code}' "$R/status")" = 200 ]; do n=$((n+1)); [ "$n" -le 60 ] || break; sleep 5; done
curl -s -o /dev/null -w "health: %{http_code}\n" "$R/status"
# sign in as the fixed super admin admin@example.com; the reply carries a JWT used as a bearer token
curl -s -o "$B" -w "sign-in: %{http_code}\n" -H "$J" -d "{\"email\":\"admin@example.com\",\"password\":\"$BOTPRESS_ADMIN_PASSWORD\"}" "$R/api/v1/auth/login/basic/default"
T=$(sed -n 's/.*"jwt":"\([^"]*\)".*/\1/p' "$B")
curl -s -o /dev/null -w "read with token: %{http_code}\n" -H "Authorization: Bearer $T" -H "$W" "$R/api/v1/admin/workspace/bots"
curl -s -o /dev/null -w "write with token: %{http_code}\n" -H "Authorization: Bearer $T" -H "$W" -H "$J" -d '{"id":"railway-check","name":"railway-check","category":"general","template":{"id":"empty-bot","moduleId":"builtin"}}' "$R/api/v1/admin/workspace/bots"
curl -s -H "Authorization: Bearer $T" -H "$W" "$R/api/v1/admin/workspace/bots" | grep -c '"railway-check"' | sed 's/^/bot found after write: /'
curl -s -o /dev/null -w "delete with token: %{http_code}\n" -X POST -H "Authorization: Bearer $T" -H "$W" "$R/api/v1/admin/workspace/bots/railway-check/delete"
curl -s -o /dev/null -w "read without token: %{http_code}\n" -H "$W" "$R/api/v1/admin/workspace/bots"
curl -s -o /dev/null -w "write without token: %{http_code}\n" -H "$W" -H "$J" -d '{"id":"anonymous","name":"anonymous"}' "$R/api/v1/admin/workspace/bots"
curl -s -o /dev/null -w "write wrong token: %{http_code}\n" -H "Authorization: Bearer wrong" -H "$W" -H "$J" -d '{"id":"anonymous","name":"anonymous"}' "$R/api/v1/admin/workspace/bots"
curl -s -o /dev/null -w "sign-up closed: %{http_code}\n" -H "$J" -d '{"email":"anyone@example.com","password":"Anyone-Passw0rd-12"}' "$R/api/v1/auth/register/basic/default"
```

A fresh deploy prints `health: 200`, `sign-in: 200`, `read with token: 200`, `write with token: 200`, `bot found after write: 1` and `delete with token: 200`. The refusals print `read without token: 401`, `write without token: 401`, `write wrong token: 401` and `sign-up closed: 403`: a request with no token or a wrong one creates nothing.

## Why Deploy Botpress 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 Botpress 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.

- **Agent-ready** - generated secrets, a contract block and one script that proves health, sign-in, an authenticated write, read-back and delete, and the refusal of a read and a write with no token or a wrong one.
- **No setup form and no open signup** - the super administrator is created at boot from a generated password and sign-up is closed.
- **Data survives redeploys** - bots, flows and configuration sit in Postgres, and both services have volumes.
- **Works behind the Railway edge** - the listen port follows `PORT` and the public URL is set from the generated domain.
- **Pinned** - the upstream image is pinned by digest and the wrapper by tag and digest.

## Common Use Cases

- **Customer support chatbot** - build flows and answer common questions on a web chat widget embedded in your site.
- **NLU intent and entity extraction** - train intents and entities in the studio and call the NLU service from your own code.
- **Chatbot automation for AI agents** - an agent signs in, creates and removes bots and reads their state over the REST API.
- **Self-hosted conversational AI** - keep conversations and training data on infrastructure you control instead of a hosted bot service.

## Dependencies for Botpress Hosting

- The botpress and postgres services with their volumes, created by the template.

### Deployment Dependencies

- [Botpress v12 repository](https://github.com/botpress/v12)
- [Wrapper image source](https://github.com/bon5co/botpress-railway)


## Similar templates

- [Telegram JavaScript Bot](https://railway.com/deploy/5lRkWa) — A template for Telegram bot in JavaScript using grammY
- [Cobalt Tools [Updated Nov ’26]](https://railway.com/deploy/cobalt) — Cobalt Tools [Nov ’26] (Media Downloader, Converter & Automation) Self Host
- [Telegram Gateway](https://railway.com/deploy/railway-telegram-gateway) — Multi-bot Telegram webhook gateway with WebSocket event streaming

Open this page in a browser: https://railway.com/deploy/botpress-or-just-updated-chatbot-builder
