---
title: "Deploy DeepTutor"
description: "Personal AI tutor for your documents, with login and persistent storage"
category: "AI/ML"
url: https://railway.com/deploy/deeptutor
---

# Deploy DeepTutor

Personal AI tutor for your documents, with login and persistent storage

**[Deploy DeepTutor on Railway](https://railway.com/template/deeptutor)**

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

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### DeepTutor https://raw.githubusercontent.com/HKUDS/DeepTutor/v1.7.3/web/public/logo.png

- **Source:** https://github.com/aalfath/deeptutor-railway-template
- **Health check:** /api/auth/status
- **Public domain:** Yes

## Documentation

# Deploy and Host DeepTutor on Railway

DeepTutor is an open-source, Apache-2.0 personal AI tutor from the HKU Data Intelligence Lab (HKUDS). Upload your documents into knowledge bases, then chat with them, get step-by-step problem solving, generate practice questions, run deep research and keep notebooks, using the LLM and embedding provider of your choice.

## About Hosting DeepTutor

This template runs the official DeepTutor 1.7.3 image (`ghcr.io/hkuds/deeptutor`, pinned by digest) as one service built from this GitHub repo. The Next.js web UI and the FastAPI backend run in the same container. The UI listens on Railway's `PORT` and proxies the API internally. Everything DeepTutor stores (settings, model keys, knowledge bases, chat history, users) lives on a volume at `/app/data`, so it survives redeploys and restarts. Login is turned on at first boot: the admin user is `admin`, and the password is generated for you in `ADMIN_PASSWORD`. After deploy, open the URL, log in, and add your LLM and embedding provider keys under Settings.

## Common Use Cases

* Study from your own PDFs, notes and textbooks with answers grounded in your documents
* Generate practice questions and quizzes, and work through problems step by step
* Run a shared tutor for a family, class or study group, with one account per learner

## Dependencies for DeepTutor Hosting

* An API key for an LLM provider (OpenAI, Anthropic, Gemini, DeepSeek, OpenRouter, a self-hosted Ollama or any OpenAI-compatible endpoint), entered in Settings after deploy
* An embedding model (the same provider usually works) for knowledge bases

### Deployment Dependencies

* [DeepTutor on GitHub](https://github.com/HKUDS/DeepTutor)
* [DeepTutor Docker image](https://github.com/HKUDS/DeepTutor/pkgs/container/deeptutor)
* [Template source repo](https://github.com/aalfath/deeptutor-railway-template)

### Implementation Details

Variables:

| Variable | Default | Purpose |
|---|---|---|
| `ADMIN_USERNAME` | `admin` | Login name of the admin account |
| `ADMIN_PASSWORD` | generated, 24 characters | Admin password; change it here and redeploy to rotate it |
| `PORT` | `3782` | Port of the web UI |

DeepTutor reads its settings from JSON files on the volume, not from environment variables. A small start script in this repo writes the login (`auth.json`, bcrypt hash only) and the port and CORS origin (`system.json`) on every boot, then starts the image's own entrypoint. Model providers, API keys and everything else are set in the web UI and kept on the volume.

The health check is `/api/auth/status`. The first deploy takes a few minutes, because the image is about 1 GB.

Admins can add more accounts under Settings → Users. Self-registration stays closed.

Updates: this template builds from [aalfath/deeptutor-railway-template](https://github.com/aalfath/deeptutor-railway-template). When we move it to a new DeepTutor release, Railway shows an "update available" notice on your project, and you choose when to apply it. Read `CHANGELOG.md` first: breaking changes are listed at the top of each entry.

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

- [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 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/deeptutor
