To use WireGuard on a Mac, install the official WireGuard app from the Mac App Store, import the configuration file for your server, and click Activate. If you would rather work in Terminal, Homebrew and MacPorts carry the command-line tools. Either way you need a server to connect to, because WireGuard is software and comes with no servers.
The details below come from the WireGuard project's own site, the Mac app's published source code, Apple's listing data and support pages, and one VPN provider's setup guide, all read 23 November 2026. We did not go through these steps on a Mac ourselves, so nothing below is a test result.
What you need to run WireGuard on a Mac
There are two parts, and the project supplies only the first:
- A client. On a Mac this is either the WireGuard app, which has a window and a menu bar icon, or the command-line tools
wgandwg-quick. - A configuration for a server. A WireGuard tunnel is set up with your private key and the other side's public key (WireGuard's overview). Whoever runs the server gives you these details, together with the server's address, as a small text file ending in
.conf. That can be you, a network administrator, or a VPN provider that offers WireGuard files.
If you have no server and don't want to run one, skip to the section on a VPN app with WireGuard built in. For the protocol itself, see our guide to what WireGuard is.
The official WireGuard app for Mac
The project's installation page has two entries named macOS: an app on the Mac App Store, and a "Basic CLI" route through Homebrew or MacPorts. A third, "Nix on Darwin", installs the same command-line tools with the Nix package manager. The page lists no .dmg file or other download for the Mac.
Apple's listing data gives the app's name as WireGuard and its seller as WireGuard LLC. The current version is 1.0.16, last updated on February 15, 2023, and it needs macOS 12.0 or later (Apple's listing data for the US storefront, checked 23 November 2026). The listing says it "can import new tunnels from archives and files, or you can create one from scratch", and it sends readers to wireguard.com for "how to set up your own WireGuard server for use with this app". The app is a client and comes with no server of its own.
macOS has VPN settings of its own, but WireGuard is not among the connection types they offer. Apple's guide to entering VPN settings by hand lists L2TP over IPSec, Cisco IPSec and IKEv2 (Set up a VPN connection on Mac).
How to set up WireGuard on a Mac
These steps use the WireGuard app. The menu names are the ones in its source code, and the order follows Proton VPN's guide to configuring WireGuard on macOS by hand (Proton VPN support, read 23 November 2026).
- Install WireGuard. Open WireGuard on the Mac App Store and install it.
- Get your configuration file. Download or copy the
.conffile from whoever runs your server. It holds your private key, so keep it as you would a password. - Import the file. Open WireGuard, click its icon in the menu bar and choose Import Tunnel(s) from File…. Select the
.conffile and click Import. At the confirmation dialog that follows, click Allow. - Activate the tunnel. Select the tunnel in the tunnels window and click Activate. If the window isn't open, choose Manage Tunnels from the same menu. The same button then reads Deactivate, and that is how you switch the tunnel off.
- Check that traffic flows. The tunnel's details include Latest handshake, Data received and Data sent. A handshake is an exchange of two messages, one in each direction, so a handshake time there shows that the server has answered (WireGuard's protocol page). Then confirm that your public IP address has changed. Our guide to checking whether a VPN is active shows how.
While the tunnels window is open, the app's File menu has Add Empty Tunnel…, for creating a tunnel from scratch, and Export Tunnels to Zip…, for saving the ones you have to a zip file (the app's menu code and interface text on GitHub).
What a WireGuard configuration file looks like
A client file that sends all traffic through a VPN server has two sections. This one follows the example in the wg-quick manual page, with the keys left out:
[Interface]
PrivateKey = (your private key)
Address = 10.200.100.8/24
DNS = 10.200.100.1
[Peer]
PublicKey = (the server's public key)
AllowedIPs = 0.0.0.0/0
Endpoint = demo.wireguard.com:51820
PrivateKeyis your own secret key, andPublicKeyis the server's public key.Addressis the address your Mac takes inside the tunnel.DNSis the DNS server to use while the tunnel is up.AllowedIPslists the destinations that go through the tunnel. The manual page says an entry of0.0.0.0/0makes the tunnel the default gateway, which means all IPv4 traffic.Endpointis the server's address and port.
The format is described in the wg-quick manual page.
The Mac app reads this format, but it does not take every key that wg-quick does. Its source code accepts PrivateKey, ListenPort, Address, DNS and MTU under [Interface], and PublicKey, PresharedKey, AllowedIPs, Endpoint and PersistentKeepalive under [Peer]. It refuses a file that holds any other key and names the key in the alert. The script keys in the manual page, such as PostUp and PreDown, are not on that list. So if a file won't import, look for those lines first.
On-Demand, and what happens when you quit
Each tunnel has an On-Demand setting. Its options are Ethernet and Wi-Fi, and for Wi-Fi you can choose any network, only the networks you name, or every network except those. Apple describes connecting on demand as starting the VPN connection automatically when it is needed (Change VPN settings on Mac).
Quitting WireGuard does not switch a tunnel off. The app's own message says the tunnel "will remain active after exiting" and that you can disable it by reopening the app or through the Mac's network settings. Closing the window leaves WireGuard available from its menu bar icon.
The command-line route: Homebrew or MacPorts
The installation page gives one command for each package manager: brew install wireguard-tools or port install wireguard-tools. Homebrew's package installs two programs, wg and wg-quick, and depends on wireguard-go, which Homebrew describes as a "Userspace Go implementation of WireGuard" (Homebrew's page for wireguard-tools).
wg-quick brings a tunnel up from a configuration file and takes it down again. The manual page's examples run it as root and give the file's path:
sudo wg-quick up /path/to/wg0.conf
sudo wg-quick down /path/to/wg0.conf
The manual page says the file's name is the interface name followed by .conf. This route has no window, no menu bar icon and no On-Demand setting, and it accepts the script keys that the app refuses.
If you don't run a server: a VPN app with WireGuard built in
The WireGuard app needs a configuration file, and a configuration file needs a server. If you don't have one, the alternative is a VPN app whose maker runs the servers and builds the protocol in. Tegant VPN is our own app, and it works this way.
Tegant for Mac is on the Mac App Store. On the main screen you choose WireGuard or XRay, pick a server and connect. Tegant has servers in 18 countries, and WireGuard is available in all of them except Hong Kong, which is XRay only. WireGuard runs in the Linux kernel on our servers. The free tier, where it is available, is ad-supported and WireGuard only.
Tegant doesn't provide configuration files, so you use its servers through the app and can't load them into the WireGuard app. It has no kill switch and no auto-connect, so check that Tegant shows it is connected before you do anything sensitive.
WireGuard's own list of known limitations says it "does not focus on obfuscation" and does not support tunneling over TCP. On a network that blocks it, a different kind of protocol is the next thing to try. XRay is part of Tegant Premium on iPhone, iPad, Mac and Android, and it is available in 15 of Tegant's 18 server countries; France, Italy and Spain are WireGuard only. Our guide to V2Ray on a Mac covers that route. No VPN can guarantee access on every network, and that includes ours.
Rules on VPNs differ from country to country and change often, so check the current law where you are. Our guide to how VPN rules differ by country has more.
Common problems
- The file won't import. When you import a single file and it fails, the app's alert says why. It can name a key it doesn't recognize, show a line it can't read after the words "Invalid line", or say that the configuration must have an Interface section, or must have only one. Check that the file has one
[Interface]section, and remove keys that are not on the list above. - The tunnel is active but nothing loads. Look at Latest handshake. If no time appears, the server has not answered: check the
Endpointaddress and port, and check with whoever runs the server that your public key is registered there. - "DNS resolution failure". The app shows this when "one or more endpoint domains could not be resolved". The
Endpointline holds a host name that your Mac can't look up, so check the spelling and your internet connection. - The handshake field says the system clock was wound backwards. WireGuard relies on the system time, and its list of limitations says handshakes become impossible if the clock jumps backwards. Correct the Mac's date and time.
- The network blocks it. WireGuard runs over UDP and has no TCP mode, so a network that blocks its packets stops the tunnel. See the section above on a different kind of protocol.
- A tunnel is listed but you can't use it. The app's message for this says that if another user of the Mac created the tunnel, only that user can view, edit or activate it.
If the trouble is with a VPN app and not the WireGuard app, see why your VPN is not working.
WireGuard on Mac questions
Is there an official WireGuard app for Mac?
Yes. The WireGuard project's installation page links to it on the Mac App Store, and Apple's listing data names WireGuard LLC as the seller (checked 23 November 2026).
Does WireGuard for Mac come with a VPN server?
No. It is a client. Its listing sends readers to wireguard.com to learn how to set up their own server, so the configuration has to come from a server you run or from a provider.
Can I install WireGuard on a Mac without the App Store?
Yes, as command-line tools. The installation page gives brew install wireguard-tools for Homebrew and port install wireguard-tools for MacPorts. It lists no .dmg file for the Mac.
Is WireGuard built into macOS?
No. Apple's guide to entering VPN settings by hand lists L2TP over IPSec, Cisco IPSec and IKEv2. WireGuard needs the app or the command-line tools.
Tegant VPN supports WireGuard and, with Premium, XRay, so you can switch protocols depending on your network. Learn more about Tegant VPN.