![How to connect to Surfshark in countries with internet restrictions on a macOS device?](https://surfshark.com/wp-content/uploads/2023/08/Restricted_access_VPN_Mac-1024x501.png)
In this tutorial, you will learn how to set up a manual WireGuard connection on your macOS device.
Credentials and locations
For any manual WireGuard connection you will need to have a key pair and a location to which you would like to connect selected, below you will find information on how to get the key pair as well as the server configuration file.
I have a key pair
- Go to this page, choose the Desktop or mobile option and click on WireGuard.
![restricted connection wireguard macos 1](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-1.png)
- In the next window, click on I have a key pair.
![restricted connection wireguard macos 2](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-2.png)
- Enter your public key and hit Save.
![restricted connection wireguard macos 3](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-3.png)
- Now, click on Choose a location, and download your preferred location.
![restricted connection wireguard macos 4](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-4.png)
![restricted connection wireguard macos 5](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-5.png)
Note: If you do not generate key pair before downloading the configuration file, the file will be missing your key pair. In such cases, you will need to generate a key separately and input it manually into missing fields.
I don’t have a key pair
- Go to this page, choose the Desktop or mobile option and click on WireGuard.
![restricted connection wireguard macos 6](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-6.png)
- In the next window, click on I don’t have a key pair.
![restricted connection wireguard macos 7](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-7.png)
- Click on Generate a new key pair.
Note: once the key pairs are generated, copy them and store them on your device, as you will not be able to check them again.
![restricted connection wireguard macos 8](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-8.png)
- Now, click on Choose a location, and download your preferred location.
![restricted connection wireguard macos 9](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-9.png)
![restricted connection wireguard macos 10](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-10.png)
Note: If you do not generate key pair before downloading the configuration file, the file will be missing your key pair. In such cases, you will need to generate a key separately and input it manually into missing fields.
Download and install WireGuard
- Open the App Store on your macOS device, type in WireGuard in the search field and install the WireGuard application.
![restricted connection wireguard macos 11](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-11.png)
- Once the installation is complete Open the WireGuard application.
![restricted connection wireguard macos 12](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-12.png)
Connect to the VPN
- In the WireGuard application, click on Import tunnel(s) from file.
![restricted connection wireguard macos 13](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-13.png)
- Now select the Surfshark configuration file you’ve downloaded earlier, and hit Import.
![restricted connection wireguard macos 14](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-14.png)
- In the next pop-up, click Allow.
![restricted connection wireguard macos 15](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-15.png)
- You can rename this uploaded connection to your liking. To do so, simply click Edit. I’ll name it Surfshark WireGuard.
Note: once you click Edit, you will need to enter your Keychain password, which is your regular macOS device password.
![restricted connection wireguard macos 16](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-16.png)
![restricted connection wireguard macos 17](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-17.png)
- Lastly to connect to the VPN, click Activate, and to disconnect from the VPN, click Deactivate.
![restricted connection wireguard macos 18](https://surfshark.com/wp-content/uploads/2023/08/restricted-connection-wireguard-macos-18.png)
Congratulations! Now you know how to set up a manual connection on your macOS device using the WireGuard protocol.