---
title: "Deploy Sillytavern"
description: "Chat and roleplay with AI characters using your own API key"
category: "Other"
url: https://railway.com/deploy/sillytavern
---

# Deploy Sillytavern

Chat and roleplay with AI characters using your own API key

**[Deploy Sillytavern on Railway](https://railway.com/template/sillytavern)**

- **Creator:** A3A
- **Category:** Other
- **Total deploys:** 5

## Template content

### sillytavern https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/sillytavern.png

- **Source:** https://github.com/gridalpha/sillytavern-railway
- **Public domain:** Yes

## Documentation

# Deploy and Host SillyTavern on Railway

SillyTavern is an open-source frontend for large language models, built for people who want control over the conversation rather than a chat box. Characters are portable character cards, lore lives in World Info entries, several characters can share a group chat, and the sampler, prompt template and context budget are editable. It ships no model of its own — connect OpenAI, Anthropic, OpenRouter, NovelAI, AI Horde or your own Ollama server — so chats, prompts and API keys stay on infrastructure you control.

Deploy SillyTavern on Railway and the awkward part is already done. Running it publicly means putting a login in front of it, and SillyTavern's own startup check refuses to serve a non-loopback address while an admin account has a blank password. This template builds from [gridalpha/sillytavern-railway](https://github.com/gridalpha/sillytavern-railway) on top of the official `ghcr.io/sillytavern/sillytavern` image and sets that password before the server starts, from one variable you pick at deploy time. One service, one volume, HTTPS and a domain — no compose file, no reverse proxy.

![Diagram of the single SillyTavern service and its volume on Railway](https://res.cloudinary.com/rroe4rtk/image/upload/v1787183846/sillytavern-architecture.png)

## Getting Started with SillyTavern on Railway

Set `ST_ADMIN_PASSWORD` at deploy time, or accept the generated one and copy it from the Variables tab. Open the public URL and you land on a login screen showing one account, **`default-user`** — click it, enter that password, and you are in. Nobody else can sign up: there is no registration route, and accounts are made by an admin under Account Management.

First run asks for a persona name, which is how your own messages are signed. Then open **API Connections** (the plug icon, top bar) and point SillyTavern at a model: paste an OpenAI, Anthropic or OpenRouter key, or pick AI Horde and use the anonymous key `0000000000` to try it with no account. Choose a model and the status line turns green. Then open **Character Management** (the card icon, right) and either create a character or drag in a `.png` card. Click it to open the chat and send a message — a reply in character within seconds is the real check that the deployment works.

![SillyTavern roleplay chat with a character replying in-scene](https://res.cloudinary.com/rroe4rtk/image/upload/v1787183848/sillytavern-character-chat.png)
![SillyTavern character card editor beside the open chat](https://res.cloudinary.com/rroe4rtk/image/upload/v1787183850/sillytavern-character-card-editor.png)
![SillyTavern API Connections panel connected to an AI Horde model](https://res.cloudinary.com/rroe4rtk/image/upload/v1787183851/sillytavern-api-connections.png)

## About Hosting SillyTavern

Hosted chat products keep your prompts, characters and stories on someone else's server, under their content rules and retention policy, and hide the prompt actually sent. Self-host SillyTavern and the prompt path is yours to inspect and edit, while the model stays a backend you swap and pay for directly.

Key features:

- **Character cards** — portable `.png` files carrying a character's description, greeting and example dialogue
- **World Info / lorebooks** — keyword-triggered entries injected only when relevant, so a long setting survives a small context window
- **Prompt control** — instruct and context templates, system prompts and sampler settings, saveable as presets
- **Group chats and multi-user accounts** — several characters per conversation; separate handles with separate data
- **Extensions** — image generation, text-to-speech, translation, vector memory and web search, added from the UI
- **Broad backend support** — OpenAI, Anthropic, Google, Mistral, DeepSeek, OpenRouter, NovelAI, AI Horde, KoboldCpp, Ollama and any OpenAI-compatible endpoint

One Node service serves the web app and relays requests to whichever provider you configured. There is no database, queue or worker: all state is files on one Railway volume at the data root, holding every user's chats, characters, personas, presets, assets, extensions and backups.

## Why Deploy SillyTavern on Railway

Everything that normally stands between you and a working install is handled:

- An admin password set before first boot, instead of an app that exits on startup
- One persistent volume, mounted at the data root
- HTTPS, a domain and HSTS, no reverse proxy to configure
- Working per-IP login rate limiting behind Railway's edge
- Redeploys from Git, with chats and characters untouched

## Common Use Cases

- **Private roleplay and collaborative fiction** — long stories with lorebooks, where the chat log never leaves your storage
- **A shared frontend for a team's API keys** — one deployment, several accounts, chats and presets separate
- **A UI for your own model server** — point it at KoboldCpp, Ollama or vLLM and get character cards, prompt templates and samplers

## Dependencies for SillyTavern

- **SillyTavern** — built from [gridalpha/sillytavern-railway](https://github.com/gridalpha/sillytavern-railway) on top of `ghcr.io/sillytavern/sillytavern:latest`. Node on Alpine, listening on port 8000 as an unprivileged user.
- **A persistent volume** at `/home/node/app/data` — every character, chat, preset and account is a file there, so without one they are discarded when the container is recreated.
- **A model provider**, supplied by you. Any supported API key or self-hosted endpoint; none is bundled or needed to deploy.

### Environment Variables Reference

| Variable | Description | Required |
|----------|-------------|----------|
| `ST_ADMIN_PASSWORD` | Password for the `default-user` admin. Applied before the server starts; changing it overwrites the stored password on the next deploy. | Yes |
| `PORT` | HTTP port the app listens on. | Yes |
| `SILLYTAVERN_SESSIONTIMEOUT` | Seconds of inactivity before a login expires; `-1` never expires. | No |
| `SILLYTAVERN_ENABLEDISCREETLOGIN` | `true` hides the account list; a handle must be typed. | No |
| `SILLYTAVERN_EXTENSIONS_ENABLED` | `false` disables UI extensions entirely. | No |

Every other key in SillyTavern's `config.yaml` is settable the same way: `SILLYTAVERN_` plus the key in upper case, nesting flattened to underscores (`extensions.models.embedding` → `SILLYTAVERN_EXTENSIONS_MODELS_EMBEDDING`).

### Deployment Dependencies

- Source repository: https://github.com/gridalpha/sillytavern-railway
- Upstream: https://github.com/SillyTavern/SillyTavern (AGPL-3.0), docs at https://docs.sillytavern.app
- Image: `ghcr.io/sillytavern/sillytavern`; runtime Node.js 18 or newer

## Server Requirements to Self-Host SillyTavern

SillyTavern assembles prompts rather than running inference, so it is light. Memory only climbs with extensions that run local models — vector memory, image captioning and speech-to-text each download one on first use.

| Resource | Minimum | Recommended |
|---|---|---|
| CPU | 1 vCPU | 2 vCPU |
| RAM | 512 MB | 2 GB (4 GB with local-model extensions) |
| Storage | 1 GB | 5 GB+, growing with chats and assets |
| Runtime | Node.js 18 | Node.js 22 LTS |

Run one instance: state is files on one volume with no coordination between processes, so a second replica would diverge rather than share load.

## How to Self-Host SillyTavern Elsewhere

The published image is the quickest route:

```
docker run -d --name sillytavern -p 8000:8000 \
  -v st-data:/home/node/app/data \
  -e SILLYTAVERN_WHITELISTMODE=false \
  -e SILLYTAVERN_ENABLEUSERACCOUNTS=true \
  ghcr.io/sillytavern/sillytavern:latest
```

That leaves the admin account without a password — fine on `localhost`, unsafe elsewhere. Set one before exposing it:

```
docker exec -it sillytavern node recover.js default-user 'your-strong-password'
docker restart sillytavern
```

To run from source, clone the repository, check out the `release` branch, then `npm install && node server.js --listen`. Same rule: `--listen` binds every interface, so set a password first.

## Is SillyTavern Free?

Yes. SillyTavern is open source under AGPL-3.0, with no paid tier, licence key or hosted commercial edition — the project is community-run and says it will always be free. On Railway you pay for the compute and storage the service uses, which for a frontend this light is small. Your real cost is the provider you connect: OpenAI, Anthropic and OpenRouter bill per token, while AI Horde costs nothing.

## FAQ

**What is SillyTavern?**
An open-source web frontend for chatting with large language models, aimed at character-driven roleplay and long-form writing. It supplies the interface, character cards, lorebooks and prompt controls; you supply the model.

**What does this Railway template deploy?**
One SillyTavern service with a persistent volume at its data root, a public HTTPS domain, multi-user accounts on, and an admin password applied before the server starts.

**Do I need an OpenAI API key to use self-hosted SillyTavern?**
No. Any supported provider works, AI Horde's anonymous key `0000000000` generates text with no account, and you can point it at your own Ollama or KoboldCpp server.

**Can several people share one SillyTavern deployment?**
Yes. Each account gets its own handle, data directory, characters and chats. Only an admin creates accounts; there is no public registration.

**What happens if I forget the admin password?**
Change `ST_ADMIN_PASSWORD` in the Variables tab and redeploy; the new value applies on the next boot. A password changed inside the app is otherwise left alone.

**Can I import character cards from Chub or Janitor AI?**
Yes. SillyTavern reads the standard card format, so a `.png` card from those sites imports by dragging it into Character Management.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/sillytavern
