Self-hosting pgAdmin the easy way

Self-hosting pgAdmin the easy way

Yulei Chen - Content-Engineerin bei sliplane.ioYulei Chen
5 min

pgAdmin is the most popular open-source administration and management tool for PostgreSQL. It provides a web-based interface for running queries, browsing database objects, managing users, and monitoring server activity. If you work with PostgreSQL, you probably need pgAdmin at some point.

Sliplane is a managed container platform that makes self-hosting painless. With one-click deployment, you can get pgAdmin up and running in minutes - no server setup, no reverse proxy config, no infrastructure to maintain.

Prerequisites

Before deploying, ensure you have a Sliplane account (free trial available).

Quick start

Sliplane provides one-click deployment with presets.

SliplaneDeploy pgAdmin >
  1. Click the deploy button above
  2. Select a project
  3. Select a server (If you just signed up you get a 48-hour free trial server)
  4. Click Deploy!

About the preset

The one-click deploy above uses Sliplane's pgAdmin preset. Here's what's included:

  • Official dpage/pgadmin4 image with a specific version tag for stability
  • Persistent storage mounted to /var/lib/pgadmin so your connections, settings, and query history survive restarts
  • Pre-configured admin email and password for first login
  • Healthcheck on /login to monitor availability
  • Listens on port 80 internally (Sliplane handles SSL and routing automatically)

Next steps

Once pgAdmin is running on Sliplane, access it using the domain Sliplane provided (e.g. pgadmin-xxxx.sliplane.app).

Default credentials

Log in with the credentials from your service's environment variables:

  • Email: The value of PGADMIN_DEFAULT_EMAIL (default: admin@example.com)
  • Password: The value of PGADMIN_DEFAULT_PASSWORD (auto-generated during setup)

You can find these values in the Environment tab of your service on Sliplane. After the first login, you can change the password from within pgAdmin under File > Change Password.

Connecting to a PostgreSQL database

After logging in, click Add New Server to register a database connection:

  • If your PostgreSQL instance runs on the same Sliplane server, use the internal service name as the hostname (e.g. postgres-xxxx.internal)
  • If it runs externally, use the public hostname or IP
  • Default PostgreSQL port is 5432

For tips on running PostgreSQL in Docker, check out our post on how to run Postgres in Docker or best practices for Postgres in Docker.

Environment variables

You can customize pgAdmin's behavior by adding environment variables in the Sliplane dashboard:

VariableDescriptionExample
PGADMIN_DEFAULT_EMAILAdmin login emailadmin@example.com
PGADMIN_DEFAULT_PASSWORDAdmin login password(auto-generated)
PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTIONDisable if behind a proxy with issuesFalse
PGADMIN_CONFIG_LOGIN_BANNERCustom banner on login page"My Company DB Admin"
PGADMIN_CONFIG_MAX_LOGIN_ATTEMPTSLock account after N failed attempts5

See the pgAdmin container deployment docs for all available options.

Logging

pgAdmin logs to STDOUT by default, which works well with Sliplane's built-in log viewer. You can check logs directly from the Sliplane dashboard. For general Docker log tips, check out our post on how to use Docker logs.

Cost comparison

You can also self-host pgAdmin with other cloud providers. Here is a pricing comparison for the most common ones:

ProvidervCPURAMDiskMonthly CostNote
Sliplane22 GB40 GB€9 (~$10.65)Flat rate, 1 TB bandwidth, SSL included
Fly.io22 GB40 GB~$18Disk and bandwidth billed separately
Render12 GB40 GB~$35100 GB bandwidth, Disk billed separately
Railway22 GB40 GB~$67 + $20 planPro plan floor, usage-based, bandwidth billed separately
Click here to see how these numbers were calculated.

(Assuming an always-on instance running 730 hrs/month)

  • Sliplane: flat €9/month for the Base server. Unlimited services on the same server, 1 TB egress and SSL included.
  • Fly.io: shared-cpu-2x 2 GB = $11.83/mo + 40 GB volume × $0.15/GB = $6 -> ~$17.83/mo. Egress billed separately ($0.02/GB in EU).
  • Render: closest match is Standard ($25, 1 vCPU / 2 GB) plus 40 GB disk × $0.25/GB = $10 -> ~$35/mo. Stepping up to Pro (2 vCPU / 4 GB) costs $85/mo + disk.
  • Railway (Pro plan): CPU 2 × $0.00000772/s × 2,628,000 s = $40.57; RAM 2 × $0.00000386/s × 2,628,000 s = $20.29; volume 40 × $0.00000006/s × 2,628,000 s = $6.31 -> ~$67/mo compute, plus the $20/mo Pro plan floor and $0.05/GB egress.

Bandwidth costs can add up fast on usage-based providers. Use our bandwidth cost comparison tool to see what your egress would cost on each platform.

FAQ

What can I do with pgAdmin?

pgAdmin lets you manage every aspect of your PostgreSQL databases through a web browser. You can run SQL queries, create and modify tables, manage users and permissions, view query execution plans, import/export data, and monitor server performance. It supports multiple PostgreSQL server connections from a single interface.

How do I connect pgAdmin to multiple PostgreSQL servers?

After logging in, go to Dashboard > Add New Server for each database you want to manage. pgAdmin stores all server connections in its persistent volume, so they survive restarts. You can organize servers into groups for easier management.

How do I update pgAdmin?

Change the image tag in your service settings on the Sliplane dashboard and redeploy. Check Docker Hub for the latest stable version.

Can I use pgAdmin with databases outside Sliplane?

Yes. pgAdmin can connect to any PostgreSQL server that's reachable over the network. Just enter the hostname, port, and credentials when adding a new server connection. Make sure the target database allows connections from your pgAdmin instance's IP or domain.

Is pgAdmin resource-intensive?

pgAdmin is lightweight for typical usage. It runs a Python/Flask backend and serves a JavaScript frontend. The Sliplane Base server (2 vCPU, 2 GB RAM) handles it comfortably, even alongside other services. Memory usage grows mainly when running large queries or browsing big result sets.

Self-host pgAdmin now - It's easy!

Sliplane gives you everything you need to run pgAdmin without server hassle.