---
title: "Deploy kothai w/ ollama"
description: "Save now, remember later and do more"
category: "Starters"
url: https://railway.com/deploy/kothai-w-ollama
---

# Deploy kothai w/ ollama

Save now, remember later and do more

**[Deploy kothai w/ ollama on Railway](https://railway.com/template/kothai-w-ollama)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/kothai-w-ollama/manifest.json

- **Creator:** IbrahimTareq
- **Category:** Starters
- **Total deploys:** 1

## Template content

### kothai https://github.com/IbrahimTareq/kothai/blob/main/public/logo.svg

- **Source:** ibrahimTareq/kothai
- **Health check:** /api/health
- **Public domain:** Yes

### ollama

- **Image:** ollama/ollama
- **Start command:** `/bin/sh -c 'OLLAMA_HOST=127.0.0.1:11434 /bin/ollama serve & pid=$!; until OLLAMA_HOST=http://127.0.0.1:11434 /bin/ollama ps >/dev/null 2>&1; do sleep 1; done; OLLAMA_HOST=http://127.0.0.1:11434 /bin/ollama pull nomic-embed-text; OLLAMA_HOST=http://127.0.0.1:11434 /bin/ollama pull llama3.2:3b; kill $pid; wait $pid 2>/dev/null; exec /bin/ollama serve'`

## Documentation

# Deploy and Host Kothai on Railway

Kothai is a self-hosted save-all manager with optional AI. Drop links, images, and text into one box. A model reads and indexes everything so you can search by meaning and ask questions answered from your own stuff. One SQLite file, no cloud account required.

## About Hosting Kothai

This template deploys two services: Kothai's lite image and an Ollama instance that serves it, wired together over Railway's private network. Nothing leaves your project and there's no API key to buy — Ollama pulls `llama3.2:3b` and `nomic-embed-text` on first boot, which takes a few minutes before the AI features come alive. Kothai itself is small (~300 MB RAM, 475 MB disk); Ollama is the heavy half, needing around 8 GB of RAM with a 3B model loaded. Both services get persistent volumes: one for your notes, one for the model weights. Set `KOTHAI_PASSWORD` — Railway gives your instance a public URL.

Prefer a hosted provider? Point `KOTHAI_AI_BASE_URL` at OpenAI or OpenRouter, add `KOTHAI_AI_API_KEY`, and delete the Ollama service. That's cheaper and faster, at the cost of sending your notes to someone else.

## Common Use Cases

- **Personal knowledge base** — save articles, screenshots, and notes from across the web and search them later by meaning, not keywords
- **AI-powered Q&A over your bookmarks** — ask questions in plain English and get cited answers built only from what you saved
- **Team link archive** — a shared instance where a small team collects and retrieves research, references, and inspiration

## Dependencies for Kothai Hosting

- **Persistent volume at `/app/data`** — the SQLite database and uploads (included)
- **Persistent volume at `/root/.ollama`** — model weights, so they survive redeploys (included)
- **Inference endpoint** — the bundled Ollama service, or any OpenAI-compatible API that serves both chat and embeddings

## Notes

- Inference runs on CPU. Saving and search stay fast; Ask takes a few seconds per answer.
- Vision is off by default — image captioning needs a model too large for CPU inference here. Language and embedding cover search, tagging, and Ask.
- Model names are picked in Settings, not through environment variables. Whatever Ollama has pulled shows up in the dropdowns.

## Why Deploy Kothai 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 Kothai 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

- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [caring-vibrancy](https://railway.com/deploy/caring-vibrancy) — Deploy and Host caring-vibrancy with Railway
- [Appsmith](https://railway.com/deploy/appsmith-1) — Low-code platform for internal tools, dashboards, and admin panels.

Open this page in a browser: https://railway.com/deploy/kothai-w-ollama
