GoPhish-Deploy is an automated deployment script for the GoPhish phishing framework, configuring it with SSL and secure defaults.
GoPhish-Deploy automates the deployment and configuration of the GoPhish phishing framework. The script installs all necessary dependencies, configures SSL certificates, and sets up the environment for a production-ready deployment.
- Fully automated - Complete installation and configuration in one script
- SSL ready - Automatic certificate generation with Certbot
- Secure defaults - Pre-configured with security best practices
- Custom modifications - Removes server headers and changes tracking parameters
- Auto-start - Configures GoPhish to start on system reboot
- User-friendly - Simple setup requiring only a domain name
| OS | Compatibility | Feature Support |
|---|---|---|
| Ubuntu | ✅ | Full support |
| Debian | ✅ | Full support |
| Other Linux | May require modifications |
- Linux-based operating system (tested on Ubuntu/Debian)
- Root privileges
- A valid domain name pointing to the server
# Clone the repository
git clone https://github.com/xbz0n/gophish-deploy.git
cd gophish-deploy
# Run the deployment script with your domain
python GoPhish-Deploy.py your-domain.compython GoPhish-Deploy.py example.comAfter deployment, access the GoPhish admin panel:
# Set up an SSH tunnel
ssh root@<your-server-ip> -L 3333:127.0.0.1:3333
# Then open in your browser
# https://127.0.0.1:3333
# Login with:
# Username: admin
# Password: gophish@123- Updates system and installs dependencies
- Installs Go 1.12 runtime environment
- Clones and builds the GoPhish project
- Applies custom modifications to improve security
- Generates SSL certificates using Certbot
- Configures GoPhish to use HTTPS
- Sets up auto-start on system reboot
- Provides access instructions using SSH tunnel
| Function | Description |
|---|---|
| System Update | Updates package lists and installs required dependencies |
| Go Installation | Installs Go 1.12 required to build GoPhish |
| Security Modifications | Removes X-Server header and changes tracking parameter from "rid" to "fname" |
| Database Configuration | Sets a default admin password and disables password change requirement |
| SSL Configuration | Generates and configures SSL certificates for secure connections |
| Auto-start | Creates a cron job to start GoPhish automatically on system reboot |
- Logs are stored in
/var/log/gophish - To manually start GoPhish:
cd /opt/gophish ./gophish
If you encounter issues:
- Ensure you are running the script with root privileges
- Verify your domain is correctly pointing to the server
- Check that port 80 and 443 are available for Certbot and GoPhish
- Examine the GoPhish logs for specific error messages
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
- The GoPhish project for their excellent phishing framework
- The security testing community for inspiration