---
title: "Deploy coding.sh"
description: "Self-hosted observability and evals for Claude Code, Codex and AI agents"
category: "AI/ML"
url: https://railway.com/deploy/coding-sh
---

# Deploy coding.sh

Self-hosted observability and evals for Claude Code, Codex and AI agents

**[Deploy coding.sh on Railway](https://railway.com/template/coding-sh)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/coding-sh/manifest.json

- **Creator:** Two Workspaces
- **Category:** AI/ML

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** postgres:17.12-alpine

### coding.sh https://raw.githubusercontent.com/two-workspaces/coding-sh/main/icon.svg

- **Source:** https://github.com/two-workspaces/coding-sh
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host coding.sh on Railway

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/new/template/coding-sh?referralCode=sLjDXb&utm_medium=integration&utm_source=button&utm_campaign=coding-sh)

[coding.sh](https://github.com/jackulau/coding.sh) is open-source observability and evals for AI coding agents: Claude Code, Codex, OpenCode, Cursor, Gemini CLI and others, plus your own apps that call OpenAI, Anthropic or any OpenTelemetry-instrumented model. Every session lands in one viewer with its prompts, tool calls, tokens, cost, duration and test results, and the same server keeps datasets and experiment runs. This template runs `coding.sh serve` 0.1.8 on Railway, the shared team server, with Postgres and keys generated for you.

This is a community template, not made or supported by the coding.sh author.

## About Hosting coding.sh

Deploy and wait for the green check. The **coding.sh** service has two generated keys in its Variables:

- `CODING_SH_READ_KEY` (`csh_rk_…`) opens the viewer. Open the service's Railway domain and paste it into the form, or open `https://‹your-domain›/?t=‹read key›` once; a cookie keeps you signed in until the browser closes.
- `CODING_SH_INGEST_KEY` (`csh_ik_…`) sends sessions. On each developer's machine, install the CLI (`curl -fsSL https://coding.sh/install | sh`) and run `coding.sh init --remote https://‹your-domain› --key ‹ingest key›`. It sets up the agents it finds and sends each new session to the server at the end of every agent turn.

An ingest key can't read and a read key can't send. Without a key the viewer, `/api` and `/metrics` answer with a sign-in form or 401, and ingest answers 401.

**What gets sent:** by default `init --remote` sends metadata only (agent, model, tools, tokens, cost, duration), so sessions show as *Untitled session*. With `--remote-mode full` it also sends prompts, replies, code and tool output, after redacting secrets on the developer's machine. Decide that as a team. `CODING_SH_CAPTURE_MODE=metadata` on the server drops content for everyone.

**Apps in production:** point the Node or Python SDK, or any OpenTelemetry exporter, at the same server: `CODING_SH_URL=https://‹your-domain›` and `CODING_SH_INGEST_KEY=‹ingest key›`, or `OTEL_EXPORTER_OTLP_ENDPOINT=https://‹your-domain›` with the header `Authorization=Bearer ‹ingest key›`.

**More keys:** to give each person or app their own key (and project), set `CODING_SH_INGEST_KEYS` to a list such as `alice:csh_ik_…,bob:csh_ik_…`; it replaces `CODING_SH_INGEST_KEY`. `CODING_SH_READ_KEYS` (`*:csh_rk_…` or `alice:csh_rk_…`) does the same for readers, and `CODING_SH_BASIC_AUTH=user:password` adds one shared browser login. Make keys with `coding.sh serve keygen`. Changing a key signs out whoever holds the old one.

**Your data:** sessions, large payloads and eval data all live in the Postgres service on its volume, so redeploys keep them, and new versions migrate the schema on start. `CODING_SH_RETENTION_DAYS` deletes sessions older than that many days.

## Common Use Cases

- One place to see what a team's Claude Code, Codex and OpenCode sessions cost and do
- Comparing models, prompts or agent setups on the same tasks with datasets and experiments
- Tracing an LLM app in production over OpenTelemetry, next to the coding sessions
- Finding the session behind a change: search by file, tool, error or test result
- Keeping agent transcripts on your own infrastructure instead of a vendor's

## Dependencies for coding.sh Hosting

- Postgres (included)
- The coding.sh CLI or SDK on each machine or app that sends sessions

### Deployment Dependencies

- [coding.sh on GitHub](https://github.com/jackulau/coding.sh)
- [Self-host for a team](https://coding.sh/docs/how-to/self-host-team)
- [Template source](https://github.com/two-workspaces/coding-sh)

### Implementation Details

- **Services:** coding.sh (on the Railway domain) and Postgres 17 on Railway's private network. The app keeps nothing on its own disk, so it has no volume.
- **Image:** the upstream release image `ghcr.io/jackulau/coding.sh:0.1.8` plus one entrypoint script. Upstream's `:latest` moves with every release, so updates come as tested version bumps.
- **Sign-in form fix:** in 0.1.8 the viewer's key form is refused with 403 "forbidden origin" in every browser (its page sends no referrer, so the browser posts it with `Origin: null`). The image accepts that one case when the browser marks the post as same-site, and still refuses cross-site posts.
- **Keys:** generated at deploy time and kept in the service's variables. Upstream's own fallback, keys made on the first start and printed once in the logs, would change on every redeploy without a volume.
- **Never open:** the server refuses to start without an ingest key and a read key (or a login), and the template refuses `CODING_SH_INSECURE`, which would let anyone send and read.
- **Never crash-looping on a variable:** with a missing, short or reused key, a store that isn't Postgres, or a setting serve refuses at start (a wrong database password, a bad key list, a bad number), the service shows a page saying what to fix instead of restarting over and over. The deploy logs say the same.
- **Redeploys:** serve holds a single-writer lock in Postgres. The health check is `/healthz` and the old deploy gets 30 s to flush its queue, so a redeploy hands over within seconds; clients retry the few requests in between.

## Why Deploy coding.sh 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 coding.sh 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/coding-sh
