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 SYSTEM_DEFAULTLOCALE=en-US \
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-US
Best for: Complex configurations, when you prefer file-based config
Common Settings
Authentication
Note: Authentication and additional features are included by default in:
- Docker: All images except ultra-lite (authentication is enabled by default)
- JAR: Stirling-PDF-with-login.jar (Recommended)
The plain Stirling-PDF.jar does not include authentication or additional features.
Configure user login:
- Settings File
- Environment Variable
security:
enableLogin: true
initialLogin:
username: admin
password: changeme123
SECURITY_ENABLELOGIN=true
SECURITY_INITIALLOGIN_USERNAME=admin
SECURITY_INITIALLOGIN_PASSWORD=changeme123
Default credentials: admin / stirling (change immediately after first login)
For more details, see System and Security Configuration.
Language & Localization
- Settings File
- Environment Variable
ui:
languages: [] # Available languages (empty = all enabled), e.g. ["en_US", "de_DE"]
system:
defaultLocale: en-US # Default language for new users
UI_LANGUAGES=en_US,de_DE # Restrict available languages (omit to enable all)
SYSTEM_DEFAULTLOCALE=en-US # Default language
Leaving defaultLocale empty (the default) auto-detects the language from the browser and falls back to en-US if no preference is found.
How language selection works:
Stirling PDF determines the interface language using this priority order:
-
User's manual selection (highest priority)
- When a user clicks the language globe icon and selects a language
- Choice is stored in browser's localStorage (persists across sessions)
- Storage key:
i18nextLng
-
System default locale
- Set via
SYSTEM_DEFAULTLOCALEorsystem.defaultLocale - When configured, it overrides the browser's detected language for users who have not made a manual selection
- Set via
-
Browser's language preference
- Automatically detected from the browser's language setting
- Example: Firefox set to Swedish (sv-SE) shows Swedish UI when no
defaultLocaleis configured
-
Fallback (lowest priority)
en-USis used when none of the above resolve to an available language
Example:
- Config:
SYSTEM_DEFAULTLOCALE=en-US - Browser: Swedish (sv-SE)
- Result: UI shows English (US) (the configured default overrides the browser preference)
If defaultLocale is left empty (the default), the browser-detected language is used instead. Users can always override either choice by manually selecting a language via the language globe icon.
Tip: Set
SYSTEM_DEFAULTLOCALEto your organization's primary language. Users can always override it using the language selector in the top-right corner.
File Upload Limits
- Settings File
- Environment Variable
system:
fileUploadLimit: "500MB" # Number (0-999) followed by KB, MB, or GB. Empty = no limit
spring:
servlet:
multipart:
max-file-size: 2000MB
max-request-size: 2000MB
SYSTEM_MAXFILESIZE=500 # Size in MB (valid range 1-999)
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) - Server tier
- SAML2 (Okta, Azure AD) - Enterprise tier
- Complete configuration examples
- 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
- Expose Stirling PDF tools over the Model Context Protocol
- OAuth2 or API-key authentication
- Operation allow/deny lists
- Store uploads and job artifacts in S3-compatible object storage
- Shared storage for multi-node deployments
- Run a Telegram bot that processes PDFs sent in chat
- Tesseract language packs
- OCR optimization
- Prometheus metrics (Pro/Enterprise)
- Application monitoring
- Performance tracking
Performance & Scaling
Performance Optimization & Sizing
- Resource sizing, JVM tuning, memory model, and scaling guidance
- Session limits and timeouts for external tools
LibreOffice Parallel Processing
- Configure multiple LibreOffice instances for faster document conversion
- Local UNO server pool and remote UNO server endpoints
Diagnostics & Support
Diagnostics & Reporting Issues
- Built-in diagnostics tool for Docker containers
- How to report issues via GitHub, Discord, and email
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-<schema-version>.mv.db (the schema version is part of the filename, e.g. /configs/stirling-pdf-DB-2.3.232.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
- Troubleshooting: See Diagnostics & Reporting Issues