Configuration Guide
Stirling-PDF can be configured in three ways, depending on your deployment and preferences.
Configuration Methods
1. In-App Settings (Recommended)
If you have login enabled, admins can configure everything through the Settings menu in the application.
To use:
- Set
SECURITY_ENABLELOGIN=true - Log in as admin
- Go to Settings → configure through UI
- Changes apply immediately, no restart needed
Best for: Production deployments with admin users
2. Environment Variables
Configure via Docker environment variables or system environment variables.
To use:
docker run -d \
-e SECURITY_ENABLELOGIN=true \
-e LANGS=en_GB \
stirlingtools/stirling-pdf:latest
Best for: Docker deployments, infrastructure-as-code, initial setup
3. Settings File (settings.yml)
Edit /configs/settings.yml directly for advanced configuration.
To use:
security:
enableLogin: true
system:
defaultLocale: en-GB
Best for: Complex configurations, when you prefer file-based config
Common Settings
Authentication
Enable user login:
SECURITY_ENABLELOGIN=true
SECURITY_INITIALLOGIN_USERNAME=admin
SECURITY_INITIALLOGIN_PASSWORD=changeme123
Default credentials: admin / stirling (change immediately after first login)
Language & Localization
LANGS=en_GB # Available languages
SYSTEM_DEFAULTLOCALE=en-GB # Default language
Deployment Mode
MODE=BOTH # Options: BOTH, FRONTEND, BACKEND
File Upload Limits
SYSTEM_MAXFILESIZE=2000 # MB
SPRING_SERVLET_MULTIPART_MAX_FILE_SIZE=2000MB
SPRING_SERVLET_MULTIPART_MAX_REQUEST_SIZE=2000MB
Memory Management
JAVA_TOOL_OPTIONS="-Xms512m -Xmx4g" # Min 512MB, Max 4GB RAM
Specialized Configuration Guides
For advanced features and specific use cases, see these detailed guides:
Authentication & Security
- OAuth2 (Google, GitHub, Keycloak, OIDC)
- SAML2 (Okta, Azure AD) - Pro/Enterprise only
- Complete configuration examples
- Split deployment (frontend/backend separation)
- CORS configuration
- Server certificates
- JWT configuration
- Protect against brute-force attacks
- Auto-ban after failed login attempts
Features & Customization
- Branding and logos
- Theme customization
- Custom styling
- Enable/disable specific tools
- Control feature availability by user/role
- Automated workflows
- Folder scanning
- Batch processing
- Multi-step operations
Integration & Storage
- PostgreSQL configuration (Pro/Enterprise)
- Database migration
- Backup strategies
- Direct Google Drive integration
- OAuth setup
- Tesseract language packs
- OCR optimization
- Prometheus metrics (Pro/Enterprise)
- Application monitoring
- Performance tracking
Other Configuration
- Watch folders for automatic processing
- Pre-loaded signatures for quick signing
- Logging configuration
- Server settings (port, SSL/TLS)
- Advanced Spring Boot settings
Configuration Priority
When the same setting is defined in multiple places, this is the order of precedence (highest to lowest):
- Environment Variables
- settings.yml / In-App Settings
- Default values
Environment Variable Format
Convert YAML paths to environment variables:
# settings.yml
security:
enableLogin: true
Becomes:
SECURITY_ENABLELOGIN=true
Rules:
- Uppercase everything
- Replace
.with_ - Nested properties become
PARENT_CHILD
Troubleshooting
Settings Not Applied
- Check configuration priority (env vars override settings.yml)
- Restart container after changing environment variables
- Check logs:
docker logs stirling-pdf | grep ERROR - Verify file permissions on
/configsvolume
Database Issues
Default database location: /configs/stirling-pdf-DB.mv.db
If missing:
- Ensure
/configsvolume is mounted - Check write permissions
- Review startup logs
Next Steps
- Production Deployment: See Production Deployment Guide
- API Usage: See API Documentation
- Tool Reference: See Functionality