Deploy Pgweb
pgweb 0.17 web-based PostgreSQL browser with login and a Postgres database.
Just deployed
/var/lib/postgresql/data
Just deployed
Deploy and Host pgweb on Railway
pgweb is a lightweight, web-based PostgreSQL client written in Go. You browse tables, views and rows, run SQL queries, inspect indexes and constraints, view query history and export results as CSV, JSON or XML, all from the browser. It ships as a single binary with no dependencies, and starts in a second.
About Hosting pgweb
This template deploys pgweb v0.17.0 from the official image together with a Railway Postgres database, connected over the private network. The web UI is protected with basic authentication using a generated password. The connection is locked, so visitors cannot switch to other databases, and SSH tunnels are disabled. To browse an existing database instead, point DATABASE_URL at it. pgweb keeps no state and uses little memory, so it fits on the Hobby plan. It is useful as a quick admin view next to an application that already uses Railway Postgres.
Common Use Cases
- Browsing and querying a Railway Postgres database from the browser
- Quick data checks and CSV exports without installing a desktop client
- A lightweight admin view for staging databases
Dependencies for pgweb Hosting
sosedoff/pgweb:0.17.0(official image)- Railway Postgres (
ghcr.io/railwayapp-templates/postgres-ssl:18) with a volume
Deployment Dependencies
Implementation Details
| Service | Image | Networking | Storage |
|---|---|---|---|
| pgweb | sosedoff/pgweb:0.17.0 | public domain on 8081 | none |
| Postgres | Railway Postgres 18 | private only | volume |
| Variable | Default | Purpose |
|---|---|---|
PGWEB_AUTH_USER / PGWEB_AUTH_PASS | admin / generated | Basic auth login |
DATABASE_URL | ${{Postgres.DATABASE_URL}}?sslmode=disable | Locked database connection |
Notes:
- The login has full read and write access to the database; share it carefully.
- There is no HTTP health check, because every route needs the login; Railway restarts the service if it exits.
This is a community-maintained deployment package and does not imply affiliation with or endorsement by the pgweb project or its maintainers.
Why Deploy pgweb 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 pgweb 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.
Template Content

