---
title: "Deploy PiClaw"
description: "Self-hosted web workspace for the Pi coding agent: chat, files, terminal"
category: "AI/ML"
url: https://railway.com/deploy/piclaw
---

# Deploy PiClaw

Self-hosted web workspace for the Pi coding agent: chat, files, terminal

**[Deploy PiClaw on Railway](https://railway.com/template/piclaw)**

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

- **Creator:** Agaz Self-Host
- **Category:** AI/ML

## Template content

### PiClaw https://raw.githubusercontent.com/rcarmo/piclaw/v3.3.4/docs/icon-512.png

- **Source:** https://github.com/aalfath/piclaw-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host PiClaw on Railway

PiClaw is an open-source, self-hosted web workspace for the Pi coding agent. In one browser window you chat with the agent, browse and edit files, run commands in a terminal and view the results. Conversations, files and scheduled tasks are kept between visits, and model requests go to the provider you choose.

## About Hosting PiClaw

This template runs PiClaw 3.3.4 from its official image, built from a public GitHub repo, behind a small Caddy proxy. A fresh PiClaw has no login and its agent can run shell commands, so the proxy asks for a username and a generated password on every request except the health check. You only enter one thing: an API key for an OpenAI-compatible provider (OpenAI by default; OpenRouter, Groq, DeepSeek, vLLM or Ollama work too). One volume at `/workspace` holds your files, chats, settings and the agent's profile, so they survive restarts and redeploys. If PiClaw stops for good, the container exits with an error so Railway restarts it.

## Common Use Cases

* A private coding agent you can reach from any browser, desktop or phone
* Editing, testing and running scripts in a persistent cloud workspace
* Scheduled agent tasks and notes that persist between sessions

## Dependencies for PiClaw Hosting

* An API key for an OpenAI-compatible model provider
* One Railway volume (included in the template)

### Deployment Dependencies

* PiClaw: https://github.com/rcarmo/piclaw (release v3.3.4)
* PiClaw documentation: https://github.com/rcarmo/piclaw/blob/v3.3.4/docs/getting-started.md
* Template repo: https://github.com/aalfath/piclaw-railway-template
* Get an API key: https://platform.openai.com/api-keys or https://openrouter.ai/keys

### Implementation Details

**Service:** one service, `PiClaw`, built from `aalfath/piclaw-railway-template` (the official `ghcr.io/rcarmo/piclaw:v3.3.4` image pinned by digest, plus Caddy 2.11.9 for the login and `/healthz`), with a volume at `/workspace`.

**After deploy:**

1. Open the public URL and sign in as `piclaw` with the `PICLAW_PASSWORD` from the service's Variables tab.
2. Start chatting. The model in `LLM_MODEL` is preselected; `/model` switches it, and `/login` in the chat adds other providers (Anthropic, Gemini, GitHub Copilot and more).
3. Optional: run `/totp` in the chat to add PiClaw's own authenticator-code login.

**Variables:** `LLM_API_KEY` (required, read from the environment and never saved to the volume), `LLM_BASE_URL` (default `https://api.openai.com/v1`), `LLM_MODEL` (default `gpt-5.4-mini`), `PICLAW_PASSWORD` (generated), `PICLAW_USERNAME` (`piclaw`).

**Resources:** about 230 MB of RAM at idle; it runs on a 0.5 GB service. Use 1 GB or more if the agent builds or runs heavy code in its terminal.

**Limits:** single-user. The agent has `sudo` inside its own container, so don't add secrets to the service that the agent shouldn't see. No Docker-in-Docker, VNC desktop or GPU on Railway.

**Updates:** when we bump the pinned version in the repo, Railway shows an "update available" notice on your project. Read the repo's `CHANGELOG.md` first; your data stays on the volume.

## Why Deploy PiClaw 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 PiClaw 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/piclaw
