Self-host Pgweb with Levelrail
A small web client for browsing and querying PostgreSQL databases, with a table browser, query editor and export. Runs as one container with no storage of its own. Sign in with the username and password from the install form, then enter the connection details of your database.
- Authorsosedoff
- LicenceMIT
- Memory64 MiB
- Archarm64
- Services1
How to self-host Pgweb
-
Pull the images
One image is pulled on your server.
Show images
sosedoff/pgweb:0.17.0
-
Create the app
One service starts in a single Compose app, on port 8081.
-
Fill in the secrets
1 secret is generated and stored encrypted, 1 setting is preset, you do not have to fill in anything.
-
Open it
Without a domain the app gets an sslip.io address; add --domain SERVICE=HOST to use your own.
After the first start
- Sign in with the username and password from the install form.
- Enter the host, user, password and database of the Postgres server you want to browse.
Pgweb requirements
- Memory
- About 64 MiB
- Architectures
- amd64 image published, arm64 image published
- Ports
- 8081
- Domain
- Optional, an sslip.io address is used without one
- Settings
- none to fill in
- License
- MIT, permissive license
- Listed. It is in the catalog but not verified. Back up the data volume before changing an image tag.
Install Levelrail first
On a server with Levelrail running, run the command above, or open the dashboard: Apps, New app, Browse templates, then Pgweb. New to Levelrail? Install it on a fresh VPS first.
docker pull ghcr.io/glincker/levelrail:latest Then levelrail-cli login --device. See Getting started and the Pgweb docs page.
Deploy Pgweb your way
Every format below deploys the same pinned images. Pick the one that fits how you work.
Deploy Pgweb from the CLI
levelrail-cli templates install pgweb --name my-pgweb Deploy Pgweb with the API
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
https://levelrail.example.com/api/v1/service-templates/pgweb/install \
-d '{
"name": "my-pgweb"
}' Pgweb configuration
Pgweb services
| Service | Image | Ports | Volumes |
|---|---|---|---|
| pgweb | sosedoff/pgweb:0.17.0 | 8081 | none |
Pgweb environment variables
| Variable | Service | Value |
|---|---|---|
| PGWEB_AUTH_PASS | pgweb | Generated at deploy |
| PGWEB_AUTH_USER | pgweb | Preset by the template |
Ports and volumes
- Ports
- 8081
- Volumes
- none
Pgweb FAQ
How much memory does Pgweb need?
The catalog lists about 64 MiB of memory for Pgweb.
Does Pgweb run on arm64?
For Pgweb, an arm64 image is published; amd64 is image published.
What licence is Pgweb under?
Pgweb is licensed under MIT, which is permissive, with few conditions on reuse.
Does Pgweb need configuration before it starts?
No. The template fills in its own defaults and generates secrets at deploy time.
Which ports does Pgweb use?
Pgweb listens on port 8081 inside the stack.
Can I deploy Pgweb on Dokploy or Dokku?
The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for Pgweb, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image sosedoff/pgweb:0.17.0 is what you deploy there.