coder_code-server/RAILWAY_TEMPLATE_GUIDE.md
2026-01-29 19:06:43 +08:00

3.8 KiB
Raw Blame History

Railway Template Setup Guide

Step-by-step guide to configure the Claude Code Server Railway template.


Template Metadata

Field Value
Name Claude Code Server
Description Claude Code in Browser Full VS Code with AI coding assistants
Repository sphinxcode/claude-code-server

Step 1: Create Template

  1. Go to Railway Templates
  2. Select your GitHub repository: sphinxcode/claude-code-server
  3. Configure the template metadata as shown above

Step 2: Configure Variables

Required Variables

Variable Type Description
PASSWORD Secret Login password for code-server
CLAUDER_HOME Path Volume mount path — use /home/coder for existing deployments

⚠️ CRITICAL: CLAUDER_HOME MUST match your volume mount path!

Optional User Variables

Variable Default Description
CLAUDER_UID 1000 User ID
CLAUDER_GID 1000 Group ID
RUN_AS_USER clauder Set to root if you need root access

Pre-Install AI CLIs (default: 0)

Variable Description
INSTALL_OPENCODE Install OpenCode
INSTALL_GEMINI Install Gemini CLI
INSTALL_KILOCODE Install KiloCode CLI
INSTALL_CONTINUE Install Continue CLI
INSTALL_CODEX Install Codex CLI

Pre-Install Dev Frameworks (default: 0)

Variable Description
INSTALL_BMAD Install BMAD Method
INSTALL_OPENSPEC Install OpenSpec
INSTALL_SPECKIT Install Spec-Kit

Step 3: Volume Configuration (REQUIRED)

⚠️ CRITICAL: Without a volume, ALL data is lost on every redeploy!

Setting Value
Mount Path /home/clauder
Size 5GB+ recommended
Purpose Persists extensions, Claude auth, configs

Important: Set CLAUDER_HOME to match your volume mount path!


Step 4: Region Selection

📍 CRITICAL: Select US West region for optimal performance.

Railway region options:

  • us-west1 (recommended)
  • us-east4
  • europe-west4
  • asia-southeast1

Step 5: Deploy Settings

These are pre-configured in railway.toml:

Setting Value
Health Check Path /healthz
Health Check Timeout 300s
Restart Policy On Failure
Max Retries 10

Step 6: Publish Template

  1. Test the deployment with your own Railway account
  2. Verify Claude Code authentication works
  3. Confirm volume persistence across redeploys
  4. Publish the template

Marketing Copy

Template Title

Claude Code Server

Template Tagline

Claude Code in Browser YOLO Mode Enabled 🚀

Template Description

Full VS Code + Claude Code in your browser. YOLO mode ready.

Skip the approval prompts. Claude runs with --dangerously-skip-permissions out of the box—just type claude-auto and let it cook.

Why developers love it:

  • 🔥 YOLO Mode No permission prompts, pure flow state
  • Instant Setup Deploy in 60 seconds
  • 💾 Persistent Extensions & auth survive redeploys
  • 🛡️ Non-root Runs as clauder user for security
  • 🧠 AI-Ready Optional: Gemini, OpenCode, Continue, Codex

Perfect for vibe coding, weekend hacks, and shipping fast.


Reference: Original Template Comparison

Old (code-server) New (Claude Code Server)
Generic VS Code Claude Code + AI CLIs
coder user clauder user
No AI tools 5 optional AI CLIs
No frameworks BMAD, OpenSpec, Spec-Kit
Basic docs Auth + region guidance