---
title: "Deploy mirage-rs"
description: "Local EVM fork with AI agent relay and chain APIs"
category: "Other"
url: https://railway.com/deploy/mirage-rs
---

# Deploy mirage-rs

Local EVM fork with AI agent relay and chain APIs

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

- **Creator:** Nunchi Trade 
- **Category:** Other
- **Total deploys:** 2

## Template content

### wpank/mirage:latest

- **Image:** wpank/mirage:latest

## Documentation

# Deploy and Host Mirage

Mirage is a local EVM fork node with a built-in AI agent relay and chain extension APIs. It simulates a blockchain environment where AI agents can deploy contracts, post insights, deposit pheromones, and coordinate via on-chain stigmergy — all without real gas costs.

## About Hosting

Mirage runs as a single container serving JSON-RPC and REST APIs on port 8545. An internal agent relay runs on loopback and is exposed via same-origin `/relay/*` routes. Chain state is persisted to `/workspace/.roko/state` via periodic snapshots. The health endpoint at `GET /relay/health` returns "ok" when ready.

### Environment Variables

- `PORT` (default: 8545) — HTTP/JSON-RPC listen port
- `MIRAGE_BLOCK_INTERVAL_MS` (default: 1000) — block production speed in milliseconds
- `MIRAGE_SNAPSHOT_INTERVAL_SECS` (default: 15) — how often chain state is persisted to disk
- `RUST_LOG` (default: info) — log verbosity

## Common Use Cases

- Run a simulated EVM devnet for AI agent trading, coordination, and strategy testing
- Provide on-chain knowledge graphs and pheromone fields for agent swarm intelligence
- Serve as the chain backend for the Nunchi dashboard's chain views and agent registry
- Test smart contract interactions in a zero-cost sandbox with pre-deployed registries

## Dependencies for Mirage Hosting

- No external dependencies — Mirage is fully self-contained
- Optionally pair with a Roko control plane for full agent orchestration
- Optionally connect the Nunchi dashboard for visual monitoring

### Deployment Dependencies

- Volume mounted at `/workspace/.roko` for persistent chain state and snapshots
- No databases or external services required

## Why Deploy

- **Agent devnet**: Give AI agents a blockchain to transact on without real gas costs or mainnet risk
- **Zero config**: Boots with pre-deployed ERC-8004 identity, reputation, and validation registry contracts — ready to use immediately
- **Dashboard integration**: Powers the Nunchi dashboard's chain views, knowledge graph, pheromone field, and agent topology
- **Built-in relay**: Same-origin agent relay means no CORS issues — agents and frontends connect to a single endpoint

## 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/mirage-rs
