Railway

Deploy Chat UI Pro Stack: Self Hosted HuggingChat with Bifrost and Mongo

The open chat app behind HuggingChat, on any model, with its own database.

Deploy Chat UI Pro Stack: Self Hosted HuggingChat with Bifrost and Mongo

Just deployed

/app/data

Just deployed

/var/lib/postgresql/data

MongoDB

mongo:7

Just deployed

/data/db

Deploy and Host Hugging Face Chat UI with Railway

Hugging Face Chat UI is the open source codebase that powers HuggingChat, a fast, self hosted chat interface for any OpenAI compatible model. This Pro Stack template runs it on Railway with MongoDB for storage and the Bifrost AI gateway in front, so every model call flows through one governed endpoint while conversations, users, and settings persist in your own database.

About Hosting Hugging Face Chat UI

The stack is four services: Chat UI, MongoDB, the Bifrost AI gateway, and Postgres. Chat UI serves the SvelteKit chat interface and stores all conversations, users, settings, and assistants in MongoDB. Bifrost holds your real provider keys and handles routing, failover, virtual keys, budgets, and request logging, with Postgres storing its configuration and logs. Chat UI points at Bifrost through a single base URL environment variable and automatically discovers whatever models Bifrost serves, so the app never holds a real provider key itself.

Common Use Cases

  • Run a private, self hosted HuggingChat style interface for a team across any model provider.
  • Keep conversations, users, and settings in your own MongoDB instead of a third party service.
  • Put budgets and rate limits on shared AI usage so a single team cannot run up an unbounded bill.
  • Switch or fail over between model providers centrally in Bifrost without touching the chat app.

Dependencies for Hugging Face Chat UI Hosting

  • MongoDB for conversations, users, settings, and assistants.
  • Postgres for Bifrost configuration and request log storage.

Deployment Dependencies

Why Deploy Hugging Face Chat UI 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 Chat UI with Bifrost on Railway gives you a private, multi model chat backed by your own database, with budgets, failover, and a request log under every message from day one.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
112
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
[Jun'26] Self-improving AI agent with memory, skills, and web dashboard 🤖

codestorm
41
View Template
EchoDeck
Generate a mp4 from powerpoint with TTS

Fixed Scope
7