Skip to content

Rangizingo/gophish-installer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoPhish Installer

Cross-platform scripts to deploy GoPhish phishing simulation platform.

Quick Start (New PC)

Linux (Ubuntu/Pop!_OS/Debian)

# 1. Clone and run installer
git clone https://github.com/Rangizingo/gophish-installer.git
cd gophish-installer
chmod +x install-gophish.sh
./install-gophish.sh

# 2. Save the admin password shown at the end

# 3. When prompted for Cloudflare Tunnel, say "y" and enter your subdomain

# 4. Install tkinter for the GUI
sudo apt install python3-tk

# 5. Start tunnel and GUI (when ready for campaigns)
cloudflared tunnel run gophish &
python3 email-admin-gui-linux.py

Windows

# 1. Clone and run installer (as Admin)
git clone https://github.com/Rangizingo/gophish-installer.git
cd gophish-installer
.\install-gophish.ps1

# 2. Save the admin password shown at the end

# 3. When prompted for Cloudflare Tunnel, say "y" and enter your subdomain

# 4. Start tunnel and GUI (when ready for campaigns)
cloudflared tunnel run gophish
.\email-admin-gui.ps1

Daily Use Commands

Task Command
Start GoPhish cd ~/gophish && docker compose up -d
Start Tunnel cloudflared tunnel run gophish
Open GUI (Linux) python3 email-admin-gui-linux.py
Open GUI (Windows) .\email-admin-gui.ps1
Check status ./install-gophish.sh --check
GoPhish Admin https://localhost:3333

Supported Platforms

Platform Script Status
Windows 10/11 install-gophish.ps1 Full support (GUI tools included)
Linux (Ubuntu/Pop!_OS/Debian) install-gophish.sh Core installer

Linux Installation

Prerequisites

  • Ubuntu, Pop!_OS, Debian, Fedora, or Arch-based distro
  • Internet connection
  • sudo privileges

The script will automatically install Docker if needed.

Install GoPhish

chmod +x install-gophish.sh
./install-gophish.sh

Check Status

./install-gophish.sh --check

Uninstall

./install-gophish.sh --uninstall

Post-install (if Docker permission issues)

sudo usermod -aG docker $USER
# Log out and back in, then:
docker ps  # should work without sudo

Windows Installation

Prerequisites

  • Windows 10/11
  • Internet connection
  • Administrator privileges

The script will automatically install:

  • Chocolatey (package manager)
  • WSL2 (Windows Subsystem for Linux)
  • Docker Desktop

Install GoPhish

# Requires admin
.\install-gophish.ps1

Check Status

.\install-gophish.ps1 -CheckOnly

Uninstall

.\install-gophish.ps1 -Uninstall

With Logging

.\install-gophish.ps1 -LogPath "C:\logs\gophish-install.log" -Verbose

Cloudflare Tunnel Setup (Optional)

Both install scripts offer to set up a permanent Cloudflare Tunnel after GoPhish installs. This gives you a fixed URL like https://phish.yourdomain.com instead of random URLs that change each time.

During Installation

You'll be prompted: "Do you want to set up a permanent Cloudflare Tunnel?"

  • If yes, a browser opens for Cloudflare login
  • Enter a tunnel name (default: gophish)
  • Enter your subdomain (e.g., phish.yourdomain.com)
  • Config is saved to ~/.cloudflared/config.yml

Set Up Tunnel Later

# Linux
./install-gophish.sh --tunnel

# Windows
.\install-gophish.ps1 -TunnelOnly

Start Your Tunnel

# Foreground (see logs)
cloudflared tunnel run gophish

# Background (Linux)
cloudflared tunnel run gophish &

# Background (Windows - new terminal)
Start-Process cloudflared -ArgumentList "tunnel run gophish" -WindowStyle Hidden

Benefits of Permanent Tunnel

Feature Quick Tunnel Permanent Tunnel
URL Random (changes each time) Fixed (e.g., phish.yourdomain.com)
Old campaign links Break on restart Always work
Setup None One-time Cloudflare login
DNS Auto Routes to your domain

Access

After installation (both platforms):

Service URL
Admin UI https://localhost:3333
Phishing Server http://localhost:80
Landing Page (with tunnel) Your configured subdomain

Default credentials are displayed after installation. Change the password immediately.

First Campaign Quick Start

  1. Login to https://localhost:3333
  2. Change admin password (Account Settings)
  3. Create a Sending Profile (SMTP server config)
  4. Create an Email Template
  5. Create a Landing Page
  6. Import or create User Groups
  7. Create and launch Campaign

Data Persistence

Campaign data is stored in Docker volume gophish-data. This persists across container restarts.

To backup:

docker run --rm -v gophish-data:/data -v $(pwd):/backup alpine tar czf /backup/gophish-backup.tar.gz /data

Platform-Specific Tools

Windows

  • email-admin-gui.ps1 - WinForms GUI for M365 email management and campaign control
  • Exchange Online integration scripts
  • Various PowerShell diagnostic tools

Linux

  • email-admin-gui-linux.py - Tkinter GUI (equivalent to Windows version)
  • Requires: sudo apt install python3-tk

Cross-Platform

  • update-gophish.py - Update templates via API (Python)
  • oci-retry-launch.py - OCI cloud deployment helper (Python)
  • templates/ - HTML email and landing page templates

Compliance Notice

AUTHORIZED USE ONLY

This tool is for legitimate security awareness testing. Ensure you have:

  • Written authorization from organization leadership
  • Documented scope and rules of engagement
  • Data handling procedures for campaign results
  • Compliance with applicable regulations (PCI-DSS, SOC2, etc.)

Campaign data contains sensitive employee information. Handle with care.

Troubleshooting

Docker not starting (Linux)

sudo systemctl start docker
sudo systemctl enable docker

Docker permission denied (Linux)

sudo usermod -aG docker $USER
# Log out and back in

Docker not starting (Windows)

  • Ensure virtualization is enabled in BIOS
  • Restart after WSL2 installation
  • Check Docker Desktop logs

Port conflicts

  • Port 80 or 3333 may be in use
  • Edit ~/gophish/docker-compose.yml to change ports

Container not starting

docker logs gophish

License

GoPhish is licensed under MIT. This installer script is provided as-is for authorized use.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors