No description
authentik-install.sh | ||
LICENSE | ||
README.md |
Authentik Installation Script for CloudPanel Ubuntu 24.04 server ONLY
This repository contains an automated installation script for deploying Authentik Identity Provider alongside CloudPanel. The script handles Docker installation, service configuration, and initial setup, making it easy to get a production-ready Authentik instance up and running.
Features
- 🔧 Automated Docker installation and configuration
- 🚀 One-command Authentik deployment
- 🔒 Automatic secure credential generation
- 🛡️ Built-in health checks and verification
- 🔄 Service recovery and redeployment capabilities
- 📝 Detailed logging
- 🌐 CloudPanel integration support
Prerequisites
- Ubuntu 24.04 server ONLY
- Root/sudo access
- CloudPanel installed (optional, for reverse proxy setup)
- Port 9000 and 9443 available
Quick Start
- Download the installation script:
wget -O authentik-install.sh wget https://git.hhf.technology/hhf/authentik_ngx_cloudpanel/raw/branch/main/authentik-install.sh
- Make the script executable:
chmod +x authentik-install.sh
- Run the installation:
sudo ./authentik-install.sh
What the Script Does
- Checks and installs Docker if necessary
- Sets up required directories and configurations
- Generates secure random passwords and tokens
- Deploys PostgreSQL, Redis, and Authentik services
- Configures initial admin account
- Verifies successful installation
- Provides detailed setup information
Configuration
The script uses the following default configuration:
- Installation Directory:
/docker/authentik
- PostgreSQL Database:
authentik
- Web Interface Port:
9000
- HTTPS Port:
9443
To customize the admin email before installation, edit the script:
ADMIN_EMAIL="your-email@example.com"
Directory Structure
/docker/authentik/
├── docker-compose.yml
├── media/
├── certs/
└── custom-templates/
Logging
The script maintains detailed logs at:
/var/log/authentik-install.log
CloudPanel Integration
After installation, you can set up a reverse proxy in CloudPanel:
- Create a new site
- Choose "Reverse Proxy" type
- Point to
http://localhost:9000
- Set up SSL certificate
Troubleshooting
Common Issues
- Services not starting:
cd /docker/authentik
docker compose ps
docker compose logs
- Port conflicts:
sudo lsof -i :9000
sudo lsof -i :9443
- Lost credentials:
cd /docker/authentik
cat docker-compose.yml
Initial Setup
Access the setup page at:
http://<your-server-IP>:9000/if/flow/initial-setup/
Maintenance
Backups
Back up your Authentik installation:
cd /docker/authentik
docker compose down
tar -czf authentik-backup.tar.gz ./*
docker compose up -d
Updates
Update Authentik to the latest version:
cd /docker/authentik
docker compose pull
docker compose up -d
Security Notes
- Change default passwords after initial setup
- Enable 2FA for admin account
- Regularly update all services
- Monitor logs for suspicious activity
- Back up data regularly
License
This project is licensed under the MIT License - see the LICENSE file for details.
Acknowledgments
- Authentik Project
- CloudPanel
- Docker Community
- All contributors and testers
Support
For issues and support:
- Check the troubleshooting guide
- Open an issue on the above troubleshooting link.
- Visit the Authentik Documentation