|
1 | | -# Deploy and Host Claude Code Server on Railway |
| 1 | +# code-server |
2 | 2 |
|
3 | | -<p align="center"> |
4 | | - <img src="https://raw.githubusercontent.com/sphinxcode/claude-code-server/main/public/claude-code-server-logo.svg" alt="Claude Code Server Logo" width="120" height="120"> |
5 | | -</p> |
| 3 | +[](https://github.com/coder/code-server/discussions) [](https://coder.com/community) [](https://twitter.com/coderhq) [](https://discord.com/invite/coder) [](https://codecov.io/gh/coder/code-server) [](https://coder.com/docs/code-server/latest) |
6 | 4 |
|
7 | | -<p align="center"> |
8 | | - <strong>Browser-based VS Code with Claude Code pre-installed. YOLO mode ready.</strong> |
9 | | -</p> |
| 5 | + |
10 | 6 |
|
11 | | -<p align="center"> |
12 | | - <a href="https://railway.com/deploy/pHwM6f?referralCode=1uw5HI&utm_medium=integration&utm_source=template&utm_campaign=generic"> |
13 | | - <img src="https://railway.com/button.svg" alt="Deploy on Railway"> |
14 | | - </a> |
15 | | -</p> |
| 7 | +Run [VS Code](https://github.com/Microsoft/vscode) on any machine anywhere and |
| 8 | +access it in the browser. |
16 | 9 |
|
17 | | ---- |
| 10 | + |
| 11 | + |
18 | 12 |
|
19 | | -Claude Code Server is a cloud-based VS Code environment with Claude Code CLI pre-installed. Deploy in 60 seconds and start AI-assisted coding directly in your browser. Runs as non-root `clauder` user with persistent storage for extensions, authentication, and workspace files. |
| 13 | +## Highlights |
20 | 14 |
|
21 | | -## About Hosting Claude Code Server |
| 15 | +- Code on any device with a consistent development environment |
| 16 | +- Use cloud servers to speed up tests, compilations, downloads, and more |
| 17 | +- Preserve battery life when you're on the go; all intensive tasks run on your |
| 18 | + server |
22 | 19 |
|
23 | | -Hosting Claude Code Server on Railway provides a fully configured development environment accessible from any browser. The template handles user permissions, volume persistence, and Claude Code installation automatically. On first deploy, set your `PASSWORD` environment variable and attach a volume to `/home/clauder`. The entrypoint script manages permission fixes, user switching via `gosu`, and shell configuration. Your Claude authentication tokens, VS Code extensions, and workspace files persist across redeploys via the mounted volume. |
| 20 | +## Requirements |
24 | 21 |
|
25 | | -## Common Use Cases |
| 22 | +See [requirements](https://coder.com/docs/code-server/latest/requirements) for minimum specs, as well as instructions |
| 23 | +on how to set up a Google VM on which you can install code-server. |
26 | 24 |
|
27 | | -- **Remote AI-assisted development** – Code with Claude from any device with a browser |
28 | | -- **Ephemeral dev environments** – Spin up isolated workspaces for experiments or client projects |
29 | | -- **Team onboarding** – Pre-configured environments for new developers with tools ready to go |
30 | | -- **CI/CD integration** – Use as a hosted development server for automated workflows |
| 25 | +**TL;DR:** Linux machine with WebSockets enabled, 1 GB RAM, and 2 vCPUs |
31 | 26 |
|
32 | | -## Dependencies for Claude Code Server Hosting |
| 27 | +## Getting started |
33 | 28 |
|
34 | | -- **Railway account** – Free tier available |
35 | | -- **Anthropic API access** – For Claude Code authentication |
| 29 | +There are five ways to get started: |
36 | 30 |
|
37 | | -### Deployment Dependencies |
| 31 | +1. Using the [install |
| 32 | + script](https://github.com/coder/code-server/blob/main/install.sh), which |
| 33 | + automates most of the process. The script uses the system package manager if |
| 34 | + possible. |
| 35 | +2. Manually [installing |
| 36 | + code-server](https://coder.com/docs/code-server/latest/install) |
| 37 | +3. Deploy code-server to your team with [coder/coder](https://cdr.co/coder-github) |
| 38 | +4. Using our one-click buttons and guides to [deploy code-server to a cloud |
| 39 | + provider](https://github.com/coder/deploy-code-server) ⚡ |
| 40 | +5. Using the [code-server feature for |
| 41 | + devcontainers](https://github.com/coder/devcontainer-features/blob/main/src/code-server/README.md), |
| 42 | + if you already use devcontainers in your project. |
38 | 43 |
|
39 | | -- [code-server](https://github.com/coder/code-server) – VS Code in the browser by Coder |
40 | | -- [Claude Code](https://docs.anthropic.com/en/docs/claude-code) – AI coding assistant by Anthropic |
41 | | -- [Node.js 20 LTS](https://nodejs.org/) – JavaScript runtime |
42 | | - |
43 | | -### Implementation Details |
| 44 | +If you use the install script, you can preview what occurs during the install |
| 45 | +process: |
44 | 46 |
|
45 | 47 | ```bash |
46 | | -# YOLO mode - skip permission prompts |
47 | | -claude --dangerously-skip-permissions |
| 48 | +curl -fsSL https://code-server.dev/install.sh | sh -s -- --dry-run |
| 49 | +``` |
48 | 50 |
|
49 | | -# Or use the alias |
50 | | -claude-auto |
| 51 | +To install, run: |
51 | 52 |
|
52 | | -# Interactive mode |
53 | | -claude |
| 53 | +```bash |
| 54 | +curl -fsSL https://code-server.dev/install.sh | sh |
54 | 55 | ``` |
55 | 56 |
|
56 | | -## Environment Variables |
57 | | - |
58 | | -| Variable | Required | Default | Description | |
59 | | -|----------|----------|---------|-------------| |
60 | | -| `PASSWORD` | Yes | - | Login password for code-server | |
61 | | -| `CLAUDER_HOME` | Yes | `/home/clauder` | Volume mount path | |
62 | | -| `CLAUDER_UID` | No | `1000` | User ID | |
63 | | -| `CLAUDER_GID` | No | `1000` | Group ID | |
64 | | -| `RUN_AS_USER` | No | `clauder` | Set to `root` if needed | |
| 57 | +When done, the install script prints out instructions for running and starting |
| 58 | +code-server. |
65 | 59 |
|
66 | | -## Volume Configuration |
| 60 | +> **Note** |
| 61 | +> To manage code-server for a team on your infrastructure, see: [coder/coder](https://cdr.co/coder-github) |
67 | 62 |
|
68 | | -> ⚠️ **CRITICAL**: Without a volume, ALL data is lost on every redeploy! |
| 63 | +We also have an in-depth [setup and |
| 64 | +configuration](https://coder.com/docs/code-server/latest/guide) guide. |
69 | 65 |
|
70 | | -| Setting | Value | |
71 | | -|---------|-------| |
72 | | -| **Mount Path** | `/home/clauder` | |
73 | | -| **Size** | 5GB+ recommended | |
| 66 | +## Questions? |
74 | 67 |
|
75 | | -## Why Deploy Claude Code Server on Railway? |
| 68 | +See answers to [frequently asked |
| 69 | +questions](https://coder.com/docs/code-server/latest/FAQ). |
76 | 70 |
|
77 | | -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. |
| 71 | +## Want to help? |
78 | 72 |
|
79 | | -By deploying Claude Code Server on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway. |
| 73 | +See [Contributing](https://coder.com/docs/code-server/latest/CONTRIBUTING) for |
| 74 | +details. |
80 | 75 |
|
81 | | ---- |
| 76 | +## Hiring |
82 | 77 |
|
83 | | -## Credits |
| 78 | +Interested in [working at Coder](https://coder.com/careers)? Check out [our open |
| 79 | +positions](https://coder.com/careers#openings)! |
84 | 80 |
|
85 | | -- [code-server](https://github.com/coder/code-server) by Coder |
86 | | -- [Claude Code](https://github.com/anthropics/claude-code) by Anthropic |
| 81 | +## For Teams |
87 | 82 |
|
88 | | -**License:** MIT |
| 83 | +We develop [coder/coder](https://cdr.co/coder-github) to help teams to |
| 84 | +adopt remote development. |
0 commit comments