Security Overview
Securing your self-hosted AppFlowy instance is critical to protect your data and ensure compliance with security standards.Network Security
SSL/TLS encryption and firewall configuration
Authentication
Strong authentication and access controls
Data Protection
Encryption at rest and in transit
Monitoring
Audit logs and security monitoring
SSL/TLS Configuration
Using Let’s Encrypt (Recommended)
Let’s Encrypt provides free SSL certificates with automatic renewal.1
Install Certbot
2
Obtain SSL certificate
- Enter your email address
- Agree to terms of service
- Choose whether to redirect HTTP to HTTPS (recommended: Yes)
3
Verify certificate installation
4
Test automatic renewal
5
Configure auto-renewal
Certbot automatically sets up a systemd timer. Verify it:
Using Custom SSL Certificates
If you have your own SSL certificates:1
Copy certificates to the server
2
Set proper permissions
3
Update Nginx configuration
Edit
/etc/nginx/sites-available/appflowy:4
Test and reload Nginx
SSL Best Practices
Enhanced SSL/TLS configuration for maximum security:Authentication Configuration
Strong Password Policies
Enforce strong passwords in GoTrue configuration:Multi-Factor Authentication (MFA)
Enable MFA for enhanced security:MFA significantly reduces the risk of unauthorized access, even if passwords are compromised.
Session Management
Configure secure session handling:Single Sign-On (SSO)
Integrate with your organization’s SSO:- SAML 2.0
- OAuth 2.0
- LDAP
Data Encryption
Encryption at Rest
1
Enable PostgreSQL encryption
Use encrypted volumes for database storage:Or use PostgreSQL’s built-in encryption:
2
Encrypt S3 storage
For MinIO:For AWS S3:
3
Encrypt Redis persistence
Encryption in Transit
All communication should use TLS:Firewall Configuration
Configure firewall rules to limit access:1
Install UFW (Ubuntu)
2
Configure default policies
3
Allow necessary ports
4
Restrict database access
5
Enable firewall
Docker Network Isolation
Isolate services using Docker networks:Security Headers
Add security headers in Nginx:Backup Recommendations
Automated Database Backups
1
Create backup script
Create Make it executable:
/usr/local/bin/backup-appflowy.sh:2
Schedule with cron
3
Test backup restoration
Off-Site Backup Storage
Store backups remotely for disaster recovery:- AWS S3
- rsync
- Restic
Audit Logging
Enable comprehensive audit logging:Centralized Logging
Forward logs to a centralized system:Security Monitoring
Intrusion Detection
Install and configure Fail2ban:1
Install Fail2ban
2
Configure for Nginx
Create
/etc/fail2ban/jail.local:3
Restart Fail2ban
Security Scanning
Regularly scan for vulnerabilities:Compliance & Standards
GDPR Compliance
- Enable data export functionality
- Implement data deletion procedures
- Maintain audit logs for data access
- Document data processing activities
SOC 2
- Implement access controls
- Enable comprehensive logging
- Regular security assessments
- Incident response procedures
HIPAA
- Encrypt all PHI data
- Implement BAA agreements
- Audit trail requirements
- Regular risk assessments
ISO 27001
- Information security policies
- Risk management framework
- Security awareness training
- Continuous improvement
Security Checklist
Use this checklist to verify your security configuration:- SSL/TLS certificates installed and auto-renewal configured
- Firewall rules configured to restrict access
- Strong passwords enforced (12+ characters)
- Multi-factor authentication enabled
- Database encryption at rest enabled
- Regular automated backups configured
- Off-site backup storage configured
- Audit logging enabled
- Security headers configured
- Docker network isolation implemented
- Fail2ban or similar IDS installed
- Regular security updates scheduled
- Incident response plan documented
- Regular security assessments scheduled
Security Best Practices
Principle of Least Privilege
Grant users only the minimum permissions necessary for their role.
Regular Updates
Keep all components updated with the latest security patches.
Defense in Depth
Implement multiple layers of security controls.
Security Monitoring
Continuously monitor for security events and anomalies.
Incident Response
Prepare for security incidents:1
Document procedures
Create an incident response plan including:
- Contact information for security team
- Escalation procedures
- Containment strategies
- Recovery procedures
2
Regular drills
Practice incident response procedures quarterly.
3
Post-incident review
After any security event, conduct a review and update procedures.
Getting Help
Report Security Issues
Report security vulnerabilities responsibly
Community Support
Join our Discord for security discussions
Documentation
Review self-hosting documentation
Professional Services
Contact us for security consulting