Quickstart Setup Guide¶
This guide covers setting up Trustpoint using Docker and Docker Compose.
Prerequisites¶
Docker 20.10 or higher
Docker Compose v2.32.4 or higher
Git
Getting started with the Trustpoint Wizard script¶
The tp_wizard.sh script provides a guided CLI for setting up a Docker environment.
This requires a Linux host.
git clone https://github.com/Trustpoint-Project/trustpoint.git
cd trustpoint
./tp_wizard.sh
Convenience commands:
./tp_wizard.sh up— start Trustpoint and Postgres with default testing credentials (testing only)../tp_wizard.sh up demo— additionally start SFTP and mailpit demo servers (testing only)../tp_wizard.sh down— stop and remove all containers../tp_wizard.sh nuke— remove all containers and delete all stored data.
Getting started with Docker Compose¶
The .env file¶
Warning
Trustpoint requires a .env file to start. If no .env file is present, startup will fail with an error.
Docker Compose and tp_wizard.sh read the .env file in the project root.
The repository contains development defaults. For production-like deployments,
copy the example and replace at least the database password:
cp .env.example .env
The following variables are supported:
Variable |
Required |
Description |
|---|---|---|
|
No |
PostgreSQL username. Defaults to |
|
No |
PostgreSQL password. Defaults to |
|
No |
Database name. Defaults to |
|
No |
Database host used by the Trustpoint containers. Defaults to |
|
No |
Database port used by the Trustpoint containers. Defaults to |
|
No |
Comma-separated IPv4 addresses where Trustpoint is reachable. Used for TLS certificate SANs and Django |
|
No |
Comma-separated IPv6 addresses where Trustpoint is reachable. Used for TLS certificate SANs and Django |
|
No |
Comma-separated DNS names where Trustpoint is reachable. Used for TLS certificate SANs and Django |
|
No |
HTTP port for external access. Used in |
|
No |
HTTPS port for external access. Used in |
|
No |
Sender address for Trustpoint emails. Defaults to |
|
No |
SMTP host. Leave empty to use Django’s console backend. |
Auto-Setup from Environment Variables¶
Trustpoint can be configured to skip the interactive setup wizard and auto-configure from environment variables. This is useful for automated deployments, CI/CD pipelines, or headless installations.
Important
When TP_AUTO_SETUP=true, the TP_ADMIN_USERNAME and TP_ADMIN_PASSWORD variables become required.
To enable auto-setup, add the following variables to your .env file:
Variable |
Required |
Description |
|---|---|---|
|
Yes |
Set to |
|
Yes* |
Initial superuser username. *Required when auto-setup is enabled. |
|
Yes* |
Initial superuser password. *Required when auto-setup is enabled. |
|
No |
Set to |
Note
The TLS certificate SANs (TP_TLS_IPV4_ADDRESSES, TP_TLS_IPV6_ADDRESSES, TP_TLS_DNS_NAMES)
are also used to configure Django’s ALLOWED_HOSTS and CSRF_TRUSTED_ORIGINS, ensuring consistency
between your TLS certificate and Django security settings.
Auto-setup .env example:
# Database configuration
POSTGRES_DB=trustpoint_db
DATABASE_USER=admin
DATABASE_PASSWORD=correct-horse-battery-staple
DATABASE_HOST=postgres
DATABASE_PORT=5432
# TLS/Network configuration
TP_TLS_IPV4_ADDRESSES=10.0.0.5
TP_TLS_DNS_NAMES=trustpoint.local
# Auto-setup configuration
TP_AUTO_SETUP=true
TP_ADMIN_USERNAME=admin
TP_ADMIN_PASSWORD=secure_admin_password_here
TP_INJECT_DEMO_DATA=false
Setup (Load from Docker Hub)¶
Download docker-compose.yml and .env.example.
Create the
.envfile as described above.Start all containers:
docker compose up -d
If the specified ports are already in use, adjust the port mappings in
docker-compose.yml.
Setup (Build from source)¶
Clone the repository:
git clone https://github.com/Trustpoint-Project/trustpoint.git cd trustpoint
Create the
.envfile as described above.Build the images:
docker compose build
Start all containers:
docker compose up -d
Note
If the specified ports are already in use, adjust the port mappings in
docker-compose.yml.
Getting Started with Docker¶
Setup (Load from Docker Hub)¶
Pull the images:
docker pull trustpointproject/trustpoint:latest docker pull trustpointproject/postgres:latest
Run the containers:
docker run -d --name postgres-<version> \ -v postgres_data-<version>:/var/lib/postgresql \ -p 127.0.0.1:5432:5432 \ -e POSTGRES_USER=<db-user> \ -e POSTGRES_PASSWORD=<db-password> \ -e POSTGRES_DB=trustpoint_db \ trustpointproject/postgres:latest docker run -d --name trustpoint-<version> \ --link postgres-<version> \ -p 80:80 -p 443:443 \ -e POSTGRES_DB=trustpoint_db \ -e DATABASE_USER=<db-user> \ -e DATABASE_PASSWORD=<db-password> \ -e DATABASE_HOST=postgres-<version> \ -e DATABASE_PORT=5432 \ trustpointproject/trustpoint:latest
Note
PostgreSQL 18+ stores data under
/var/lib/postgresql/18/main. Mount the volume at/var/lib/postgresql, not/var/lib/postgresql/data.
Setup (Build from source)¶
Clone the repository and build the images:
git clone https://github.com/Trustpoint-Project/trustpoint.git cd trustpoint docker build -t trustpointproject/postgres:latest -f docker/db/Dockerfile . docker build -t trustpointproject/trustpoint:latest -f docker/trustpoint/Dockerfile .
Run the containers (replace
<db-user>and<db-password>with strong values):docker run -d --name postgres-<version> \ -v postgres_data-<version>:/var/lib/postgresql \ -p 127.0.0.1:5432:5432 \ -e POSTGRES_USER=<db-user> \ -e POSTGRES_PASSWORD=<db-password> \ -e POSTGRES_DB=trustpoint_db \ trustpointproject/postgres:latest docker run -d --name trustpoint-<version> \ --link postgres-<version> \ -p 80:80 -p 443:443 \ -e POSTGRES_DB=trustpoint_db \ -e DATABASE_USER=<db-user> \ -e DATABASE_PASSWORD=<db-password> \ -e DATABASE_HOST=postgres-<version> \ -e DATABASE_PORT=5432 \ trustpointproject/trustpoint:latest
Verify the Setup¶
Once the containers are running:
Open
http://localhostin your browser to access the Trustpoint setup wizard.The wizard generates a TLS certificate on first run. After that, only HTTPS connections are accepted. You may need to accept a self-signed certificate in your browser.
Set a strong password for the admin user when prompted.
Change the Admin User Password¶
Go to
https://localhost/admin.Click Users, select the admin user.
Click the “change password” link, enter a new password, and click Save.
Tips and Troubleshooting¶
View logs:
docker compose logs trustpoint -f
docker compose logs postgres -f
Stop and remove containers and volumes:
docker compose down -v
What to Do Next¶
Explore with test data: Navigate to Home > Notifications > Populate Test Data in the Trustpoint interface.
Use the Trustpoint Client: Install the Trustpoint Client on end devices for streamlined certificate issuance.
Issue your first certificate: Follow the steps in Quickstart Operation Guide.