---
title: "Deploy Onyx"
description: "Onyx [Aug '26] - Open Source AI Platform - AI Chat with advanced features"
category: "AI/ML"
url: https://railway.com/deploy/onyx
---

# Deploy Onyx

Onyx [Aug '26] - Open Source AI Platform - AI Chat with advanced features

**[Deploy Onyx on Railway](https://railway.com/template/onyx)**

- **Creator:** darseen
- **Category:** AI/ML
- **Total deploys:** 17

## Template content

### api-server https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/onyx-light.svg

- **Image:** onyxdotapp/onyx-backend:v4.5.4
- **Start command:** `/bin/sh -c "alembic upgrade head && echo 'Starting Onyx Api Server' && exec uvicorn onyx.main:app --host 0.0.0.0 --port 8080"`
- **Health check:** /health

### inference-model-server https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/onyx-light.svg

- **Image:** onyxdotapp/onyx-model-server:v4.5.4
- **Health check:** /api/health

### web-server https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/onyx-light.svg

- **Image:** onyxdotapp/onyx-web-server:v4.5.4
- **Health check:** /

### background https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/onyx-light.svg

- **Image:** onyxdotapp/onyx-backend:v4.5.4
- **Start command:** `/app/scripts/supervisord_entrypoint.sh`

### postgres https://devicons.railway.app/postgres

- **Image:** pgvector/pgvector:pg15
- **Start command:** `docker-entrypoint.sh postgres -c max_connections=250`

### nginx https://devicons.railway.app/nginx

- **Image:** nginx:1.25.5-alpine
- **Start command:** `/bin/sh -c 'printenv NGINX_CONF > /etc/nginx/conf.d/default.conf; until nginx -t; do sleep 3; done; (while :; do sleep 60; nginx -s reload; done &); exec nginx -g "daemon off;"'`
- **Health check:** /nginx-health
- **Public domain:** Yes

### indexing-model-server https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/onyx-light.svg

- **Image:** onyxdotapp/onyx-model-server:v4.5.4
- **Health check:** /api/health

### opensearch https://cdn.jsdelivr.net/gh/selfhst/icons@main/svg/opensearch.svg

- **Image:** opensearchproject/opensearch:3.6.0
- **Start command:** `/bin/bash -c "chown -R 1000:0 /usr/share/opensearch/data; export HOME=/usr/share/opensearch; exec chroot --userspec=1000:0 / /usr/share/opensearch/opensearch-docker-entrypoint.sh opensearch -Ediscovery.type=single-node"`

### redis https://devicons.railway.app/redis

- **Image:** valkey/valkey:8-alpine

### minio https://devicons.railway.app/minio

- **Image:** minio/minio:RELEASE.2025-07-23T15-54-02Z-cpuv1
- **Start command:** `minio server /data --console-address :9001`

## Documentation

# Deploy and Host onyx on Railway

Onyx is an open-source AI platform that connects to your team's documents, tickets, and messages so it can chat, search, and act with full context of your organization. It combines RAG-based chat with 40+ data connectors (Slack, Confluence, GitHub, Google Drive, and more), custom AI agents, and enterprise auth — deployable as a self-hosted alternative to closed AI assistants.

## About Hosting onyx

Onyx is a multi-service application: a FastAPI backend, a Next.js frontend, a Celery-based background worker, and two dedicated ML model servers for embeddings and reranking, backed by Postgres, Redis, OpenSearch, and S3-compatible object storage. This template wires all ten services together on Railway's private network with a single public entry point behind nginx, so the whole stack comes up healthy with one deploy — no manual service linking, connection strings, or Docker Compose required.

## Common Use Cases

- Internal AI search and chat across company docs, wikis, tickets, and chat history
- Self-hosted ChatGPT-style assistant with your own LLM provider and data connectors
- Custom AI agents for support, engineering, or research teams that need RAG over private data

## Dependencies for onyx Hosting

- An API key from an LLM provider (OpenAI, Anthropic, Azure, or any LiteLLM-supported provider), added after first login

### Deployment Dependencies

- [Onyx GitHub repository](https://github.com/onyx-dot-app/onyx)
- [Onyx documentation](https://docs.onyx.app)
- [Onyx connectors list](https://docs.onyx.app/connectors)

## First Deploy

The first deploy takes noticeably longer than later ones. The API server runs Onyx's full database migration chain against an empty Postgres before it starts serving, and nginx sits waiting for the API and web services to become resolvable on the private network before it can pass its own check.

If **nginx** or **api-server** fails with a healthcheck error on that first deploy, open the service → Settings → Deploy → Healthcheck Timeout, raise it to `900` seconds, and redeploy. Railway's default is 300 seconds, which the initial migration run can exceed. Migrations only run once, so the retry comes up quickly and no further changes are needed.

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


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/onyx
