---
title: "Deploy T3 Code"
description: "Run Claude Code and Codex on an always-on server you steer from your phone"
category: "AI/ML"
url: https://railway.com/deploy/t3-code-1
---

# Deploy T3 Code

Run Claude Code and Codex on an always-on server you steer from your phone

**[Deploy T3 Code on Railway](https://railway.com/template/t3-code-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/t3-code-1/manifest.json

- **Creator:** My Projects
- **Category:** AI/ML

## Template content

### T3 Code https://github.com/pingdotgg.png

- **Image:** node:24-bookworm
- **Start command:** `/bin/sh -c 'set -e; mkdir -p "$HOME/.local/bin" "$HOME/workspaces"; curl -fsSL https://t3.codes/install.sh | sh; [ -z "$T3CODE_AGENT_CLIS" ] || npm install -g --prefix "$HOME/.local" --no-fund --no-audit --allow-scripts=@anthropic-ai/claude-code $T3CODE_AGENT_CLIS; cd "$HOME/workspaces"; exec t3 serve'`
- **Health check:** /
- **Public domain:** Yes

## Documentation

# Deploy and Host T3 Code on Railway
[T3 Code](https://github.com/pingdotgg/t3code) is an open-source app for controlling coding agents such as Claude Code and Codex from any computer or phone. The agents work on a server; you follow and steer their threads from the web app, the desktop app or the iOS and Android apps. This template runs that server on Railway, so your agents keep working when your laptop is closed.
## About Hosting T3 Code
This template runs one service from the official `node:24-bookworm` image:
- T3 Code (`t3 serve`) on port 3773 with a public HTTPS domain, installed by the official installer, which picks up the newest release on each start
- The Claude Code and Codex CLIs, installed or updated from npm on each start (`T3CODE_AGENT_CLIS`)
- A volume at `/data`, used as the home folder: T3 Code's database, paired devices, agent sign-ins and your repositories in `/data/workspaces` survive redeploys
Access is protected by T3 Code's own pairing: only a device that presents a one-time pairing token gets a session.
**After deploy:**
1. Open the service's **Deploy Logs** and find the lines `Token:` and `Pairing URL:`. The token is valid for a few minutes.
2. Open `https://YOUR-RAILWAY-DOMAIN/pair#token=THE-TOKEN` (or open your domain and paste the token). In the mobile or desktop app, add an environment with `https://YOUR-RAILWAY-DOMAIN` and the token.
3. Sign in to Claude or set up Codex on the welcome screen. The sign-ins are kept on the volume.
4. Clone a repository into `/data/workspaces` and open it as a project.
Need another device later, or the token expired? Restart the service and use the new token from the Deploy Logs, or run `t3 pair` in a `railway ssh` session.
## Common Use Cases
- An always-on server for Claude Code and Codex threads you start and review from your phone
- Long agent runs that keep going after you close your laptop
- One place for agent threads shared by your desktop, browser and mobile apps
- A clean cloud workspace for side projects, separate from your own machine
## Dependencies for T3 Code Hosting
- A Claude or ChatGPT subscription, or API keys, for the agents you use
- The T3 Code web, desktop or mobile app to connect with
### Deployment Dependencies
- T3 Code: https://github.com/pingdotgg/t3code (MIT)
- Remote access guide: https://github.com/pingdotgg/t3code/blob/main/docs/user/remote-access.md
### Implementation Details
- The start command runs the official installer (`https://t3.codes/install.sh`), which downloads a release only when a newer one exists, then `npm install -g` for the agent CLIs into `/data/.local`, then `t3 serve` in `/data/workspaces`.
- `T3CODE_HOST=0.0.0.0` and `T3CODE_PORT=3773` make the server reachable through Railway's proxy, which adds HTTPS.
- Set `T3CODE_AGENT_CLIS` to the npm packages you want (empty skips the step). A restart updates T3 Code and the CLIs.
- Anyone with a paired device can run commands in the container through the agents and terminal. Revoke devices in Settings, Sharing & access.
## Why Deploy T3 Code 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 T3 Code 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.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [Weaviate](https://railway.com/deploy/weaviate-1) — Vector database with hybrid search and an API key-protected API
- [Möbius Personal AI OS](https://railway.com/deploy/mobius-v01-personal-ai-os) — Self-hosted AI agent that builds and runs apps for you, with memory.

Open this page in a browser: https://railway.com/deploy/t3-code-1
