Installation
First, install Ahh CLI:
curl -fsSL https://cli.ahh.bet/install.sh | bash
source ~/.bashrc # or ~/.zshrc for zsh
Make sure you have cloudflared installed for tunnel functionality.
Your First Tunnel
Tunnels allow you to expose local services to the internet instantly - perfect for CTF challenges, demos, or quick file sharing.
Start a local service
First, run a simple HTTP server on port 8000:python3 -m http.server 8000
You can tunnel any service running on localhost, not just HTTP servers.
Create a tunnel
In a new terminal, create a tunnel to your service:Or use the shorthand: Get your public URL
Ahh CLI will output a public URL and QR code:Tunnel URL: https://abc-123-def.trycloudflare.com
███████████████████████████████
███████████████████████████████
████ ▄▄▄▄▄ █▀█ █▄█▄█ ▄▄▄▄▄ ████
████ █ █ █▀▀▀█ ▄ █ █ █ ████
████ █▄▄▄█ █▀ █▀▀█▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀ ▀▄█ █▄▄▄▄▄▄▄████
The URL is immediately accessible from anywhere on the internet!
Serve Files Instantly
The serve command combines a file server with automatic tunneling:
This command:
- Starts an HTTP server in your current directory (default port 8000)
- Creates a tunnel automatically
- Displays a public URL and QR code
Example output:
URL: https://xyz-789-abc.trycloudflare.com
███████████████████████████████
███████████████████████████████
████ ▄▄▄▄▄ █▀█ █▄█▄█ ▄▄▄▄▄ ████
████ █ █ █▀▀▀█ ▄ █ █ █ ████
████ █▄▄▄█ █▀ █▀▀█▄█ █▄▄▄█ ████
████▄▄▄▄▄▄▄█▄▀ ▀▄█ █▄▄▄▄▄▄▄████
Scan the QR code with your phone to instantly access files from any device!
Custom Port
Serve on a different port:
ahh serve --port 3000
# or
ahh serve -p 3000
Generate QR Codes
Generate QR codes from any text or URL:
echo "https://example.com" | ahh qr
Share files with QR codes:
ahh serve
# Automatically generates a QR code for the tunnel URL
Create custom QR codes:
echo "CTF{flag_goes_here}" | ahh qr
Copy to Clipboard
Pipe any content to your clipboard:
echo "some text" | ahh clip
The clip command works with any stdin input, making it easy to copy command outputs.
Real-World CTF Example
Here’s a complete workflow for sharing a CTF challenge file:
Navigate to challenge directory
cd ~/ctf-challenges/web-challenge
ls
# Output: index.html exploit.sh README.md
Serve the directory
Output:URL: https://quick-snow-1234.trycloudflare.com
███████████████████████████████
██ QR CODE DISPLAYED HERE ██
███████████████████████████████
Share the link
Your teammates can now:
- Visit the URL to browse files
- Scan the QR code on mobile devices
- Download challenge files instantly
# Teammates can download with:
curl https://quick-snow-1234.trycloudflare.com/exploit.sh -o exploit.sh
Next Steps
Commands
Explore all available commands and options
Webhook Server
Set up webhook servers for CTF challenges
Workspaces
Initialize CTF workspace templates
Discord Integration
Share content through Discord webhooks
Common Use Cases
Quick File Sharing
cd ~/files-to-share
ahh serve
# Share the URL or QR code
Expose Local Development Server
# Your app runs on port 3000
npm run dev
# In another terminal
ahh tunnel -p 3000
Share Command Output
ifconfig | ahh clip
# Now paste the network config anywhere
Generate Access QR Code
echo "wifi-password-here" | ahh qr
# Scan to share WiFi password
Tunnel URLs are public and accessible by anyone with the link. Don’t expose sensitive services without proper authentication.
Tips
Keep tunnels running: Tunnel processes run in the foreground. Use tmux or screen to keep them alive when closing your terminal.
Port already in use? If you get an error about ports being in use, either stop the existing service or choose a different port with -p.
Rate limiting: Free Cloudflare tunnels may be rate-limited. If you hit limits frequently, consider configuring a custom tunnel on your domain.