---
title: "Deploy NextChat on Bifrost: Self Hosted ChatGPT UI for Any Model"
category: "AI/ML"
url: https://railway.com/deploy/nextchat-on-bifrost-self-hosted-chatgpt-
---

# Deploy NextChat on Bifrost: Self Hosted ChatGPT UI for Any Model

**[Deploy NextChat on Bifrost: Self Hosted ChatGPT UI for Any Model on Railway](https://railway.com/template/nextchat-on-bifrost-self-hosted-chatgpt-)**

- **Creator:** Maxim AI's Projects
- **Category:** AI/ML
- **Total deploys:** 2

## Template content

### NextChats https://avatars.githubusercontent.com/u/153288546?s=48&v=4

- **Image:** yidadaa/chatgpt-next-web:latest
- **Public domain:** Yes

### Bifrost https://framerusercontent.com/images/k49dViw06yckDjJt5uERdfTSjU.png

- **Image:** maximhq/bifrost:latest
- **Health check:** /health
- **Public domain:** Yes

## Documentation

# Deploy and Host NextChat with Bifrost on Railway

NextChat is a fast, lightweight, open source ChatGPT style UI for the web and desktop. This template runs it on Railway with the Bifrost AI gateway behind it, so the chat app talks to every model provider through one gateway you control, and never holds a real provider key.

## About Hosting NextChat with Bifrost

The stack is two services: NextChat and the Bifrost AI gateway. NextChat serves the chat UI and stores conversations in the browser, so it needs no database. It points at Bifrost over the private network with a single base URL environment variable. Bifrost holds your real provider keys and handles routing, failover, virtual keys, budgets, and request logging, keeping its configuration and logs on a persistent volume. Adding a model is as simple as adding a provider key in Bifrost and listing the model in NextChat's model variable.

## Common Use Cases

- Stand up a private, fast ChatGPT style chat for yourself or a team in minutes.
- Keep one set of provider keys in the gateway instead of pasting them into the chat app.
- Switch or fail over between model providers centrally in Bifrost without redeploying the UI.
- Keep a request log of all chat usage for review and cost visibility.

## Dependencies for NextChat with Bifrost Hosting

- A persistent volume for Bifrost configuration and request logs.

### Deployment Dependencies

- NextChat: https://github.com/ChatGPTNextWeb/NextChat
- Bifrost docs: https://docs.getbifrost.ai
- Bifrost Docker Hub: https://hub.docker.com/r/maximhq/bifrost

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

Running NextChat with Bifrost on Railway gives you a fast private chat UI with centralized keys, failover, and a request log under every message, in a two service deploy.

## 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/nextchat-on-bifrost-self-hosted-chatgpt-
