Deploy Pgweb

pgweb 0.17 web-based PostgreSQL browser with login and a Postgres database.

Deploy Pgweb

/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

ServiceImageNetworkingStorage
pgwebsosedoff/pgweb:0.17.0public domain on 8081none
PostgresRailway Postgres 18private onlyvolume
VariableDefaultPurpose
PGWEB_AUTH_USER / PGWEB_AUTH_PASSadmin / generatedBasic auth login
DATABASE_URL${{Postgres.DATABASE_URL}}?sslmode=disableLocked 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

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
47
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51