---
title: "Deploy Ollama Chat Tone | (Just Updated) Web Chat UI With Ollama Included, Login On From Boot"
description: "Ollama Chat Tone web chat UI for Ollama LLMs, login on, model preloaded"
category: "AI/ML"
url: https://railway.com/deploy/ollama-chat-tone-or-just-updated-web-cha
---

# Deploy Ollama Chat Tone | (Just Updated) Web Chat UI With Ollama Included, Login On From Boot

Ollama Chat Tone web chat UI for Ollama LLMs, login on, model preloaded

**[Deploy Ollama Chat Tone | (Just Updated) Web Chat UI With Ollama Included, Login On From Boot on Railway](https://railway.com/template/ollama-chat-tone-or-just-updated-web-cha)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/ollama-chat-tone-or-just-updated-web-cha/manifest.json

- **Creator:** SuperSlowSloth
- **Category:** AI/ML

## Template content

### ollama-chat-tone

- **Image:** billnice250/chattone:latest@sha256:2e541c97bbb5ed301abc1545e84f2fe2a12ebde07861aabfc85e50531a800fca
- **Start command:** `/bin/sh -c 'export BASIC_AUTH_USER=admin DEFAULT_MODEL=llama3.2:1b OLLAMA_TIMEOUT=10 DB_PATH=/data/app.db OPEN_BROWSER=false; exec /app/server'`
- **Health check:** /healthz
- **Public domain:** Yes

### ollama

- **Image:** ghcr.io/bon5co/ollama-railway:latest@sha256:3dda6341c2be50afdb36678d992a6ac3e2a4af2429b27068e4a1b8c5a0d0cf78

## Documentation

# Deploy and Host Ollama Chat Tone on Railway

**Built for an LLM agent to deploy and use.** The deploy form has no fields. Ollama, the chat UI, the admin login and a preloaded model all come up together, and the contract below lists every address, variable name and one script that logs in and sends a chat message through the stack.

Ollama Chat Tone is a small Go web chat client for Ollama. It has a local login with admin approval for new accounts, per-user conversation history in SQLite, streaming replies, a model picker and an installable progressive web app.

## About Hosting Ollama Chat Tone

This template runs two services. `ollama` is Ollama itself in a wrapper image, pinned by digest: it listens on IPv4 and IPv6, sizes its thread pool to the container's CPU quota (CPU inference is slow without that), and pulls `llama3.2:1b` in the background on first boot. `ollama-chat-tone` is the author's published image, pinned by digest, started with local login switched on: a single admin account `admin` whose secret is `BASIC_AUTH_PASSWORD`, generated for you at deploy time, and a generated `SESSION_SECRET`. Both services have a volume (`/root/.ollama` for model weights, `/data` for the chat database), so models, accounts and conversations survive redeploys. The Ollama API is only reachable on the project's private network; only the chat UI has a public domain. The first reply is slow until the model finishes downloading; `GET /api/models` lists it once it is ready.

### Agent contract

- Public URL: `CHAT_PUBLIC_URL` (`https://` plus the chat service's `RAILWAY_PUBLIC_DOMAIN`). It serves the UI at `/` and the JSON API at `/api/models` and `/api/chat`.
- Private URL: `http://ollama-chat-tone.railway.internal:8080` (also `CHAT_PRIVATE_URL`). Ollama itself is at `http://ollama.railway.internal:11434`, private only.
- Credentials: `BASIC_AUTH_PASSWORD` (generated, 32 characters; the username is `admin`) and `SESSION_SECRET` (generated, signs session cookies).
- Auth: `POST /auth/login` with form fields `username` and `password` sets a session cookie; every other route except `GET /healthz` and the static assets needs that cookie. Unauthenticated requests are redirected (302) to `/auth/login`.
- Health: `GET /healthz` returns 204 without credentials.

```bash
# needs: CHAT_PUBLIC_URL and BASIC_AUTH_PASSWORD from the ollama-chat-tone service variables
J=$(mktemp)
curl -s -o /dev/null -w "health: %{http_code}\n" "$CHAT_PUBLIC_URL/healthz"
curl -s -o /dev/null -w "no login: %{http_code}\n" "$CHAT_PUBLIC_URL/api/models"
curl -s -o /dev/null -w "login: %{http_code}\n" -c "$J" -d "username=admin" --data-urlencode "password=$BASIC_AUTH_PASSWORD" "$CHAT_PUBLIC_URL/auth/login"
until curl -s -b "$J" "$CHAT_PUBLIC_URL/api/models" | grep -q 'llama3.2:1b'; do sleep 10; done
curl -s -b "$J" -H "Content-Type: application/json" "$CHAT_PUBLIC_URL/api/chat" \
  -d '{"model":"llama3.2:1b","stream":false,"messages":[{"role":"user","content":"Reply with the single word pong."}]}'
```

A fresh deploy prints `health: 204`, then `no login: 302`, then `login: 302`, waits while the model downloads (a few minutes on first boot), and then prints the Ollama chat response as JSON with the reply under `message.content`. Send `"stream":true` to get newline-delimited chunks instead of one object. Any other model Ollama can pull works once pulled into the `ollama` service.

## Why Deploy Ollama Chat Tone 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 Chat Tone 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.

- **Agent-ready** - no deployer fields, a contract block and one working login-and-chat script.
- **Ollama included** - the model server is in the same template, wired over the private network, with a model preloaded.
- **Login on from boot** - a generated admin login, signed sessions and admin approval for any signup, so the chat is not an open door to your compute.
- **Persistent** - volumes on the model store and the chat database, and both images pinned by digest.

## Common Use Cases

- **Private chat UI for a self-hosted LLM** - give a team one address, per-user history and a model picker in front of Ollama.
- **Agent-readable Ollama gateway** - an orchestrating agent logs in once and calls `POST /api/chat` without ever touching the Ollama port.
- **Small model sandbox** - pull another model into the `ollama` service and compare replies from the same web UI.

## Dependencies for Ollama Chat Tone Hosting

- None. Models are pulled from the Ollama library by the `ollama` service.

### Deployment Dependencies

- [Ollama Chat Tone source](https://github.com/billnice250/ollama-chat-tone)
- [Ollama documentation](https://github.com/ollama/ollama/blob/main/docs/README.md)
- [Ollama model library](https://ollama.com/library)

### Implementation Details

| Variable | Purpose |
| --- | --- |
| `BASIC_AUTH_PASSWORD` | Generated secret of the `admin` account. |
| `SESSION_SECRET` | Generated key that signs session cookies. |
| `OLLAMA_URL` | Private address of the `ollama` service, set for you. |
| `CHAT_PUBLIC_URL` | HTTPS address of the chat UI and API. |
| `CHAT_PRIVATE_URL` | Address other services in the project use. |

The chat service runs `/app/server` through `/bin/sh -c`, which sets `BASIC_AUTH_USER=admin`, `DEFAULT_MODEL=llama3.2:1b`, `DB_PATH=/data/app.db` and `OPEN_BROWSER=false` before starting. New signups need an email-shaped username and stay pending until the admin approves them on the admin page.


## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius v0.1 Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/ollama-chat-tone-or-just-updated-web-cha
