---
title: "Deploy SillyTavern — Self-Hosted AI Character Chat Frontend"
description: "Power-user AI character chat — any LLM, uncensored, your server"
category: "AI/ML"
url: https://railway.com/deploy/sillytavern-llm-frontend
---

# Deploy SillyTavern — Self-Hosted AI Character Chat Frontend

Power-user AI character chat — any LLM, uncensored, your server

**[Deploy SillyTavern — Self-Hosted AI Character Chat Frontend on Railway](https://railway.com/template/sillytavern-llm-frontend)**

- **Creator:** SilverBanana
- **Category:** AI/ML
- **Total deploys:** 15

## Template content

### SillyTavern https://sillytavern.app/img/logo.png

- **Image:** ghcr.io/null2264/st-railway:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host SillyTavern on Railway

SillyTavern is the most powerful open-source LLM frontend for power users — a self-hosted interface for character-driven chat, roleplay, and advanced prompt engineering that works with virtually any AI backend: OpenAI, Anthropic, Google, OpenRouter, KoboldAI, text-generation-webui, and local models. Character cards, group chats, world info, extensions, and fine-grained sampler control, all on infrastructure you own. This template deploys it with the Railway-specific security configuration already solved.

---

## What This Template Deploys

| Service | Purpose |
| --- | --- |
| **SillyTavern** | The full frontend, character manager, and API connector on port `8000` |

A single Node.js service. SillyTavern stores everything on disk, so persistent volumes at `/config` and `/data` hold your configuration, characters, chats, and settings across redeploys.

---

## About Hosting SillyTavern

SillyTavern is built to run on your own machine, and that creates one specific problem on any cloud host that stops most deployments cold: **it ships with `whitelistMode: true`, which blocks every connection that isn't from localhost.** Deploy it as-is on Railway and you're locked out of your own instance with a "Blocked connection from [IP]" error — the IP whitelist is checking against a fixed local address that doesn't exist in a cloud environment with dynamic IPs.

The fix has two parts, and doing only the first breaks it a different way:

1. **Disable IP whitelisting** (`SILLYTAVERN_WHITELISTMODE=false`), because Railway assigns dynamic IPs with no stable gateway to whitelist.
2. **Enable basic auth** (`SILLYTAVERN_BASICAUTHMODE=true` with a username and password), because SillyTavern refuses to start when listening publicly unless at least one security layer — whitelist, basic auth, or account mode — is active. Turn off the whitelist without replacing it and the server won't boot.

This template configures both, so your instance is reachable *and* protected from the first deploy. This matters more than usual here: SillyTavern connects to LLM backends using your API keys, so an unprotected public instance is an open door to your provider credits.

Typical cost: **~$5/month** on Railway's Hobby plan for a single always-on frontend. SillyTavern is free and MIT-licensed; you pay only for the LLM backends you connect.

---

## How It Compares

| | SillyTavern (self-hosted) | character.ai | Chub / Venus | LibreChat |
| --- | --- | --- | --- | --- |
| Cost model | Flat ~$5/mo infra | Free / c.ai+ tier | Free / paid tier | Self-hosted |
| Backend choice | Any LLM / API / local | Locked to c.ai | Hosted proxies | Cloud + local |
| Content filtering | None — you control it | Heavily filtered | Varies | None |
| Character cards | Full import/export | Platform-locked | Yes | Limited |
| Sampler control | Full | None | Limited | Basic |
| Data ownership | Full | Vendor | Vendor | Full |
| Self-hostable | Yes | No | No | Yes |

character.ai is the easiest to start with but locked to its own filtered model. Chub/Venus are hosted proxies you don't control. LibreChat is a strong self-hosted option but assistant-focused rather than character-focused. SillyTavern wins on backend freedom, deep prompt control, and keeping everything on your own server.

---

## Deploy in Under 5 Minutes

1. Click **Deploy on Railway** and wait for the build (~2 minutes)
2. Confirm `SILLYTAVERN_WHITELISTMODE=false` and `SILLYTAVERN_BASICAUTHMODE=true` are set
3. Set `SILLYTAVERN_BASICAUTHUSER_USERNAME` and `_PASSWORD` to strong values
4. Confirm volumes are mounted at `/config` and `/data`
5. Open your Railway domain, log in with your basic-auth credentials, and add an API backend under Connections

No config.yaml editing, no whitelist debugging, no lockout.

---

## Common Use Cases

- **Character-driven AI chat** — import character cards and hold persistent, in-character conversations with any LLM backend
- **Advanced roleplay and storytelling** — group chats, world info, and lorebooks for complex multi-character narratives
- **Prompt engineering workbench** — fine-grained control over samplers, context, instruct templates, and system prompts that simpler frontends hide
- **Private AI companion** — a personal, self-hosted frontend where conversations stay on your own server, not a third-party app
- **Extension-powered workflows** — image generation, text-to-speech, and vector storage through SillyTavern's extension system

---

## Configuration

| Variable | Required | Description |
| --- | --- | --- |
| `SILLYTAVERN_WHITELISTMODE` | Required | Set `false` — Railway's dynamic IPs can't be whitelisted, and the default `true` locks you out |
| `SILLYTAVERN_BASICAUTHMODE` | Required | Set `true` — replaces the whitelist as the security layer; required for public listening |
| `SILLYTAVERN_BASICAUTHUSER_USERNAME` | Required | Basic-auth username |
| `SILLYTAVERN_BASICAUTHUSER_PASSWORD` | Required | Basic-auth password — use a strong value |
| `SILLYTAVERN_LISTEN` | Pre-set | `true` — allows connections beyond localhost |
| `SILLYTAVERN_DATAROOT` | Pre-set | `/data` — user data directory, mounted to a volume |
| `SILLYTAVERN_PORT` | Pre-set | `8000` |
| `SILLYTAVERN_WHITELIST` | Optional | If whitelisting, must be a JSON string, e.g. `'["127.0.0.1"]'` |
| `NODE_ENV` | Pre-set | `production` |

> **Never set `WHITELISTMODE=false` without `BASICAUTHMODE=true`.** SillyTavern won't start when listening publicly with no security layer, and if it did, your instance — and the API keys connected to it — would be open to anyone. Both must be set together.

> **Config values that are arrays or objects must be JSON-stringified.** For example, `SILLYTAVERN_WHITELIST='["127.0.0.1", "::1"]'`. A plain comma list will not parse.

---

## Dependencies for SillyTavern Hosting

- Railway account — Hobby plan (~$5/month) runs the frontend
- Persistent Railway volumes at `/config` and `/data` (included)
- An LLM backend: an API key (OpenAI, Anthropic, OpenRouter) or a reachable local model server
- Optional: extension backends for image generation, TTS, or vector storage

### Deployment Dependencies

- [SillyTavern GitHub Repository](https://github.com/SillyTavern/SillyTavern)
- [SillyTavern Documentation](https://docs.sillytavern.app/)
- [Docker Installation Guide](https://docs.sillytavern.app/installation/docker/)
- [config.yaml Reference](https://docs.sillytavern.app/administration/config-yaml/)

### Implementation Details

The template runs `ghcr.io/sillytavern/sillytavern:latest` on port `8000` with volumes at `/config` and `/data`. SillyTavern resolves configuration with environment variables (prefixed `SILLYTAVERN_`) taking precedence over `config.yaml`, so the security setup is applied through variables rather than a mounted config file.

The critical settings are `whitelistMode` and `basicAuthMode`. SillyTavern's startup includes a security check that refuses to run when `listen: true` unless at least one of whitelist mode, basic auth, or account mode is enabled — a deliberate guard against accidentally exposing an unprotected instance. Because Railway uses dynamic IPs with no stable gateway to whitelist, this template disables the whitelist and enables basic auth as the replacement, satisfying that guard while keeping the instance reachable.

Configuration keys expecting arrays or objects must be JSON-stringified when set via environment variable. All user content — characters, chats, presets, and settings — lives under `/data`, and configuration under `/config`; both are on volumes so nothing is lost on redeploy.

---

## Frequently Asked Questions

**Why am I locked out with "Blocked connection"?** SillyTavern defaults to `whitelistMode: true`, which only allows localhost. On Railway's dynamic IPs that blocks you from your own instance. Set `SILLYTAVERN_WHITELISTMODE=false` and enable basic auth instead — this template does both.

**Why can't I just disable the whitelist?** SillyTavern won't start when listening publicly with no security layer active. Disabling the whitelist alone trips that guard. You must enable basic auth (or account mode) as the replacement, which is why both variables are set together.

**Which AI backends does it support?** Nearly all of them — OpenAI, Anthropic, Google, OpenRouter, KoboldAI, text-generation-webui, and local model servers. Add your key or endpoint under Connections and switch per chat.

**Do my characters and chats survive a redeploy?** Yes, because they live on the `/data` volume. Configuration lives on `/config`. Both persist across redeploys — without them, everything would reset.

**Do I need a GPU?** Not for cloud backends. SillyTavern is a frontend that sends requests to whatever backend you connect. A GPU only matters for local inference, which would run on a separate host since Railway provides none.

**Is my instance secure?** With basic auth enabled, it's protected by a username and password. Use strong credentials — the instance holds connections to your LLM providers, so an open one exposes your API credits.

**Can I use extensions?** Yes. SillyTavern supports extensions for image generation, text-to-speech, vector storage, and more. Some require enabling server plugins in the config and their own backend service.

---

## Why Deploy SillyTavern 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 SillyTavern on Railway you get the most capable LLM frontend with its biggest cloud pitfall already solved — the whitelist-lockout handled, basic auth enabled, and volumes wired for your characters and chats. Connect any backend, keep your conversations on your own server, and skip the config debugging that stops most self-hosted deployments.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

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