When deploying AuthDrop for the first time, follow these security best practices:
Before starting the server for the first time:
- Copy
.env.exampleto.env - Change ALL default passwords:
SUPER_ADMIN_PASSWORD- Use a strong, unique passwordDB_PASSWORD/POSTGRES_PASSWORD- Use a strong, unique password
- Consider changing the default username
SUPER_ADMIN_USERNAMEto something less predictable
- Never commit
.envto git (already in.gitignore) - Set proper file permissions:
chmod 600 .env(Linux/Mac) - Keep backups in a secure location (password manager, encrypted storage)
PostgreSQL:
- Use strong passwords (minimum 16 characters, mixed case, numbers, symbols)
- If exposed to network, use firewall rules to restrict access
- Consider using SSL/TLS for database connections
- Regularly backup your database
Docker:
- Don't expose PostgreSQL port (5432) to the host unless necessary
- Use Docker secrets for sensitive data in production
- Regularly update Docker images
- Log in with the super admin credentials from
.env - Immediately change the password through the web interface
- Create additional admin users if needed
- Set up appropriate user groups and permissions
To ensure a clean installation with no old data:
Docker Compose:
docker compose down -v # Remove all volumes
docker compose up -d # Start freshManual PostgreSQL:
node reset-postgres.js # Resets database to clean stateImportant: These commands will delete ALL existing data!
- Use HTTPS in production (reverse proxy with Let's Encrypt)
- Configure firewall rules to restrict access
- Consider VPN or IP whitelisting for admin access
- Review audit logs regularly
- Keep Node.js and dependencies updated:
npm update - Monitor audit logs for suspicious activity
- Regularly review user accounts and permissions
- Backup database regularly
- Test restore procedures
-
Use environment-specific .env files:
.env.development.env.production
-
Enable audit logging to track all admin actions
-
Set up monitoring for:
- Failed login attempts
- Database errors
- Unusual activity patterns
-
Document your setup:
- Server configuration
- Backup procedures
- Recovery procedures
- Admin contacts
If you lose access to the super admin account:
- Stop the server
- Run
node reset-postgres.js(will reset database - DATA LOSS) - Or manually reset password in database:
UPDATE users SET password_hash = '$2b$10$...' WHERE username = 'admin';
- Immediately change all passwords
- Review audit logs for suspicious activity
- Check for unauthorized users or permissions
- Consider resetting database and restoring from backup
- Update all software components
- Review firewall and access logs
For security issues, please contact the repository maintainer privately before public disclosure.