Railway

Deploy WrenAI

GenBI stack for natural language database queries & SQL charts & AI Insight

Deploy WrenAI

Just deployed

/app/data

Just deployed

/qdrant/storage

Just deployed

/usr/src/app/etc

Just deployed

Just deployed

Deploy and Host WrenAI on Railway

WrenAI is a Generative BI platform that lets users interact with data using natural language. It can translate questions into SQL, generate charts, and provide AI-powered insights. The Railway deployment runs WrenAI as a multi-service stack consisting of Wren UI, Wren Engine, Ibis Server, Wren AI Service, and Qdrant.

About Hosting WrenAI

Hosting WrenAI on Railway involves deploying five Docker-based services: wren-ui, wren-engine, ibis-server, wren-ai-service, and qdrant. The stack uses Railway private networking for communication between services, with Wren UI as the only publicly accessible service. Persistent Railway Volumes are required for Wren Engine configuration, Wren UI's SQLite database, and Qdrant's vector storage. Wren AI Service requires an OpenAI API key and a configuration file that points to the Qdrant service through its Railway private domain. No PostgreSQL or Redis service is required for this deployment. Railway provides the service networking, public HTTPS endpoint, container deployment, and persistent storage needed to run the complete WrenAI stack.

Common Use Cases

  • Natural-language querying and exploration of business data
  • Generating SQL queries, charts, and AI-powered data insights
  • Building self-hosted Generative BI applications for data analysis

Dependencies for WrenAI Hosting

  • OpenAI API key
  • Qdrant vector database service
  • Persistent Railway Volumes for application and vector data
  • Five Railway services: wren-ui, wren-engine, ibis-server, wren-ai-service, and qdrant

Deployment Dependencies

Implementation Details

Deploy the following five services as Docker Image services. Railway supports public Docker images, including images hosted on GitHub Container Registry.

ServiceImagePortPublic
wren-engineghcr.io/canner/wren-engine:latest8080No
wren-uighcr.io/canner/wren-ui:latest3000Yes
ibis-serverghcr.io/canner/wren-engine-ibis:latest8000No
wren-ai-serviceghcr.io/canner/wren-ai-service:latest5555No
qdrantqdrant/qdrant:latest6333, 6334No

Only wren-ui should have a Railway public domain. The other services communicate through Railway's private networking.

wren-engine

Use:

ghcr.io/canner/wren-engine:latest

Configure port 8080 and add a Railway Volume mounted at:

/usr/src/app/etc

Set:

NODE_ENV=production

Create /usr/src/app/etc/config.properties with:

node.environment=production
wren.directory=/usr/src/app/etc/mdl
wren-ui

Use:

ghcr.io/canner/wren-ui:latest

Configure port 3000 and add a Railway Volume mounted at:

/app/data

Set the following variables:

VariableRequiredDescription
DB_TYPEYesUses SQLite for the Wren UI database
SQLITE_FILEYesSQLite database path
IBIS_SERVER_ENDPOINTYesPrivate endpoint for Ibis Server
WREN_AI_ENDPOINTYesPrivate endpoint for Wren AI Service
WREN_ENGINE_ENDPOINTYesPrivate endpoint for Wren Engine

Raw Editor:

DB_TYPE=sqlite
SQLITE_FILE=/app/data/db.sqlite3
IBIS_SERVER_ENDPOINT=http://${{ibis-server.RAILWAY_PRIVATE_DOMAIN}}:8000
WREN_AI_ENDPOINT=http://${{wren-ai-service.RAILWAY_PRIVATE_DOMAIN}}:5555
WREN_ENGINE_ENDPOINT=http://${{wren-engine.RAILWAY_PRIVATE_DOMAIN}}:8080

Enable Public Networking and generate a Railway domain for this service.

ibis-server

Use:

ghcr.io/canner/wren-engine-ibis:latest

Configure port 8000.

Set:

WREN_ENGINE_ENDPOINT=http://${{wren-engine.RAILWAY_PRIVATE_DOMAIN}}:8080
wren-ai-service

Use:

ghcr.io/canner/wren-ai-service:latest

Configure port 5555.

Set:

VariableRequiredDescription
CONFIG_PATHYesLocation of the Wren AI configuration file
PYTHONUNBUFFEREDYesEnables unbuffered Python output
QDRANT_HOSTYesPrivate hostname of the Qdrant service
SHOULD_FORCE_DEPLOYYesEnables the documented deployment behavior
WREN_AI_SERVICE_PORTYesWren AI Service port
WREN_UI_ENDPOINTYesPrivate Wren UI endpoint
WREN_UI_PORTYesWren UI port
OPENAI_API_KEYYesOpenAI API key used when OpenAI is selected

Raw Editor:

CONFIG_PATH=/app/config.yaml
PYTHONUNBUFFERED=1
QDRANT_HOST=${{qdrant.RAILWAY_PRIVATE_DOMAIN}}
SHOULD_FORCE_DEPLOY=1
WREN_AI_SERVICE_PORT=5555
WREN_UI_ENDPOINT=http://${{wren-ui.RAILWAY_PRIVATE_DOMAIN}}:3000
WREN_UI_PORT=3000
OPENAI_API_KEY=YOUR_KEY

Obtain the OpenAI API key from your OpenAI API account. Wren AI's installation documentation requires an OpenAI API key when OpenAI is selected.

Create /app/config.yaml and use the supplied Wren AI configuration. For the Qdrant document store, use the Railway private domain instead of the original service hostname:

type: document_store
provider: qdrant
location: http://${{qdrant.RAILWAY_PRIVATE_DOMAIN}}:6333
embedding_model_dim: 3072
timeout: 120
recreate_index: false

Do not place the OpenAI API key inside config.yaml. Store it as the OPENAI_API_KEY Railway variable.

qdrant

Use:

qdrant/qdrant:latest

Configure ports 6333 and 6334.

Add a Railway Volume mounted at:

/qdrant/storage

Set:

QDRANT__LOG_LEVEL=INFO
Persistent Storage

Create the following Railway Volumes:

ServiceMount PathPurpose
wren-engine/usr/src/app/etcWren Engine configuration and model directory
wren-ui/app/dataPersistent SQLite database
qdrant/qdrant/storagePersistent vector database storage

Railway Volumes provide persistent storage for data that must survive deployments.

Private Networking

Use Railway reference variables instead of Docker-style service hostnames. For example:

${{qdrant.RAILWAY_PRIVATE_DOMAIN}}

The service name must exactly match the Railway service name. This allows services to communicate over Railway's private network without exposing internal services publicly.

Do not use:

http://qdrant:6333

Instead, use:

http://${{qdrant.RAILWAY_PRIVATE_DOMAIN}}:6333

The same pattern is used for the Wren Engine, Ibis Server, Wren AI Service, and Wren UI endpoints.

Deployment Order

Deploy the services in this order:

  1. Create qdrant and its volume at /qdrant/storage.
  2. Deploy wren-engine and add its volume at /usr/src/app/etc.
  3. Create /usr/src/app/etc/config.properties.
  4. Deploy ibis-server.
  5. Deploy wren-ai-service.
  6. Add OPENAI_API_KEY to wren-ai-service.
  7. Create /app/config.yaml with the Railway Qdrant reference.
  8. Deploy wren-ui and add its volume at /app/data.
  9. Enable public networking for wren-ui.
  10. Generate a Railway domain for wren-ui.
  11. Open the generated HTTPS domain.

Railway supports deploying public Docker images directly as service sources, and persistent data should be stored in Volumes rather than ephemeral service storage.

No PostgreSQL or Redis service is required for this deployment.

Why Deploy WrenAI 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 WrenAI 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
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
38
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51