
Deploy xmtp-openclaw-template
xmtp-openclaw-template for deploying with xmtp
xmtp-clawdbot-template
Just deployed
/data
Full README you can paste in:
# 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)
[](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 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) |
Template Content
xmtp-clawdbot-template
xmtplabs/xmtp-openclaw-templateSETUP_PASSWORD
Essential password prompted when using this template to manage Clawdbot from the web.