---
title: "Deploy xmtp-openclaw-template"
description: "xmtp-openclaw-template for deploying with xmtp"
category: "Other"
url: https://railway.com/deploy/xmtp-openclaw-template
---

# Deploy xmtp-openclaw-template

xmtp-openclaw-template for deploying with xmtp

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

- **Creator:** XMTP Labs
- **Category:** Other
- **Total deploys:** 9

## Template content

### xmtp-clawdbot-template

- **Source:** xmtplabs/xmtp-openclaw-template
- **Public domain:** Yes

## Documentation

Full README you can paste in:

```markdown
# Deploy and Host xmtp-openclaw-template on Railway

**What is xmtp-openclaw-template?** One-click Railway deploy for **OpenClaw** with the **XMTP** channel. It runs an XMTP-capable agent in a container and exposes a **/setup** web wizard so you can configure wallet key, DB encryption key, and env (production/dev) without SSH. Uses the [xmtplabs/openclaw](https://github.com/xmtplabs/openclaw) fork (branch `feat/xmtp-and-convos-extensions`) and the [XMTP channel docs](https://github.com/xmtplabs/openclaw/blob/feat/xmtp-and-convos-extensions/docs/channels/xmtp.md).

## About Hosting xmtp-openclaw-template

Deploy is Docker-based: the image builds OpenClaw from source (Node 22, Bun for build), installs the XMTP extension, and runs an Express wrapper that proxies to OpenClaw and serves the **/setup** UI. The app listens on **port 8080** and uses **/setup/healthz** for health checks. You configure the agent (wallet key, DB encryption key, `env`, policies) through the setup wizard or by setting `OPENCLAW_*` / `CLAWDBOT_*` env vars. For persistence across restarts, use a Railway volume and set `OPENCLAW_STATE_DIR` (or `CLAWDBOT_STATE_DIR`) to that path. Optionally set `SETUP_PASSWORD` to protect the setup page and `OPENCLAW_GATEWAY_TOKEN` for the OpenClaw gateway/control UI.

## Common Use Cases

- Run an **XMTP agent in the cloud** with minimal setup (1-click deploy + /setup wizard).
- **Demo or test** an OpenClaw + XMTP stack on Railway without managing servers.
- **Host a long-lived bot** that responds to XMTP messages and uses `/address` and `send` actions.

## Dependencies for xmtp-openclaw-template Hosting

- **Node.js 22** (runtime).
- **OpenClaw** (built from [xmtplabs/openclaw](https://github.com/xmtplabs/openclaw) `feat/xmtp-and-convos-extensions` inside the image).
- **Railway** (or any Docker host that supports Dockerfile builds and optional volumes).

### Deployment Dependencies

- [OpenClaw (xmtplabs fork with XMTP)](https://github.com/xmtplabs/openclaw) — branch `feat/xmtp-and-convos-extensions`
- [XMTP channel documentation](https://github.com/xmtplabs/openclaw/blob/feat/xmtp-and-convos-extensions/docs/channels/xmtp.md)
- [Railway](https://railway.com) — deploy and hosting

### Implementation Details

Deploy is driven by **railway.toml** (Dockerfile builder, health check, restart policy) and a **Dockerfile** that: (1) builds OpenClaw from source in a build stage (git clone, pnpm install/build, UI build), (2) copies the built OpenClaw into a runtime image and installs the template wrapper deps (`express`, `http-proxy`, `tar`), (3) sets `OPENCLAW_BUNDLED_PLUGINS_DIR=/openclaw/extensions` so the XMTP extension is available, (4) runs `node src/server.js`, which starts the Express server and spawns OpenClaw; the server listens on `PORT` (default 8080). Health check: `healthcheckPath = "/setup/healthz"`, `healthcheckTimeout = 300`. For persistence, add a Railway volume and set `OPENCLAW_STATE_DIR` (or `CLAWDBOT_STATE_DIR`) to the volume path so auth and gateway token survive restarts.

## Why Deploy xmtp-openclaw-template 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 xmtp-openclaw-template 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.

---

# OpenClaw Railway Template (XMTP)

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/deploy/_1f6xq?referralCode=UxaXte&utm_medium=integration&utm_source=template&utm_campaign=generic)

### Setup

Install the XMTP plugin, then configure:

```bash
openclaw plugins install @xmtplabs/xmtp
openclaw configure
```

Alternative: use the [xmtplabs/openclaw](https://github.com/xmtplabs/openclaw) fork (branch `feat/xmtp-and-convos-extensions`) and run `openclaw plugins install ./extensions/xmtp` from the repo.

Choose environment (`production`/`dev`) and keys (`Random` or `Custom`). The wizard displays your agent's public address.

### Commands

| Command | Description |
|---------|-------------|
| `/address` | Print your XMTP public agent address |

### Actions

| Action | Params | Description |
|--------|--------|-------------|
| `send` | `to`, `message` | Send a text message to an XMTP address |

### Config

| Key | Default | Description |
|-----|---------|-------------|
| `walletKey` | — | Wallet private key (hex) |
| `dbEncryptionKey` | — | DB encryption key |
| `env` | `production` | `production` or `dev` |
| `dmPolicy` | `pairing` | `pairing`, `allowlist`, `open`, `disabled` |
| `groupPolicy` | `open` | `open`, `disabled`, `allowlist` |
| `allowFrom` | — | Address allowlist (when `dmPolicy` is `allowlist`) |
| `groups` | — | Conversation ID allowlist (when `groupPolicy` is `allowlist`) |
```

## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/xmtp-openclaw-template
