Railway

Deploy Nao

Self Host analytics agent,Create COntext,Nao chat included

Deploy Nao

Just deployed

/var/lib/postgresql/data

Deploy and Host Nao on Railway

Nao is a self-hosted framework for building and deploying analytics agents. Data teams can create an agent context containing data, metadata, documentation, modeling, rules, tools, and MCPs, then deploy a chat interface where users ask natural-language questions and receive analytics, SQL-driven insights, and visualizations.

About Hosting Nao

Hosting Nao on Railway involves deploying the Nao application from its Docker image and connecting it to a PostgreSQL database for application data. Nao can use external data warehouses and other data sources configured through its agent context, along with an LLM provider such as OpenAI or Anthropic. Your Nao context can be maintained in a Git repository or included with the deployed project. Railway provides the application networking, public HTTPS domain, database infrastructure, environment variables, and scaling needed to run Nao in production without managing servers manually.

Common Use Cases

  • Deploy a self-hosted analytics agent that lets business users ask questions about company data in natural language.
  • Give data teams a centralized interface for building, testing, versioning, and monitoring analytics-agent context.
  • Provide secure, self-hosted analytics experiences using your own data warehouse and LLM provider credentials.

Dependencies for Nao Hosting

  • Nao application — deployed using the getnao/nao:latest Docker image.
  • PostgreSQL — used by Nao as its application database.
  • LLM provider — such as OpenAI or Anthropic, configured according to your Nao project.
  • Analytics data source — a data warehouse or database containing the data your agent will analyze.
  • Nao context — a configured nao_config.yaml and associated context files. The context can optionally be maintained in Git.

Deployment Dependencies

Implementation Details

Deploy the Nao application using:

getnao/nao:latest

Create a PostgreSQL service in the same Railway project and connect Nao to it using a Railway reference variable:

DB_URI=${{Postgres.DATABASE_URL}}

Replace Postgres with the exact name of your Railway PostgreSQL service.

Nao's documented Docker deployment uses port 5005, so configure the application accordingly:

PORT=5005

After generating a Railway public domain, configure the authentication URL:

BETTER_AUTH_URL=https://${{RAILWAY_PUBLIC_DOMAIN}}

LLM credentials and credentials for external analytics data sources should be stored as Railway secrets rather than committed to the Nao project.

If the Nao project is bundled into the deployed image, it can be placed at:

/app/project

and configured with:

NAO_DEFAULT_PROJECT_PATH=/app/project

Alternatively, the Nao context can be maintained in a Git repository and configured through the appropriate Nao context settings.

Why Deploy Nao 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 Nao 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
37
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