|
| 1 | +# Railway Template Setup Guide |
| 2 | + |
| 3 | +Step-by-step guide to configure the Claude Code Server Railway template. |
| 4 | + |
| 5 | +--- |
| 6 | + |
| 7 | +## Template Metadata |
| 8 | + |
| 9 | +| Field | Value | |
| 10 | +|-------|-------| |
| 11 | +| **Name** | Claude Code Server | |
| 12 | +| **Description** | Claude Code in Browser – Full VS Code with AI coding assistants | |
| 13 | +| **Repository** | `sphinxcode/claude-code-server` | |
| 14 | + |
| 15 | +--- |
| 16 | + |
| 17 | +## Step 1: Create Template |
| 18 | + |
| 19 | +1. Go to [Railway Templates](https://railway.com/new/template) |
| 20 | +2. Select your GitHub repository: `sphinxcode/claude-code-server` |
| 21 | +3. Configure the template metadata as shown above |
| 22 | + |
| 23 | +--- |
| 24 | + |
| 25 | +## Step 2: Configure Variables |
| 26 | + |
| 27 | +### Required Variables |
| 28 | + |
| 29 | +| Variable | Type | Description | |
| 30 | +|----------|------|-------------| |
| 31 | +| `PASSWORD` | **Secret** | Login password for code-server | |
| 32 | +| `CLAUDER_HOME` | **Path** | Volume mount path — use `/home/coder` for existing deployments | |
| 33 | + |
| 34 | +> ⚠️ **CRITICAL**: `CLAUDER_HOME` MUST match your volume mount path! |
| 35 | +
|
| 36 | +### Optional User Variables |
| 37 | + |
| 38 | +| Variable | Default | Description | |
| 39 | +|----------|---------|-------------| |
| 40 | +| `CLAUDER_UID` | `1000` | User ID | |
| 41 | +| `CLAUDER_GID` | `1000` | Group ID | |
| 42 | +| `RUN_AS_USER` | `clauder` | Set to `root` if you need root access | |
| 43 | + |
| 44 | +### Pre-Install AI CLIs (default: 0) |
| 45 | + |
| 46 | +| Variable | Description | |
| 47 | +|----------|-------------| |
| 48 | +| `INSTALL_OPENCODE` | Install OpenCode | |
| 49 | +| `INSTALL_GEMINI` | Install Gemini CLI | |
| 50 | +| `INSTALL_KILOCODE` | Install KiloCode CLI | |
| 51 | +| `INSTALL_CONTINUE` | Install Continue CLI | |
| 52 | +| `INSTALL_CODEX` | Install Codex CLI | |
| 53 | + |
| 54 | +### Pre-Install Dev Frameworks (default: 0) |
| 55 | + |
| 56 | +| Variable | Description | |
| 57 | +|----------|-------------| |
| 58 | +| `INSTALL_BMAD` | Install BMAD Method | |
| 59 | +| `INSTALL_OPENSPEC` | Install OpenSpec | |
| 60 | +| `INSTALL_SPECKIT` | Install Spec-Kit | |
| 61 | + |
| 62 | +--- |
| 63 | + |
| 64 | +## Step 3: Volume Configuration (REQUIRED) |
| 65 | + |
| 66 | +> ⚠️ **CRITICAL**: Without a volume, ALL data is lost on every redeploy! |
| 67 | +
|
| 68 | +| Setting | Value | |
| 69 | +|---------|-------| |
| 70 | +| **Mount Path** | `/home/clauder` | |
| 71 | +| **Size** | 5GB+ recommended | |
| 72 | +| **Purpose** | Persists extensions, Claude auth, configs | |
| 73 | + |
| 74 | +**Important**: Set `CLAUDER_HOME` to match your volume mount path! |
| 75 | + |
| 76 | +--- |
| 77 | + |
| 78 | +## Step 4: Region Selection |
| 79 | + |
| 80 | +> 📍 **CRITICAL**: Select **US West** region for optimal performance. |
| 81 | +
|
| 82 | +Railway region options: |
| 83 | +- ✅ `us-west1` (recommended) |
| 84 | +- `us-east4` |
| 85 | +- `europe-west4` |
| 86 | +- `asia-southeast1` |
| 87 | + |
| 88 | +--- |
| 89 | + |
| 90 | +## Step 5: Deploy Settings |
| 91 | + |
| 92 | +These are pre-configured in `railway.toml`: |
| 93 | + |
| 94 | +| Setting | Value | |
| 95 | +|---------|-------| |
| 96 | +| Health Check Path | `/healthz` | |
| 97 | +| Health Check Timeout | 300s | |
| 98 | +| Restart Policy | On Failure | |
| 99 | +| Max Retries | 10 | |
| 100 | + |
| 101 | +--- |
| 102 | + |
| 103 | +## Step 6: Publish Template |
| 104 | + |
| 105 | +1. Test the deployment with your own Railway account |
| 106 | +2. Verify Claude Code authentication works |
| 107 | +3. Confirm volume persistence across redeploys |
| 108 | +4. Publish the template |
| 109 | + |
| 110 | +--- |
| 111 | + |
| 112 | +## Marketing Copy |
| 113 | + |
| 114 | +### Template Title |
| 115 | +**Claude Code Server** |
| 116 | + |
| 117 | +### Template Tagline |
| 118 | +**Claude Code in Browser – YOLO Mode Enabled 🚀** |
| 119 | + |
| 120 | +### Template Description |
| 121 | + |
| 122 | +> **Full VS Code + Claude Code in your browser. YOLO mode ready.** |
| 123 | +> |
| 124 | +> Skip the approval prompts. Claude runs with `--dangerously-skip-permissions` out of the box—just type `claude-auto` and let it cook. |
| 125 | +> |
| 126 | +> **Why developers love it:** |
| 127 | +> - 🔥 **YOLO Mode** – No permission prompts, pure flow state |
| 128 | +> - ⚡ **Instant Setup** – Deploy in 60 seconds |
| 129 | +> - 💾 **Persistent** – Extensions & auth survive redeploys |
| 130 | +> - 🛡️ **Non-root** – Runs as `clauder` user for security |
| 131 | +> - 🧠 **AI-Ready** – Optional: Gemini, OpenCode, Continue, Codex |
| 132 | +> |
| 133 | +> Perfect for vibe coding, weekend hacks, and shipping fast. |
| 134 | +
|
| 135 | +--- |
| 136 | + |
| 137 | +## Reference: Original Template Comparison |
| 138 | + |
| 139 | +| Old (code-server) | New (Claude Code Server) | |
| 140 | +|-------------------|--------------------------| |
| 141 | +| Generic VS Code | Claude Code + AI CLIs | |
| 142 | +| `coder` user | `clauder` user | |
| 143 | +| No AI tools | 5 optional AI CLIs | |
| 144 | +| No frameworks | BMAD, OpenSpec, Spec-Kit | |
| 145 | +| Basic docs | Auth + region guidance | |
0 commit comments