
Kestra is an open-source workflow orchestration platform used to define, schedule, and monitor automated workflows. It supports declarative YAML-based configurations and provides a web interface for managing workflow executions, logs, and metadata. Kestra is used for data pipelines, infrastructure automation, and event-driven processing.
This article explains how to deploy Kestra on a Linux server using Docker Compose with a PostgreSQL backend. It covers directory setup, environment variable configuration, service deployment, and demonstrates workflow execution through the web interface.
Before you begin, you need to:
sudo privileges.kestra.example.com).Kestra requires persistent storage for workflow data and PostgreSQL database files. The following steps create the necessary directories and define environment variables for database credentials and domain configuration.
Create the project directory with subdirectories for persistent data.
postgres: Persists PostgreSQL database files.kestra: Contains workflow execution artifacts and uploaded files.traefik: Holds TLS certificates obtained from Let's Encrypt.Navigate to the project directory.
Create the .env file.
Add the following variables:
Replace:
STRONG-PASSWORD with a secure database password.kestra.example.com with your registered domain name.admin@example.com with your email address for Let's Encrypt certificate notifications.Save and close the file.
The deployment consists of three services: Traefik handles reverse proxy and TLS certificates, PostgreSQL provides persistent storage for workflow metadata, and Kestra runs the orchestration engine. Docker Compose coordinates all services and applies environment variables for database connectivity and domain routing.
Create a new Docker Compose manifest.
Add the following content:
Save and close the file.
This manifest defines:
v3.6) for stability.KESTRA_CONFIGURATION block that configures the PostgreSQL datasource connection, repository type, local storage path, and queue backend../data/postgres: Persists PostgreSQL database files across container restarts../data/kestra: Stores workflow execution artifacts and uploaded files../data/traefik: Stores TLS certificates obtained from Let's Encrypt.80 and 443 expose HTTP and HTTPS traffic through Traefik.kestra service waits for postgres to be healthy before starting.Create and start the services.
Verify that the services are running.
The output displays three running containers: Kestra, PostgreSQL, and Traefik with ports 80 and 443 exposed.
View the service logs to confirm all components started successfully.
For more information on managing a Docker Compose stack, see the How To Use Docker Compose article.
Kestra provides a web-based interface for workflow management and execution monitoring. The first access requires creating an administrator account that has full permissions across all workflows and system settings.
Open a web browser and navigate to https://kestra.example.com, replacing kestra.example.com with your configured domain.
On first access, Kestra displays the Create an admin user page. Enter the following:
Click Create admin user.
(Optional) Complete the Help us improve Kestra OSS form or click Skip to proceed.
Click Start Kestra UI to access the main dashboard.
A sample workflow tests the integration between Kestra's orchestration engine and the PostgreSQL backend. The following steps create a basic workflow that logs a message and verify execution through the web interface.
Click Flows in the left sidebar.
Click Create to open the workflow editor.
Paste the following workflow definition.
Click Save to store the workflow.
Click Execute in the top-right corner to run the workflow.
Click Executions in the left sidebar and select the completed workflow run.
The execution detail page displays a SUCCESS status, confirming that the workflow engine and database integration are functioning correctly.
You have successfully deployed Kestra on a Linux server using Docker Compose with PostgreSQL for persistent workflow storage and Traefik for automatic HTTPS certificate provisioning. For advanced features including scheduling, triggers, and plugin integration, visit the official Kestra documentation.
0 Comments
Be the first to comment and share your perspective with the community.