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:- Navigate to your Project
- Select the Application or Service
- Click the Logs tab
- 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:- Navigate to Application > Deployments
- Select a deployment from the list
- Click View Logs to see the complete deployment process
- Monitor build, test, and deploy stages
Deployment Log Stages
Build Stage:Database Logs
View logs for managed databases:- Navigate to Project > Database (Postgres, MySQL, MariaDB, MongoDB, or Redis)
- Click the Logs tab
- View database-specific logs including queries, connections, and errors
Database Log Examples
PostgreSQL:Log Retention
Application Logs
Application logs are stored in Docker containers and follow Docker’s logging driver configuration:- Default driver:
json-filewith 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:- Navigate to Settings > Server
- Enable Docker Cleanup
- 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:- Open the Logs tab
- Use the search box to filter by keyword
- Search supports:
- Simple text matching
- Regular expressions
- Case-sensitive/insensitive options
Log Patterns
Common patterns to search for: Errors:Exporting Logs
Export logs for external analysis:- Click the Download button in the Logs tab
- Choose format: Plain text or JSON
- Save to local file system
Integration with External Tools
Forwarding to Log Aggregators
Configure Docker logging drivers to forward logs: Syslog:Monitoring Integration
Integrate logs with monitoring tools:- Configure log shipping: Use Docker logging drivers or log forwarders
- Set up alerts: Configure notification rules based on log patterns
- Create dashboards: Visualize log metrics and trends
Troubleshooting
Logs Not Appearing
Check container status:Logs Growing Too Large
- Configure log rotation in Docker daemon:
- Enable Docker cleanup in Dokploy settings
- 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:- Reduce log verbosity in application configuration
- Use asynchronous logging in applications
- Configure appropriate log rotation limits
- Consider using a dedicated logging driver
Best Practices
- Set Log Rotation: Configure max-size and max-file to prevent disk exhaustion
- Enable Timestamps: Always include timestamps for accurate troubleshooting
- Use Structured Logging: Output JSON logs for easier parsing and analysis
- Monitor Log Volume: Track log growth and adjust retention policies
- Implement Log Levels: Use appropriate severity levels (debug, info, warn, error)
- Secure Sensitive Data: Never log passwords, API keys, or personal information
- Regular Cleanup: Schedule automatic cleanup of old logs
- Centralize Logs: Consider log aggregation for multi-container applications
Log Format Examples
Application Log Format
JSON Format (Recommended):Deployment Log Format
Next Steps
- Configure Real-Time Metrics for performance tracking
- Set Up Notifications for log-based alerts
- Monitor Overview for complete observability setup