Skip to main content
Dokploy provides comprehensive logging capabilities for applications, containers, and deployment operations. Access logs through the dashboard to troubleshoot issues, monitor application behavior, and track deployment progress.

Log Types

Application Logs

View real-time logs from running applications and services:
  • Container stdout/stderr: Standard output and error streams from running containers
  • Docker Compose logs: Aggregated logs from multi-container applications
  • Database logs: PostgreSQL, MySQL, MariaDB, MongoDB, and Redis logs

Deployment Logs

Track the progress and outcome of deployment operations:
  • Build logs: Docker image build output, including layer creation and dependency installation
  • Deploy logs: Container startup, health checks, and initialization
  • Git operations: Clone, pull, and repository sync messages
  • Error logs: Failed deployments, build errors, and validation issues

System Logs

Monitor Dokploy infrastructure operations:
  • Docker cleanup: Automated cleanup of unused images, containers, and volumes
  • Backup operations: Database backup and restore processes
  • Server operations: Remote server deployment and configuration
  • Stats collection: Monitoring service operations

Viewing Logs

Application Logs

Access logs for a running application:
  1. Navigate to your Project
  2. Select the Application or Service
  3. Click the Logs tab
  4. View real-time log output with automatic scrolling

Log Features

  • Auto-refresh: Logs update automatically as new entries are added
  • Search: Filter logs by keyword or pattern
  • Timestamps: View exact time of each log entry
  • Color coding: Differentiate log levels (info, warning, error)
  • Download: Export logs for offline analysis

Deployment Logs

Track deployment progress in real-time:
  1. Navigate to Application > Deployments
  2. Select a deployment from the list
  3. Click View Logs to see the complete deployment process
  4. Monitor build, test, and deploy stages

Deployment Log Stages

Build Stage:
Deploy Stage:

Database Logs

View logs for managed databases:
  1. Navigate to Project > Database (Postgres, MySQL, MariaDB, MongoDB, or Redis)
  2. Click the Logs tab
  3. View database-specific logs including queries, connections, and errors

Database Log Examples

PostgreSQL:
MySQL:
MongoDB:

Log Retention

Application Logs

Application logs are stored in Docker containers and follow Docker’s logging driver configuration:
  • Default driver: json-file with automatic rotation
  • Retention: Logs are retained as long as the container exists
  • Size limits: Configurable per container (default: 10MB per file, 3 files)

Deployment Logs

Deployment logs are stored in the Dokploy database:
  • Retention: All deployment logs are kept indefinitely
  • Access: Available through the Deployments tab
  • Storage: Database records include deployment status, timestamps, and full logs

System Logs

System operation logs are stored in designated paths:
  • Path: /home/dokploy/logs/ (configurable)
  • Retention: Managed by log cleanup cron job
  • Cleanup schedule: Configurable via logCleanupCron (default: daily at midnight)

Log Cleanup

Configure Cleanup Schedule

Set up automatic log cleanup to manage disk space:
  1. Navigate to Settings > Server
  2. Enable Docker Cleanup
  3. Set Log Cleanup Cron: Cron expression for cleanup schedule

Manual Cleanup

Clean up logs manually:

Log Analysis

Searching Logs

Use the built-in search functionality:
  1. Open the Logs tab
  2. Use the search box to filter by keyword
  3. Search supports:
    • Simple text matching
    • Regular expressions
    • Case-sensitive/insensitive options

Log Patterns

Common patterns to search for: Errors:
Performance Issues:
Security Events:

Exporting Logs

Export logs for external analysis:
  1. Click the Download button in the Logs tab
  2. Choose format: Plain text or JSON
  3. Save to local file system
Command-line export:

Integration with External Tools

Forwarding to Log Aggregators

Configure Docker logging drivers to forward logs: Syslog:
Fluentd:
JSON File with Rotation:

Monitoring Integration

Integrate logs with monitoring tools:
  1. Configure log shipping: Use Docker logging drivers or log forwarders
  2. Set up alerts: Configure notification rules based on log patterns
  3. Create dashboards: Visualize log metrics and trends

Troubleshooting

Logs Not Appearing

Check container status:
Verify logging driver:
Check disk space:

Logs Growing Too Large

  1. Configure log rotation in Docker daemon:
  1. Enable Docker cleanup in Dokploy settings
  2. Set up regular log cleanup cron jobs

Missing Historical Logs

  • Container logs: Lost when container is removed
  • Deployment logs: Check database for records
  • System logs: Verify log cleanup schedule hasn’t removed needed logs

Performance Issues

If logging impacts performance:
  1. Reduce log verbosity in application configuration
  2. Use asynchronous logging in applications
  3. Configure appropriate log rotation limits
  4. Consider using a dedicated logging driver

Best Practices

  1. Set Log Rotation: Configure max-size and max-file to prevent disk exhaustion
  2. Enable Timestamps: Always include timestamps for accurate troubleshooting
  3. Use Structured Logging: Output JSON logs for easier parsing and analysis
  4. Monitor Log Volume: Track log growth and adjust retention policies
  5. Implement Log Levels: Use appropriate severity levels (debug, info, warn, error)
  6. Secure Sensitive Data: Never log passwords, API keys, or personal information
  7. Regular Cleanup: Schedule automatic cleanup of old logs
  8. Centralize Logs: Consider log aggregation for multi-container applications

Log Format Examples

Application Log Format

JSON Format (Recommended):
Plain Text Format:

Deployment Log Format

Next Steps