Skip to content

Instantly share code, notes, and snippets.

@henno
Last active January 6, 2026 20:26
Show Gist options
  • Select an option

  • Save henno/cd2b460d756988212be8709d3b3e5e99 to your computer and use it in GitHub Desktop.

Select an option

Save henno/cd2b460d756988212be8709d3b3e5e99 to your computer and use it in GitHub Desktop.
Wireguard multitunnel

Running Multiple WireGuard Tunnels Simultaneously on macOS

The official WireGuard app for macOS only allows one active tunnel at a time. This guide shows you how to use WireGuardStatusbar, a menubar app that supports multiple simultaneous tunnels.

What You'll Need

  • macOS computer
  • Existing WireGuard configurations (from your WireGuard app)
  • About 15 minutes

Step 1: Install Homebrew (if not already installed)

Open Terminal (press Cmd + Space, type "Terminal", press Enter) and paste:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Follow the on-screen instructions. When finished, close and reopen Terminal.

Step 2: Install WireGuard Tools

In Terminal, run:

brew install wireguard-tools

Step 3: Export Your Configurations from WireGuard App

  1. Open the WireGuard app
  2. For each tunnel you want to use:
    • Right-click on the tunnel name
    • Select Export Tunnel to Zip File...
    • Save it somewhere you can find it (e.g., Desktop)
  3. Unzip each file - you'll get .conf files

Step 4: Move Configuration Files

Create the WireGuard config folder:

sudo mkdir -p /opt/homebrew/etc/wireguard

Move your .conf files to this folder. In Terminal:

sudo cp ~/Desktop/your-tunnel.conf /opt/homebrew/etc/wireguard/

Or use Finder:

  • Press Cmd + Shift + G
  • Type /opt/homebrew/etc/wireguard and press Enter
  • Drag your .conf files here (you'll need to enter your password)

Important: Rename your files to simple names without spaces, for example:

  • work-vpn.conf
  • home-server.conf

Step 5: Secure the Configuration Files

In Terminal, run:

sudo chmod 600 /opt/homebrew/etc/wireguard/*.conf

Step 6: Install WireGuardStatusbar

  1. Go to: https://github.com/aequitas/macos-menubar-wireguard/releases
  2. Download the latest .zip file (e.g., WireGuardStatusbar.app.zip)
  3. Unzip the downloaded file
  4. Drag WireGuardStatusbar.app to your Applications folder
  5. Open WireGuardStatusbar from Applications
    • If you see a security warning, go to System Settings → Privacy & Security and click Open Anyway

Step 7: Using Your Tunnels

Once WireGuardStatusbar is running, you'll see a small icon in your menubar (top-right of your screen).

To start/stop tunnels:

  1. Click the WireGuardStatusbar icon in the menubar
  2. You'll see a list of all your tunnels
  3. Click on a tunnel name to toggle it on/off
  4. A checkmark (✓) indicates the tunnel is active

Multiple tunnels:

Simply click on each tunnel you want to activate. Unlike the official app, you can have multiple tunnels running at the same time!

Launch at login (recommended):

  1. Click the WireGuardStatusbar icon
  2. Enable Launch at Login so the app starts automatically

Tips

  • You'll be asked for your Mac password when activating tunnels - this is normal
  • Deactivate all tunnels in the WireGuard app first before using WireGuardStatusbar
  • You can keep the WireGuard app installed, just don't activate tunnels there
  • The menubar icon changes appearance when tunnels are active

Troubleshooting

No tunnels appear in the menu

Make sure your .conf files are in /opt/homebrew/etc/wireguard/. Check with:

ls /opt/homebrew/etc/wireguard/

"Permission denied" error

Make sure the config files have correct permissions:

sudo chmod 600 /opt/homebrew/etc/wireguard/*.conf

Tunnel won't start

  1. Check if you have a tunnel active in the official WireGuard app. Deactivate it first.
  2. Try starting the tunnel manually in Terminal to see the error:
    sudo wg-quick up work-vpn

App won't open (security warning)

Go to System Settings → Privacy & Security, scroll down and click Open Anyway next to the WireGuardStatusbar message.

Check tunnel status

Open Terminal and run:

sudo wg show

Command Line Reference (Advanced)

If you prefer using Terminal, you can also control tunnels directly:

Action Command
Start tunnel sudo wg-quick up tunnel-name
Stop tunnel sudo wg-quick down tunnel-name
Check status sudo wg show

Replace tunnel-name with your config file name (without .conf).


Links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment