---
title: "Deploy DBX"
description: "Web database client for Postgres, MySQL, Redis, Mongo and 100+ more + MCP"
category: "Other"
url: https://railway.com/deploy/dbx
---

# Deploy DBX

Web database client for Postgres, MySQL, Redis, Mongo and 100+ more + MCP

**[Deploy DBX on Railway](https://railway.com/template/dbx)**

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

- **Creator:** Dektion
- **Category:** Other
- **Total deploys:** 1

## Template content

### DBX https://raw.githubusercontent.com/t8y2/dbx/v0.6.26/docs/logo.png

- **Image:** t8y2/dbx:0.6.26
- **Health check:** /api/auth/check
- **Public domain:** Yes

## Documentation

# Deploy and Host DBX on Railway

[DBX](https://github.com/t8y2/dbx) is a database client for 100+ databases, including PostgreSQL, MySQL, Redis, MongoDB, SQLite, DuckDB and SQL Server, with a SQL editor, table browser, AI assistant and an MCP server. This template runs its web version, pinned to 0.6.26.

## About Hosting DBX

Put DBX in the same Railway project as your databases and it reaches them over the private network, so you browse and query them from the browser without opening a public TCP proxy on the database.

The login password is set before anyone can see the page. DBX Web asks the first visitor to choose a password unless `DBX_PASSWORD` is set; here it's generated at deploy and applied on every start, and the first-run setup call is refused. Five wrong passwords in a row lock the login for about a minute.

DBX's own MCP endpoint is on at `DBX_MCP_URL`, behind a generated bearer token (`DBX_WEB_MCP_TOKEN`), so Claude Code, Cursor or another MCP client can list tables and run queries through the connections you saved. Only your Railway domain is accepted as the host; add a custom domain to `DBX_WEB_MCP_ALLOWED_HOSTS` if you use one. Remove the token variable to turn MCP off.

Connections, their encrypted passwords and the key that encrypts them are stored in `/app/data`, which is a volume here, so they survive redeploys.

Before publishing I tested it on Railway with a Postgres in the same project. Without the password the API answered 401, a stranger's first-run setup got 403 and a wrong password 401. Signed in, I saved a connection to `postgres.railway.internal`, created a table, wrote a row and read it back. Over MCP, a request without the token got 401; with it, DBX listed 23 tools and `dbx_execute_query` returned the same row through the saved connection. After a restart I signed in again, the connection was still there and both the web API and MCP read the row, which means the stored credentials and their key survived.

Idle, DBX used 0.01 GB of RAM (0.07 GB at most during the test).

## Common Use Cases

- Browse and query the Postgres, MySQL, Redis or MongoDB in your Railway project from the browser
- Let Claude Code or another MCP client query your databases through one endpoint with one token
- Give a teammate a database UI without sharing public database URLs

## Dependencies for DBX Hosting

A database to connect to. Deploy DBX into the project that has your database; use the database service's private host (for example `postgres.railway.internal`), port and credentials from its Variables tab.

### Deployment Dependencies

- DBX: https://github.com/t8y2/dbx
- Image: `t8y2/dbx:0.6.26`
- DBX docs (web API and MCP): https://dbxio.com

### Implementation Details

```
DBX_URL                  # open this and sign in with DBX_PASSWORD
DBX_MCP_URL              # MCP endpoint
claude mcp add --transport http dbx "$DBX_MCP_URL" --header "Authorization: Bearer $DBX_WEB_MCP_TOKEN"
```

Anyone with `DBX_PASSWORD` or the MCP token can run queries with the credentials of every connection you save. Use a read-only database user for connections that don't need writes. Sessions live in memory, so you sign in again after a restart.

## Why Deploy DBX on Railway?

Your databases on Railway are private by default. DBX on the same private network gives you a GUI and an MCP endpoint for them without exposing the databases themselves, for the cost of a very small service.


## 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/dbx
