Kestra
Kestra is an infinitely scalable orchestration and scheduling platform that allows you to declare, run, schedule, and monitor millions of workflows declaratively in code.
Features
- Declarative YAML: Define workflows in simple YAML syntax
- Event-Driven: Trigger workflows based on events, schedules, or APIs
- Multi-Language Support: Execute Python, Node.js, Shell, SQL, and more
- Real-Time Monitoring: Live logs and execution tracking
- Plugin Ecosystem: Extensive library of integrations
- Version Control: Git integration for workflow versioning
- Scalable: Handle millions of workflow executions
Quick Start
-
Copy
.env.exampleto.env:cp .env.example .env -
(Optional) Edit
.envto customize settings, especially if enabling basic auth -
Start Kestra:
docker compose up -d -
Wait for services to be ready (check with
docker compose logs -f kestra) -
Access Kestra UI at
http://localhost:8080
Default Configuration
| Service | Port | Description |
|---|---|---|
| Kestra | 8080 | Web UI and API |
| Kestra Management | 8081 | Management endpoints |
| PostgreSQL | 5432 | Database (internal) |
Authentication: No authentication by default. Set KESTRA_BASIC_AUTH_ENABLED=true in .env to enable basic authentication.
Environment Variables
Key environment variables (see .env.example for full list):
| Variable | Description | Default |
|---|---|---|
KESTRA_VERSION |
Kestra image version | latest-full |
KESTRA_PORT_OVERRIDE |
Host port for UI/API | 8080 |
KESTRA_MANAGEMENT_PORT |
Management port | 8081 |
POSTGRES_DB |
Database name | kestra |
POSTGRES_USER |
Database user | kestra |
POSTGRES_PASSWORD |
Database password | k3str4 |
KESTRA_BASIC_AUTH_ENABLED |
Enable basic auth | false |
KESTRA_BASIC_AUTH_USERNAME |
Auth username | admin |
KESTRA_BASIC_AUTH_PASSWORD |
Auth password | admin |
TZ |
Timezone | UTC |
Resource Requirements
Minimum:
- CPU: 1 core
- RAM: 1GB
- Disk: 5GB
Recommended:
- CPU: 2+ cores
- RAM: 2GB+
- Disk: 20GB+
Volumes
postgres_data: PostgreSQL database datakestra_data: Kestra storage (workflow outputs, files)kestra_logs: Kestra application logs
Using Kestra
Creating a Workflow
-
Access the UI at
http://localhost:8080 -
Go to "Flows" and click "Create"
-
Define your workflow in YAML:
id: hello-world namespace: company.team tasks: - id: hello type: io.kestra.plugin.core.log.Log message: Hello, World! -
Save and execute
Using the API
Example: List flows
curl http://localhost:8080/api/v1/flows/search
Example: Trigger execution
curl -X POST http://localhost:8080/api/v1/executions/company.team/hello-world
CLI
Install Kestra CLI:
curl -o kestra https://github.com/kestra-io/kestra/releases/latest/download/kestra
chmod +x kestra
Docker Task Runner
Kestra can execute tasks in Docker containers. The compose file mounts /var/run/docker.sock to enable this feature. Use the io.kestra.plugin.scripts.runner.docker.Docker task type.
Security Considerations
- Authentication: Enable basic auth or configure SSO (OIDC) for production
- Database Passwords: Use strong passwords for PostgreSQL
- Docker Socket: Mounting Docker socket grants container control; ensure proper security
- Network Access: Restrict access with firewall rules
- SSL/TLS: Use reverse proxy with HTTPS in production
Upgrading
To upgrade Kestra:
-
Update
KESTRA_VERSIONin.env -
Pull and restart:
docker compose pull docker compose up -d -
Check logs:
docker compose logs -f kestra
Troubleshooting
Service won't start:
- Check logs:
docker compose logs kestra - Verify database:
docker compose ps postgres - Ensure Docker socket is accessible
Cannot execute Docker tasks:
- Verify
/var/run/docker.sockis mounted - Check Docker daemon is running
- Review task logs in Kestra UI
Performance issues:
- Increase resource limits in
.env - Check database performance
- Monitor Java heap usage (adjust
KESTRA_JAVA_OPTS)
References
- Official Website: https://kestra.io
- Documentation: https://kestra.io/docs
- GitHub: https://github.com/kestra-io/kestra
- Community: https://kestra.io/slack
- Plugin Hub: https://kestra.io/plugins
License
Kestra is licensed under Apache-2.0. See LICENSE for more information.