SSL/TLS Configuration
Application URL
Always use HTTPS in production:.env
Force HTTPS
The Panel automatically enforces HTTPS whenAPP_URL uses https://. Ensure your web server (Nginx/Apache) is configured to redirect HTTP to HTTPS.
Trusted Proxies
What are Trusted Proxies?
When the Panel runs behind a reverse proxy (Cloudflare, load balancer, etc.), the Panel sees the proxy’s IP address instead of the client’s. Configuring trusted proxies allows the Panel to read the real client IP from proxy headers.Configuration
.env
Comma-separated list of trusted proxy IP addresses or CIDR ranges.Special values:
*- Trust the directly connected proxy only**- Trust all proxies in the chain192.168.1.1,10.0.0.0/8- Specific IPs or CIDR ranges
Common Configurations
Verifying Proxy Configuration
Check if the Panel sees the correct client IP:Session Security
Session Configuration
.env
Session storage driver. Use
redis or database in production, never file.Session lifetime in minutes (12 hours by default).
Encrypt session data before storage.
Only send session cookies over HTTPS. Auto-detected from
APP_URL if not set.Prevent JavaScript from accessing session cookies.
SameSite cookie attribute. Options:
lax- Balanced security (recommended)strict- Maximum security, may break some workflowsnone- Allow cross-site requests (requiressecureflag)
Session Cookie Configuration
.env
Session cookie name. Auto-generated from
APP_NAME if not set.Cookie domain. Leave empty to use the current domain.
Set to
.example.com (with leading dot) to share sessions across subdomains.Cookie path. Usually should remain
/.Encryption Key Management
Application Key
.env
APP_KEY is used to encrypt:
- Session data
- Cookies
- Database encrypted fields
- Signed URLs
Generating a New Key
Key Rotation
To rotate the encryption key without breaking existing data:-
Add the current key to
APP_PREVIOUS_KEYS:.env -
Generate a new key:
- Laravel will attempt to decrypt data with old keys if the current key fails.
Debug Mode
.env
Enable detailed error messages and stack traces.
Safe Error Reporting
For production error tracking, use error monitoring services:.env
Password Security
The Panel uses bcrypt for password hashing. No additional configuration needed.Password Requirements
Password requirements are enforced at the application level:- Minimum 8 characters
- No maximum length
- No character requirements (allowing passphrases)
Two-Factor Authentication
Encourage users to enable 2FA:- User account → Security → Two-Factor Authentication
- Scan QR code with authenticator app
- Enter verification code
Security Headers
Configure security headers in your web server:Header Explanations
X-Content-Type-Options
X-Content-Type-Options
Prevents browsers from MIME-sniffing responses away from the declared content-type.
X-Content-Type-Options: nosniffX-Frame-Options
X-Frame-Options
Prevents clickjacking attacks by controlling whether the page can be embedded in frames.
X-Frame-Options: SAMEORIGIN - Allow framing only from the same origin.X-XSS-Protection
X-XSS-Protection
Enables browser’s XSS filtering (legacy, but still useful for older browsers).
X-XSS-Protection: 1; mode=blockReferrer-Policy
Referrer-Policy
Controls how much referrer information is included with requests.
Referrer-Policy: same-origin - Only send referrer for same-origin requests.Content-Security-Policy
Content-Security-Policy
Controls which resources the browser is allowed to load, preventing XSS and injection attacks.
The Panel requires
unsafe-inline and unsafe-eval for JavaScript functionality.Strict-Transport-Security (HSTS)
Strict-Transport-Security (HSTS)
Forces browsers to only use HTTPS connections.
Strict-Transport-Security: max-age=31536000; includeSubDomains; preloadFirewall Configuration
Required Ports
Only expose necessary ports to the internet:| Port | Protocol | Purpose | Public Access |
|---|---|---|---|
| 80 | HTTP | Redirect to HTTPS | Yes |
| 443 | HTTPS | Panel web interface | Yes |
| 3306 | TCP | MySQL/MariaDB | No |
| 6379 | TCP | Redis | No |
UFW Firewall
File Permissions
Proper file permissions prevent unauthorized access:Security Checklist
Enable Session Security
Verify
SESSION_ENCRYPT, SESSION_SECURE_COOKIE, and SESSION_HTTP_ONLY are enabled.Additional Resources
Let's Encrypt SSL
Free SSL/TLS certificates with automatic renewal.
Mozilla SSL Config
Generate secure SSL configurations for your web server.
Security Headers
Test your site’s security headers.
SSL Labs Test
Test your SSL/TLS configuration.
