pgAdmin
What is pgAdmin?
pgAdmin is the standard web-based admin GUI for PostgreSQL, browse schemas, run queries, manage roles, and inspect query plans. There's nothing to "install", Laradock runs it straight from the official dpage/pgadmin4 image and points it at your postgres container.
Start pgAdmin
Start it alongside Postgres:
docker compose up -d postgres pgadmin
pgadmin depends on postgres in pgadmin/compose.yml, so Compose starts postgres first automatically if you just run docker compose up -d pgadmin.
Stop pgAdmin
docker compose stop pgadmin
This stops the container without deleting its saved server list. Data lives under DATA_PATH_HOST/pgadmin.
Configuration
All settings live in pgadmin/defaults.env and can be overridden by adding the same line to your own .env:
| Variable | Default | What it does |
|---|---|---|
PGADMIN_PORT | 5050 | Host-side port for the web UI (container port 80). |
PGADMIN_DEFAULT_EMAIL | [email protected] | Login email for the pgAdmin app itself (not a Postgres credential). |
PGADMIN_DEFAULT_PASSWORD | admin | Login password for the pgAdmin app itself. |
Log in
Open http://localhost:5050 and sign in with PGADMIN_DEFAULT_EMAIL / PGADMIN_DEFAULT_PASSWORD ([email protected] / admin by default).
Connect to your Postgres server
Once logged in, add a new server in pgAdmin's UI:
- Host:
postgres(the container name) - Port:
5432(container-internal port) - Username/Password: your
POSTGRES_USER/POSTGRES_PASSWORD
Common issues
- pgAdmin login and Postgres login are different things.
PGADMIN_DEFAULT_EMAIL/PGADMIN_DEFAULT_PASSWORDonly get you into the pgAdmin app itself, you still add and authenticate against your actual Postgres server separately inside the UI. - Credential changes don't take effect.
PGADMIN_DEFAULT_EMAIL/PGADMIN_DEFAULT_PASSWORDare only applied whenDATA_PATH_HOST/pgadminis created for the first time. If you change them afterward, either drop that folder (loses saved servers/settings) or change the user from inside pgAdmin's own user management. - Can't reach Postgres by container name. Use
postgresas the host inside pgAdmin's server dialog, notlocalhost, that only works from your host machine, not from inside another container. - Port already in use on your host. Change
PGADMIN_PORTin.envand restart:docker compose up -d pgadmin.
Need a MySQL/MariaDB GUI instead? See phpMyAdmin. Back to the Getting Started guide.