Architecture
How GitPier self-hosted components interact in production.
GitPier self-hosted is deployed as a Docker Compose stack built around one application container and supporting infrastructure services.
gitpier: Web UI, API, repository operations, and SSH Git servicepostgres: Primary relational databaseredis: Cache and queue/state supportdind: Docker-in-Docker runtime for workflow job containerstrusted-builder: Optional Docker CLI helper service enabled through thetrusted-buildsprofile
High-Level Request Flow
- Users access GitPier over HTTP on port
8828and Git over SSH on port2424. - The
gitpierservice serves the application UI and handles API requests directly. gitpierpersists metadata inpostgres.gitpierusesredisfor cache and background state support.- Build and workflow execution is delegated to
dindthroughDOCKER_HOST=tcp://dind:2375. - Persistent GitPier runtime data is stored under
/data, bind-mounted from./data.
Service Responsibilities
GitPier
- Serves the web application on port
8828 - Exposes the SSH Git endpoint on port
2424 - Handles auth, repositories, pull requests, issues, and workflow coordination
- Connects to
postgres,redis, anddind - Stores application data and generated secrets under
/data
Postgres
- Stores primary persistent metadata (users, repos, issues, PRs, etc.)
- Must be backed up regularly
Redis
- Supports fast ephemeral/stateful operations and background processing
- Uses append-only persistence in this deployment
DIND (Workflow Runtime)
- Hosts Docker daemon for workflow job containers
- Receives build and workflow requests from
gitpier - Should remain internal-only and never be publicly exposed
Trusted Builder
- Optional profile for trusted build flows
- Shares Docker runtime access through the
dind_runvolume - Should remain internal-only and enabled only when needed
Data and Persistence
Persistent state is stored in Docker volumes plus the bind-mounted ./data directory.
Key persistence domains:
postgres_data: relational dataredis_data: Redis append-only datadind_data: Docker runtime state for workflow/build containers./dataviagitpier_data: repositories, assets, runtime files, generated secrets, and SSH keys
Network Boundaries
Recommended boundary model:
- Public: GitPier web access on
8828and SSH Git access on2424, or a reverse proxy and SSH ingress in front of them - Private/internal:
postgres,redis,dind, andtrusted-builder - Build network: internal-only Docker network used for workflow/build isolation
Security Posture Notes
- Keep internal services off the public internet
- Use strong secret values for database credentials and generated runtime secrets
- Set
SSH_CLONE_HOSTto the real hostname or IP clients will use - Keep workflow and build services on internal networks only
- Pin image tags and upgrade in controlled steps
For deployment steps, continue with Get Started.
