Gophish is a free open-source phishing simulation framework with campaign tracking, customizable templates, landing pages, and secure deployment
Gophish is a free, open-source phishing simulation framework that allows security teams to create, send, and track phishing email campaigns. Its intuitive web management interface enables users to:
{{.FirstName}} and {{.URL}} to make emails more convincingGophish provides pre-compiled executables requiring no complex environment setup. Visit the Gophish GitHub Releases page to download the latest ZIP archive.
# Extract (replace with your downloaded version number)
unzip -d gophish gophish-v0.12.1-linux-64bit.zip
cd gophish
# Grant execute permissions
chmod +x gophish
# Start Gophish
sudo ./gophish
Gophish's root directory contains config.json. Before production deployment, adjust these key settings:
{
"admin_server": {
"listen_url": "127.0.0.1:3333", // Admin panel: recommended to keep localhost-only
"use_tls": true, // Recommended to enable TLS (requires certificate)
"cert_path": "gophish_admin.crt",
"key_path": "gophish_admin.key"
},
"phish_server": {
"listen_url": "0.0.0.0:80", // Phishing server: listen externally on 80 or 443
"use_tls": false,
"cert_path": "example.crt",
"key_path": "example.key"
}
}
Important security note: The admin panel (port 3333) is bound to 127.0.0.1 by default. If deploying Gophish on a remote VPS, do NOT change admin_server.listen_url to 0.0.0.0:3333 (direct public exposure). The correct approach is to access the admin panel via SSH tunnel:
# Create SSH tunnel forwarding local port 3333 to remote VPS 127.0.0.1:3333
ssh -L 3333:127.0.0.1:3333 your_user@your_vps_ip
# After creating the tunnel, open admin panel in local browser
# Note: defaults to HTTP (not HTTPS) unless TLS is enabled in config.json
http://127.0.0.1:3333
time="..." level=info msg="Please login with the username admin and the password 4r7Xk2mP9qLw"
This password is only shown once — copy it immediately. If you miss it, restart Gophish to regenerate it, or pre-set the environment variable GOPHISH_INITIAL_ADMIN_PASSWORD (useful for automated deployments).
http://127.0.0.1:3333 (or via SSH tunnel)admin and the random password shown in the terminal
Version note: The random password generation mechanism applies to v0.10.1 and later. For v0.10.1 and earlier, the default credentials are admin / gophish — change them immediately after deployment.
To run a complete phishing simulation exercise (Campaign), complete the following five setup steps in order from the left menu:
Set up the SMTP server information for sending phishing emails. You can integrate with an internal test mail server or a third-party email service. After setup, click "Send Test Email" to verify the connection.
Click "New Group" and upload a CSV file to batch import test employee lists. CSV fields typically include First Name, Last Name, and Email.
Design the fake webpage that victims see after clicking the email link:
Use the HTML editor to write phishing emails. Gophish supports these important variables:
{{.FirstName}}, {{.LastName}}: Automatically fills in recipient names for added authenticity{{.URL}}: Required — the system automatically replaces this with the Landing Page's tracking URL (including a unique identification token){{.Tracker}}: Embeds a hidden 1x1 tracking pixel to detect email opens (even if the user doesn't click any link)Combine all previously configured elements:
{{.URL}} expands to), pointing to the phishing server (port 80/443), not the admin panel (port 3333)After the campaign launches, monitor all employees' open rates, click rates, and credential submission rates in real time on the dashboard, and generate reports to arrange corresponding security awareness training.