---
title: "Deploy Tuwunel"
description: "Tuwunel 1.9: fast Matrix homeserver in Rust, successor to conduwuit."
category: "Bots"
url: https://railway.com/deploy/tuwunel-1
---

# Deploy Tuwunel

Tuwunel 1.9: fast Matrix homeserver in Rust, successor to conduwuit.

**[Deploy Tuwunel on Railway](https://railway.com/template/tuwunel-1)**

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

- **Creator:** Agaz Self-Host
- **Category:** Bots

## Template content

### tuwunel https://api.iconify.design/mdi/forum.svg?color=%230dbd8b&width=256&height=256

- **Image:** jevolk/tuwunel:v1.9.2
- **Health check:** /_matrix/client/versions
- **Public domain:** Yes

## Documentation

# Deploy and Host Tuwunel on Railway

Tuwunel is a fast Matrix homeserver written in Rust and the successor to conduwuit. Matrix is an open, federated chat protocol: you can talk to people on matrix.org and other servers, run bridges and bots, and use clients such as Element, Cinny or FluffyChat on every platform.

## About Hosting Tuwunel

This template runs the official `jevolk/tuwunel:v1.9.2` image as one service with its RocksDB database on a Railway volume. Tuwunel serves the `.well-known` files itself, so federation works on the Railway domain over port 443; the public Matrix federation tester reports it as OK. Registration requires the generated token, and the first account registered becomes the server admin. The database worker pool is capped so Tuwunel stays within Railway's process limits. Your server name is the Railway domain; set `TUWUNEL_SERVER_NAME` to a custom domain before the first boot if you want addresses like `@you:example.com`. It needs around 200 MB of memory.

## Common Use Cases

- A private Matrix server for family, friends or a team
- A home for Matrix bots and bridges to other chat networks
- Federated chat with people on matrix.org and other servers

## Dependencies for Tuwunel Hosting

- `jevolk/tuwunel:v1.9.2` (official image)
- A Railway volume at `/var/lib/tuwunel` for RocksDB

### Deployment Dependencies

- [Tuwunel on GitHub](https://github.com/matrix-construct/tuwunel)
- [Tuwunel 1.9.2 release](https://github.com/matrix-construct/tuwunel/releases/tag/v1.9.2)
- [Matrix federation tester](https://federationtester.matrix.org)

### Implementation Details

| Service | Source | Networking | Storage |
| --- | --- | --- | --- |
| tuwunel | `jevolk/tuwunel:v1.9.2` | public domain on 8008 | volume at `/var/lib/tuwunel` |

| Variable | Default | Purpose |
| --- | --- | --- |
| `TUWUNEL_SERVER_NAME` | `${{RAILWAY_PUBLIC_DOMAIN}}` | Server name in user IDs (never change later) |
| `TUWUNEL_REGISTRATION_TOKEN` | generated | Token needed to register |
| `TUWUNEL_WELL_KNOWN__CLIENT` / `__SERVER` | Railway domain | Discovery and federation on port 443 |
| `TUWUNEL_DB_POOL_MAX_WORKERS` | `64` | Keeps threads within Railway's limits |
| `TUWUNEL_IP_SOURCE` | `rightmost_x_forwarded_for` | Real client IPs behind Railway's proxy |

Notes:

- Register the first account in Element with the homeserver URL and the token; it becomes admin.
- Remove `TUWUNEL_ALLOW_REGISTRATION` or rotate the token once everyone has joined.

This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Tuwunel project or matrix-construct.

## Why Deploy Tuwunel 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 Tuwunel 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

- [Telegram JavaScript Bot](https://railway.com/deploy/5lRkWa) — A template for Telegram bot in JavaScript using grammY
- [Cobalt Tools [Updated Sep ’26]](https://railway.com/deploy/cobalt) — Cobalt Tools [Sep ’26] (Media Downloader, Converter & Automation) Self Host
- [Telegram Gateway](https://railway.com/deploy/railway-telegram-gateway) — Multi-bot Telegram webhook gateway with WebSocket event streaming

Open this page in a browser: https://railway.com/deploy/tuwunel-1
