Create Your Own VPN Step by Step

According to the Freedom House index, global internet freedom has declined for the 12th year in a row. This has been exacerbated by countries like Russia, Iran, and Libya which increased their internet censorship in 2022. In over 53 countries, people have faced severe legal repercussions for expressing their opinions online.

It’s no wonder why VPN use is on the rise worldwide. At CyberGhost, for example, we had an average of 142,000 active connections in 2021, an increase from just 66,000 in 2019.

While you can use free and paid VPNs, you can also build one yourself. Why would you want to learn how to create a VPN at home? It could be for various reasons. You probably want to know how VPNs work, have more control over your data, or find out how building a server yourself can help you save money. Whatever your reasons are, we’ve got step-by-step guides on how to create your own VPN whether you’re using a Windows or Mac PC.

I tried to keep things simple and affordable when writing this post. That’s why I’ll focus only on solutions that use tools you already have at home and require little to no money or technical know-how.

Even though it’s possible, creating your own VPN takes time, effort, and, in some cases, money. It also comes with some limitations. If you’re only after enjoying the privacy and security VPNs offer, you can install CyberGhost VPN instead. It’s fast, easy to set up, and only costs a few dollars per month!

Why create your own VPN at home

It’s easy to get a VPN these days, so why would you want to build your own VPN service? Perhaps you’re just curious or love tinkering with things. In that case, learning how to create a VPN at home will keep you pretty busy.

Here are more reasons why you might want to set up your own VPN:

          • It’s affordable. You can create your own VPN at home with free tools and devices you already own. You can, for example, set up your router or spare computer as your server.
          • It boosts your online privacy. Unwanted third parties like your ISP, cybercriminals, and government authorities could snoop on your online activity without your consent. Use a VPN to encrypt your traffic, so you can keep what you do online private as it should be.
          • It lets you access your computer from anywhere. Want to access your files or connected devices at home while you’re away? You can do this with a VPN. The VPN connects you to your home network, so you can view files and control devices like your smart cameras wherever you go.

How to create a VPN at home

You have several options if you want to create your own VPN, including using your router, computer, or virtual machine in the cloud. Take a look at these easy-to-follow guides on how to create a VPN at home in the sections below. I’ve split the steps based on whether you want to set up your Windows PC, Mac computer, or router as your VPN.

Remember: Create a VPN on a device that’s always online, so you can always access it and enjoy the benefits of using it. If your device ever goes offline, even temporarily, it will leave you unprotected.

You might find them difficult to follow at first if you don’t have any networking experience or if you never tinker with your devices. Don’t worry, though. Just follow along with the steps and you should have your own working VPN in less time than it takes your grandma to figure out online shopping.

n image of a confused old woman staring at her laptop's screen.

Create a VPN for Free on Windows 11

Let’s start with a tutorial on how to create a VPN at home on Windows. The easiest way to do this is to use Windows’ built-in tool to create your own VPN. I tested this feature on a Windows 11 computer, but the steps should be similar for earlier versions of the OS. Again, create a server on a Windows machine you can always leave online.

You can also run an OpenVPN server on your Windows machine. I decided not to cover it, because this method can get complicated pretty quickly and I wouldn’t recommend it if you’re new at setting up a VPN. Instead, I’ll focus on the built-in tool to help you get started.

This simplicity comes at a price, though, since this option uses a VPN protocol called PPTP. It’s less secure than more modern protocols like OpenVPN and WireGuard®, so secure your VPN connections with a strong password.

With that out of the way, follow these steps to create your own VPN at home on Windows 11:

  1. Open Network Connections. Click the Start icon, type ‘Network Connections’, and then click View Network Connections.
    A screenshot of the Windows interface showing a user searching with the keywords 'network connections.
  2. Press Alt+F, and then choose New Incoming Connection…
  3. Select the user accounts you want to allow to connect to your computer via a VPN. Alternatively, click Add someone to create a new user,  then enter a username, full name, and a strong password
A screenshot of the Windows interface showing a user entering a username, full name, and password.

To increase security, you may want to create a new, limited user account rather than allow VPN logins from your primary user account. Whatever user account you choose, create a very strong password, since a cybercriminal can easily guess or crack a weak one.

  1. Click OK, and then Next.
  2. Click on Through the Internet as the means of connecting to your computer via VPN. Click Next.
A screenshot of the Windows interface showing an option to allow an external computer to connect to a VPN through the internet.
  1. Choose the type of networking software that will be enabled for incoming connections. Check File and Printer Sharing for Microsoft Networks if you’d like connected users to be able to view files and use printers you shared on the network. 
A screenshot of the Windows interface showing a list of networking software that will be enabled for incoming connections.
  1. Click Allow access. A notification confirming your action will appear.
  2. Check your external IP. Go to a website like which lets you check your IP address. Take note of your IPv4 address — you’ll need this to be able to connect devices to your VPN from outside your home network.A screenshot of a webpage displaying a computer's IP address in IPv6 and IPv4 formats.
  1. Your VPN is ready to go!

(Optional) If you want to access your VPN from outside your internal network, you’ll need to set up port forwarding. This step directs your external computer’s connection to the Windows computer where you host your server. To do this, log into your router and forward port 1723 to the IPv4 address you got in Step 8. This can get complicated and the actual steps may vary from router to router, so please refer to your model’s manual for more information.

How to Connect to Your Windows VPN

Once you’ve set up your Windows VPN, you’ll now have to check if you can access it with a different device. In this example, I connected to my homemade server using a Windows computer. Follow these steps to get connected:

  1. Click on the Start icon, type “VPN settings” (without quotation marks), and then hit Enter.
A screenshot of the Windows interface showing a user searching with the keywords 'VPN settings.'
  1. Click Add VPN in the VPN connections option.
A screenshot of the Windows interface showing a list of VPN-related options.
  1. In the Add a VPN connection window, do the following:
    1. Choose Windows (built-in) as your VPN provider.
    2. Enter the connection name — any name will do.
    3. In the Server name or address field, enter the IPv4 address given to you in Step 8 of the “Create a VPN for Free on Windows 11” section.
    4. Select PPTP as your VPN type.*
    5. Choose to sign in with a username and password, and then enter the same username and password you created in Step 3 of the “Create a VPN for Free on Windows 11” section.
    6. Click Save.
A screenshot of the Windows interface showing a form for adding a new VPN connection.
  1. Connect to the server you created.
A screenshot of the Windows interface showing a computer connecting to a VPN.

*This depends on the protocols your router supports. Most support PPTP, but you can try one of the other protocol options to see if it works.

Caution: PPTP is largely considered an obsolete VPN protocol. It’s nearly 30 years old and the United States’ National Security Agency and cybercriminals have cracked it, making PPTP a security risk. A safer solution would be a VPN service like CyberGhost. We use the best and latest VPN protocols when it comes to speed and security, including OpenVPN, IKEv2, and WireGuard®.

How to Create a VPN at Home with macOS

macOS users used to be able to create their own VPN with Apple’s macOS Server app. Unfortunately, the company has since discontinued this, so you can no longer natively build a VPN on Mac. You can, however, create your own VPN in the cloud, which we’ll cover next.

Create Your Own VPN in the Cloud

You can host your VPN in the cloud if you’re using a Mac or prefer this method for its additional security benefits. Here, you’ll build a virtual machine (VM) where you can create your server. 

Although a lot of providers offer this option, I’ve chosen Google Cloud in this post for several reasons. First, you likely have a Gmail account already, which you can use to create a Google Cloud account. It’s also fairly easy to set up as you’ll see below. Finally, you can try it out for free.

Here’s how you can create your own VPN service on Google Cloud:

  1. Create a Google Cloud account. You can use your existing Gmail account to log in or create a new one. Either way, you’ll get free credits if you’re a new Google Cloud user.
  2. Go to the Google Cloud Marketplace. Search for OpenVPN, and click Launch.
  3. Name your server deployment.
A screenshot of the Google Cloud interface showing a text box where a user can name a VPN server deployment.
  1. Choose the zone/location of your VPN. The options here are quite limited compared to a paid VPN like CyberGhost, but it still lets you choose a location you like.
A screenshot of the Google Cloud interface showing a dropdown list of locations a user can use for their VPN server.
  1. Choose your machine type. The smallest and cheapest one will do if you only have basic VPN requirements. Google Cloud has an article on machine types if you want to learn more. 
  2. Click Deploy, to create your VM.
A screenshot of the Google Cloud interface showing customization options when creating a virtual machine.
  1. Make your IP address static. To do this, go to Computer Engine > VM instances.
A screenshot of the Google Cloud interface showing the Compute Engine menu and virtual machines submenu.
  1. Next, click on the instance of the VM you created.
A screenshot of the Google Cloud interface showing a virtual machine instance in a list.
  1. Click Edit.
A screenshot of the Google Cloud interface showing a menu of virtual machine-related options.
  1. On the network interface page, go to the External IPv4 address section, choose Ephemeral, and then click Create IP Address.
A screenshot of the Google Cloud interface showing a menu of IP address-related options.
  1. Enter the IP address’ name (you can leave the description text box blank), click Reserve, Done, and Save.
A screenshot of the Google Cloud interface showing a window where a user can reserve a new static IP address.
  1. Go to Deployment Manager > Deployments. Next, choose the server deployment you just created, then click on SSH. This opens a terminal window.
  1. Do the following steps in the terminal:
A screenshot of the Google Cloud interface showing a terminal window where a user create a new OpenVPN password.
  1. Create a root password. Type “sudo passwd root” (without quotation marks). Next, enter your new password, retype it to confirm, and then hit the Enter key. A confirmation message will appear once you’ve successfully created a password.
  2. Log in to the VPN. In the next line, type “su root” (without quotation marks) to log in, and then enter your password.
  3. Change your OpenVPN password. Type “passwd openvpn” (without quotation marks), and then enter and reenter your new password. Make sure the password is at least 16 characters long with a combination of uppercase and lowercase letters, numbers, and symbols. 
  4. Exit from the terminal.
  5. Return to Deployment Manager > Deployments. Choose your deployment, and then click on the Admin URL link.
A screenshot of the Google Cloud interface showing the site address and Admin URL of a deployment.
  1. Read the license agreement, then click Agree.
A screenshot of the OpenVPN interface showing its license agreement window.
  1. Click on Configuration > VPN Settings.
A screenshot of the OpenVPN interface showing its Configuration menu.
  1. Select Yes, in the Should client Internet traffic be routed through the VPN? option.
A screenshot of the OpenVPN interface showing a menu item asking whether or not client traffic should be routed through the VPN.
  1. Go to DNS Settings, and then select Yes only for the Have clients use specific DNS servers option. Next, enter the Primary and Secondary DNS Servers you wish to use. You can use Google’s DNS (i.e.,, or Cloudflare’s DNS (i.e.,,, for example.
A screenshot of the OpenVPN interface showing its DNS settings menu.
  1. Click Save Settings, and then click Update Running Server.
  2. Next, go to Configuration > Network Settings. Make sure the value of Hostname or IP Address is the same as the IP address in the address bar. Otherwise, change it, then click Save Settings and Update Running Server.
A screenshot of the OpenVPN interface comparing the VPN server's IP address with the address on the browser's address bar.
  1. Restart the VPN. Click on Status > Status Overview, click Stop VPN services, and then confirm. Click Start VPN services to restart the VPN.

Testing Your Google Cloud-hosted VPN

Now for the fun part: testing your cloud-hosted VPN. First, you need to install OpenVPN Connect on your device.

  1. Go to Google Cloud’s Deployment Manager. Click on the site address link.
  2. Log in with your OpenVPN credentials.
  3. Download and install the appropriate OpenVPN Connect installer for your platform.
A screenshot of the OpenVPN interface showing download options for its OpenVPN Connect app.

Installing OpenVPN Connect on macOS or Windows:

  1. Click on the installer file. Follow the installation instructions, and then close the window.
  2. Open OpenVPN Connect. Go through the onboarding process, read the data collection, use, and retention policy, and then click Agree.
  3. Turn on the toggle and log in using your credentials.
A screenshot of the OpenVPN Connect interface showing its login window.
  1. Accept the self-signed certificate.
A screenshot of the OpenVPN Connect interface showing a popup window requesting confirmation to accept self-signed certificates.
  1. You’re connected! Go to Google and type ”what’s my ip” to verify OpenVPN Connect is working. Your new IP address should appear.

Create a VPN on Your Router

You can buy a router with built-in capabilities that support turning it into a VPN or that can connect to a VPN service like CyberGhost. You can also add VPN capabilities to your current router if it supports “flashing” or changing its firmware with a custom one. Popular custom firmware are DD-WRT and OpenWRT.

Warning: Flashing your router can void its warranty or render it unusable, so do it at your own risk. Also, check if your preferred firmware supports your router before proceeding and carefully follow its installation instructions.

The actual steps for flashing your router will depend on your specific brand and model, but will more or less follow these steps:

  1. Download custom firmware. Confirm compatibility between your router and preferred firmware, and then download it.
  2. Connect your computer to your router. Do this via a wired connection. If your computer doesn’t have an Ethernet port, you can buy a USB to Ethernet adapter for a few dollars. 
  3. Log into your router. Open a browser and enter your router’s address (typically or Log in with the username and password.
  4. Install the firmware. Find the page for upgrading your router’s firmware. Then, follow the custom firmware’s specific installation instructions.
  5. Reboot the router. Once the installation is done, restart your router and log in as you did in Step 3.
  6. Set up your VPN. Look for the VPN tab in the router’s menu, choose OpenVPN, and set up the VPN and the devices that will connect to it (called “clients”). Follow your chosen firmware’s instructions to do this.
  7. Check if your VPN works. Connect your device to your router and Google your IP address. The VPN server’s address should be displayed.

Always perform a DNS leak test after setting up your VPN. This confirms your connection is secure, so no one can snoop on your online activity. Use our free DNS leak test to check if your VPN works.

The Downsides of Creating Your Own VPN

VPNs are a fantastic way to control your privacy online, especially if you create your own server. There are drawbacks to this, though, including the following: 

    • Bandwidth caps and connection speed limits

Commercial VPNs are able to offer excellent connection speeds and unlimited bandwidth because of their infrastructure. CyberGhost VPN, for example, has 10 Gbps servers, which deliver enough bandwidth for 4K streaming, low lag gaming, and fast torrenting. We also don’t cap your bandwidth, so you can use our fast VPN as much as you like without being throttled.

On the other hand, your homemade VPN’s connection speed will depend on your internet plan at home. You need at least a gigabit fiber connection, because anything slower will hamper your VPN’s performance.

Also, choose a plan without data caps. Otherwise, you’ll quickly eat up your monthly data allocation if you use your server for streaming or transferring large files. 

    • Fixed location

It’s difficult to change your location when you set up your own VPN. This can be a deal-breaker if you want a server that lets you switch to overseas locations. You’ll be better off just paying for a service that already has server locations across the wrold. CyberGhost VPN, for example, has a global network of servers across 91 countries.

    • The time and effort required

You can set up some VPN servers quite easily, like Windows’ built-in VPN. The downside is it only uses the PPTP protocol, which is less secure than modern VPN protocols like OpenVPN. To build a more secure server, you need a bit of technical know-how and patience to pull this off.

You also have to run security checks regularly on your homemade server, such as a DNS leak test, to confirm it works as it should. Considering how complex setting up your own VPN can be if you’re not tech savvy, you could be more prone to security risks. Things like a weak password or a wrong VPN configuration could easily compromise your setup.

It takes work to set up your own VPN. Unless you’re willing to invest the time and resources, it might be better to get a paid VPN instead.

    • The lack of a host of other features

Unlike commercial VPNs, you likely won’t be able to do much with your home VPN setup aside from changing your IP address. CyberGhost VPN, for example, offers privacy-focused settings, which prevent third parties from seeing your online activity. These include our DNS leak protection and automatic Kill Switch that temporarily cuts you off from the internet if your VPN is disconnected. We also constantly upgrade our infrastructure to give you fast speeds and more servers options worldwide.

Want an Easy Way to Get a VPN? Subscribe to a VPN Service.

Not everyone has the time and patience to create their own VPN, and that’s okay. That’s why subscription-based VPN services like CyberGhost exist, among other equally good reasons.

CyberGhost VPN takes care of everything, from setting up and maintaining the network to providing a user-friendly VPN client. All you need to do is subscribe to CyberGhost VPN and connect to one of our servers. It should take about 5 minutes.

If it’s speed you’re after, our server infrastructure has you covered. We have dedicated servers for activities like streaming and gaming, so slow connection speeds won’t get in the way of your fun.

We’ll keep you secure too. We use 256-bit AES encryption and secure VPN protocols to prevent anyone from snooping on you while you’re connected to CyberGhost.


Can I create my own VPN at home?

Certainly. You can buy a router with built-in VPN capability or flash one with a custom firmware. You can then set it up as a VPN or connect it to a subscription service like CyberGhost VPN. You can also set up a server on your Windows computer or host it in a cloud provider like Google Cloud for Windows or Mac.
Check out our full guide on how to create a VPN on Windows and Google Cloud for more information.

Can you make your own VPN for free?

Yes, you can. If you’re wondering how to create your own VPN for free, you can install free custom firmware like DD-WRT and OpenWRT on a compatible router. Windows also lets you create a built-in VPN within the OS without paying for anything.

Be warned, though — creating your own VPN can be complicated and risky unless you know what you’re doing. Simplify protecting your online security with a paid VPN like CyberGhost. It comes with military-grade encryption and VPN apps for all your devices. Try it out today risk-free with our 45-day money-back guarantee.

How much does it cost to create a VPN?

It depends on factors like your goals (e.g., accessing your home network from anywhere) and setup (e.g., using a dedicated device as a server). Free options include creating a VPN in your spare Windows machine or installing custom firmware on your current router.

Paid ones, on the other hand, include buying a router with built-in VPN capability, hosting one in the cloud, or buying a dedicated PC for extra performance and security. You could also subscribe to CyberGhost VPN. It’s cheaper and easier to use if you want to be protected or access global servers without any technical know-how.

What are the cons of running your own VPN?

It takes a bit of patience and technical know-how to run your own VPN. Prepare to read and watch a lot of tutorials to help you get started.

You’ll have limited server options too, especially on your home router or computer. This isn’t ideal if you want a VPN to change your IP address and access geo-restricted content. Security can be an issue too. One wrong setting or a weak password could expose your home network to cybercriminals.

Avoid these issues with a premium VPN like CyberGhost, which has servers across the world and uses the latest VPN protocols and military-grade encryption.

Leave a comment

Honestly, I don’t know how to open a vpn account


Hello Donatien,
Have you considered trying our VPN? You can try it for 45 days.
It’s easy to set up too, or you can reach out to our Customer Support team if you need more help.
I hope that helps!

Quiero crear una aplicación VPN gratuitos pero nose cómo aserlar


Hola, Rene! You can try out our tips in this article and see how it goes.

Write a comment

Your email address will not be published. Required fields are marked*