Portabase is a self-hosted application for building internal knowledge bases, intranet sites, and documentation portals. It runs as a containerized web app backed by PostgreSQL for persistent storage.
flowchart LR
User([User]) -->|:8887| App[Portabase Web]
App --> PG[(PostgreSQL)]
- The Portabase web app starts and serves HTTP traffic on port
80inside the container. - A PostgreSQL database container stores application data, user accounts, and configuration.
- The app container depends on the database container and checks database availability before starting.
- Persistent data is stored in Docker volumes so your content survives container restarts.
- App image:
portabase/portabase:latest - App container name:
portabase-app-prod - App web UI:
http://<host-ip>:8887 - Database image:
postgres:16-alpine - Database port mapping:
5433:5432 - Persistent data volumes:
portabase-data:/datapostgres-data:/var/lib/postgresql/data
- Environment file:
.env
This compose setup uses a .env file for custom variables. By default, the database service includes:
POSTGRES_DB=devdbPOSTGRES_USER=devuserPOSTGRES_PASSWORD=changeme
Update these values in .env or the compose config before deploying to a production environment.
From the repository root:
cd portabase
docker compose up -dOpen:
http://localhost:8887
Useful commands:
docker compose ps # check container status
docker compose logs -f # stream logs
docker compose restart # restart service
docker compose down # stop and remove containers- Use the web UI to create pages, collections, and internal documentation.
- Keep application data in
portabase-dataand database state inpostgres-data. - Use the
.envfile to manage credentials and environment settings. - Ensure the database is healthy before relying on the web app startup.
- The app listens on
8887externally and forwards to port80inside the container. - PostgreSQL is exposed on
5433only for local development. - Do not commit sensitive values from
.envto source control. - The app container includes a healthcheck that verifies
/api/healthbefore marking the service healthy.