---
title: "Deploy pgAdmin"
description: "pgAdmin web UI for PostgreSQL: deploy, log in, register any database"
category: "Storage"
url: https://railway.com/deploy/pgadmin-2
---

# Deploy pgAdmin

pgAdmin web UI for PostgreSQL: deploy, log in, register any database

**[Deploy pgAdmin on Railway](https://railway.com/template/pgadmin-2)**

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

- **Creator:** wotonews
- **Category:** Storage

## Template content

### pgadmin https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/svg/pgadmin.svg

- **Image:** wotonews/pgadmin-ha:v9.18-2

## Documentation

# 🐘 pgAdmin — PostgreSQL Web UI on Railway

pgAdmin is the most popular administration UI for PostgreSQL. This template
deploys it as **one service** with persistent sessions: generate a public
domain, log in with the generated password, register any PostgreSQL database
(Railway private network or external host), and browse schemas, run SQL, watch
sessions and dashboards.

Built from the official [`dpage/pgadmin4`](https://hub.docker.com/r/dpage/pgadmin4)
image plus a thin Railway boot wrapper: the listen port derives from
Railway's injected `PORT`, proxy headers are pre-configured for Railway's
TLS-terminating edge, and Railway volumes (not pre-owned by the pgAdmin user)
are handled correctly at boot.

> 🧩 **Single-purpose by design.** Pair it with any PostgreSQL template —
> e.g. *PostgreSQL HA Failover* — or point it at an existing database. No
> database ships with this card.

---

# Deploy and Host pgAdmin

Deploying this template provisions one service in your Railway project:

| Component | Type | Source / Image | Persistent Volume | Public URL | Description |
| :--- | :--- | :--- | :---: | :---: | :--- |
| **`pgadmin`** | Service | `wotonews/pgadmin-ha:v9.18-2` | Yes (`/var/lib/pgadmin`) | Generate one | pgAdmin web UI — login and register your databases. |

## Template variables

| Variable | Default | Description |
| :--- | :--- | :--- |
| `PGADMIN_DEFAULT_EMAIL` | `admin@template.local` | Login email. Placeholder default — pgAdmin never sends mail; change or keep. |
| `PGADMIN_DEFAULT_PASSWORD` | *generated* (`${{secret(20)}}`) | Login password. Generated fresh at deploy time; applies on first boot only — change it inside pgAdmin afterwards. |

That is the whole card: two described inputs, both with defaults — deploy is
one click.

## Registering your databases

After first login, add a server in the pgAdmin UI (**Add New Server**) with
your database's private hostname, e.g.
`pgaf-primary.railway.internal:5432` for a *PostgreSQL HA Failover* cluster
deployed in the same project (private-network trust means no password is
stored for it).

Power users can pre-register servers at boot instead: set
`PGADMIN_SERVER_1_NAME` / `PGADMIN_SERVER_1_HOST` / `PGADMIN_SERVER_1_PORT` /
`PGADMIN_SERVER_1_USERNAME` / `PGADMIN_SERVER_1_PASSWORD` (optional) as
service variables — any numbered group with a `HOST` is imported on every
boot, idempotently.

## About Hosting pgAdmin on Railway

Railway gives this service exactly what pgAdmin needs in production: a
persistent volume for session state and the SQLite registry, TLS at the edge
(proxy headers pre-wired), and an injected listen port. The image runs as
root only for the boot chown of the mounted volume, then drops to the pgAdmin
user — the official container pattern — so sessions survive restarts on
Railway's volume semantics.

## Why Deploy pgAdmin on Railway

- **Zero friction**: one service, two variables (both defaulted), one click.
- **Durable sessions**: login state and registered servers persist across
  restarts and deploys on a mounted volume.
- **Private-network native**: administer databases inside the same project
  without exposing them to the internet.
- **Battle-tested wrapper**: the boot wrapper ships in the *PostgreSQL HA
  Failover* ecosystem and is verified by automated login + registry +
  volume-permission e2e tests on every change.

## Common Use Cases

- Admin UI next to a **PostgreSQL HA Failover** cluster (primary + replica).
- Browse and tune a production database without local tooling installs.
- Team-shared SQL console for analytics reads on a replica.

## Dependencies for Deploying pgAdmin

### Deployment Dependencies

- None at deploy time. Optional at runtime: any reachable PostgreSQL server
  (Railway private hostname or external host) to register after login.

---
Deeper architecture notes in [`ARCHITECTURE.md`](ARCHITECTURE.md); history in [`CHANGELOG.md`](CHANGELOG.md).


## Similar templates

- [RustFS | (Just Updated) S3 Object Store, Public URL and Keys Set](https://railway.com/deploy/rustfs-or-just-updated-s3-object-store-p) — S3-compatible object store, keys and public URL preset, volume kept
- [TimescaleDB](https://railway.com/deploy/timescaledb-railway-template) — A PostgreSQL-based time-series database for analytics on Railway.
- [Neo4j 2026.10 Community](https://railway.com/deploy/neo4j-202610-community) — Neo4j graph database with APOC, Browser, Bolt TCP proxy and a volume

Open this page in a browser: https://railway.com/deploy/pgadmin-2
