Deploy Ollama

Ollama and Open WebUI. Nothing to fill in.

Deploy Ollama

Just deployed

/root/.ollama

Just deployed

/data

Deploy and Host Ollama on Railway

Ollama runs open models. Open WebUI is the chat page in front of it. This template starts both. The deploy form asks for nothing.

About Hosting Ollama

Ollama keeps the models and answers the API. Open WebUI is the only service with a public address. The two talk on Railway private networking. Models stay on a volume at /root/.ollama. Accounts, chats, and settings stay on a volume at /data.

Ollama has no login of its own. Leave it off the public internet. Anyone who can reach a public Ollama can pull models and run them on your bill.

Common Use Cases

  • A private chat for open models
  • An OpenAI compatible API for other services in the same Railway project
  • Embeddings and chat from one model server you control

Dependencies for Ollama Hosting

  • Ollama 0.40.16
  • Open WebUI v0.13.3
  • A volume for models
  • A volume for the chat app
  • Railway private networking

Deployment Dependencies

Implementation Details

Do not add variables. The image already points Open WebUI at http://ollama.railway.internal:11434. The login secret is created on first boot and stored on the volume.

The Ollama service has to be named ollama. That name is the private address. Rename it and the chat app cannot find the model server.

After deploy, open the Open WebUI domain. The first account becomes the admin. Pull a model from the UI. It is saved on the Ollama volume and survives redeploys.

Other services in the same project can call:

http://ollama.railway.internal:11434

OpenAI compatible clients use that host plus /v1.

Why Deploy Ollama 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 Ollama on Railway, you are one step closer to supporting a complete full-stack application.


Template Content

More templates in this category

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

okisdev
117
View Template
Weaviate
Vector database with hybrid search and an API key-protected API

GitHub Locker
1
View Template
Möbius Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1