Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

VPN

Access your server privately from anywhere in the world by routing traffic through a VPN server on your router or a cloud VPS. Only authorized devices with the VPN configuration can reach your server.

Use Case

This connection method is ideal for fast, private, personal access from anywhere in the world using a VPN server running on your router or VPS. Only authorized devices have access to your server and installed services.

Tip

Private domains also work over VPN — see Private Domains.

Option 1: Router

Most modern routers include a VPN server feature. If so, it is usually the preferred method for private, remote access to your server.

  1. If you haven’t already, assign a static IP address to your server on the LAN. Refer to your router’s user manual for detailed instructions.

  2. Since home IP addresses can change without warning, we highly recommend setting up dynamic DNS. Many routers offer this as a built-in feature. If not, third-party services are available. Without dynamic DNS, a change to your home IP will disconnect all VPN clients until you re-download configuration files for each one.

  3. Enable your router’s VPN server. Refer to your router’s user manual for detailed instructions.

Option 2: StartTunnel

By default, StartTunnel exports wireguard config files that are configured for split tunneling, allowing you to use your StartTunnel VPN to access your StartOS server and installed services while also preventing it from being automatically used for all Internet traffic.

There are three reasons to select this option:

  1. Your router does not offer a VPN server.
  2. Your router’s VPN server is not automatically configured for split tunneling.
  3. You are already using StartTunnel for clearnet hosting, so most of the work is already done.

To use StartTunnel for private, remote VPN access, see StartTunnel.

Connecting Clients (WireGuard)

Once you have successfully enabled a VPN server on your router or added a StartTunnel gateway, follow the instructions below.

  1. Obtain a WireGuard config file for your device.

    • StartTunnel: Follow instructions here
    • Router: Follow your router’s instructions.
  2. Install WireGuard and import your config file:

  1. Install WireGuard from the App Store.

  2. Open the WireGuard app, click “Import tunnel(s) from file”, and select the config file.

  3. MacOS will inform you that WireGuard wants to set up a VPN connection. Click “Allow”.

  4. Your VPN tunnel will have been created and visible in both your Mac’s system settings and in the WireGuard app where you can click to activate it.

    Tip

    You may need to edit your newly created tunnel and enable “On-demand” for either ethernet, wifi, or both.

Connecting Clients (OpenVPN)

Note

OpenVPN is only available when using a router-based VPN server. StartTunnel uses WireGuard.

  1. Download the configuration file from your router’s OpenVPN server.

  2. Install OpenVPN and import your config file:

  1. Install the OpenVPN Connect client from the official website.

  2. If asked to do so, allow the OpenVPN client to run in the background.

  3. Import the configuration file and enter the necessary authentication settings you chose or were default on your OpenVPN server on your router.

  4. Depending on how you’ve configured your OpenVPN server, you may need to add a username and password before you hit Connect.

  5. Once set up, click on the name of the profile to connect and disconnect. You can edit the profile from the icon to its right.