> ## Documentation Index
> Fetch the complete documentation index at: https://agdiai-597e782f.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Railway

Deploy Agdi on Railway with a one-click template and access it through the web Control UI.
This is the easiest "no terminal on the server" path: Railway runs the Gateway for you.

## Quick checklist (new users)

1. Click **Deploy on Railway** (below).
2. Add a **Volume** mounted at `/data`.
3. Set the required **Variables** (at least `OPENCLAW_GATEWAY_PORT` and `OPENCLAW_GATEWAY_TOKEN`).
4. Enable **HTTP Proxy** on port `8080`.
5. Open `https://<your-railway-domain>/agdi` and connect using your `OPENCLAW_GATEWAY_TOKEN`.

## One-click deploy

[Deploy on Railway](https://railway.com/deploy/clawdbot-railway-template)

After deploy, find your public URL in **Railway → your service → Settings → Domains**.

Railway will either:

* give you a generated domain (often `https://<something>.up.railway.app`), or
* use your custom domain if you attached one.

Then open:

* `https://<your-railway-domain>/agdi` — Control UI

## What you get

* Hosted Agdi Gateway + Control UI
* Persistent storage via Railway Volume (`/data`) so config/credentials/workspace survive redeploys

## Required Railway settings

### Public Networking

Enable **HTTP Proxy** for the service.

* Port: `8080`

### Volume (required)

Attach a volume mounted at:

* `/data`

### Variables

Set these variables on the service:

* `OPENCLAW_GATEWAY_PORT=8080` (required — must match the port in Public Networking)
* `OPENCLAW_GATEWAY_TOKEN` (required; treat as an admin secret)
* `OPENCLAW_STATE_DIR=/data/.agdi` (recommended)
* `OPENCLAW_WORKSPACE_DIR=/data/workspace` (recommended)

## Connect a channel

Use the Control UI at `/agdi` or run `agdi onboard` via Railway's shell for channel setup instructions:

* [Telegram](https://agdiai-597e782f.mintlify.site/channels/telegram.md) (fastest — just a bot token)
* [Discord](https://agdiai-597e782f.mintlify.site/channels/discord.md)
* [All channels](https://agdiai-597e782f.mintlify.site/channels.md)

## Backups & migration

Export your configuration and workspace:

```bash theme={"theme":{"light":"min-light","dark":"min-dark"}}
agdi backup create
```

This creates a portable backup archive you can restore on any Agdi host. See [Backup](https://agdiai-597e782f.mintlify.site/cli/backup.md) for details.

## Next steps

* Set up messaging channels: [Channels](https://agdiai-597e782f.mintlify.site/channels.md)
* Configure the Gateway: [Gateway configuration](https://agdiai-597e782f.mintlify.site/gateway/configuration.md)
* Keep Agdi up to date: [Updating](https://agdiai-597e782f.mintlify.site/install/updating.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.