Railway

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

Just deployed

/home/node/app/persist/

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

ServicePurpose
SillyTavernThe 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.aiChub / VenusLibreChat
Cost modelFlat ~$5/mo infraFree / c.ai+ tierFree / paid tierSelf-hosted
Backend choiceAny LLM / API / localLocked to c.aiHosted proxiesCloud + local
Content filteringNone — you control itHeavily filteredVariesNone
Character cardsFull import/exportPlatform-lockedYesLimited
Sampler controlFullNoneLimitedBasic
Data ownershipFullVendorVendorFull
Self-hostableYesNoNoYes

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

VariableRequiredDescription
SILLYTAVERN_WHITELISTMODERequiredSet false — Railway's dynamic IPs can't be whitelisted, and the default true locks you out
SILLYTAVERN_BASICAUTHMODERequiredSet true — replaces the whitelist as the security layer; required for public listening
SILLYTAVERN_BASICAUTHUSER_USERNAMERequiredBasic-auth username
SILLYTAVERN_BASICAUTHUSER_PASSWORDRequiredBasic-auth password — use a strong value
SILLYTAVERN_LISTENPre-settrue — allows connections beyond localhost
SILLYTAVERN_DATAROOTPre-set/data — user data directory, mounted to a volume
SILLYTAVERN_PORTPre-set8000
SILLYTAVERN_WHITELISTOptionalIf whitelisting, must be a JSON string, e.g. '["127.0.0.1"]'
NODE_ENVPre-setproduction

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

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.


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
113
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
1
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
51