How To Create PiVPN Server Using A Self-hosted Ubuntu Linux VPS And WireGuard Client

Channel:
Subscribers:
30,000
Published on ● Video Link: https://www.youtube.com/watch?v=sIXzfqVQE7E



Duration: 0:00
987 views
10


In this video, you will learn how to set up your own self-hosted Virtual Private Network (VPN) using PiVPN which is a set of shell scripts developed originally to turn a Raspberry Pi into a VPN server using one of two free open-source protocols called WireGuard and OpenVPN. PiVPN is installed easily by using a single command. The PiVPN installation will take place on a Virtual Private Server (VPS) also known as a cloud server for this video demonstration. WireGuard is the selected protocol during the PiVPN setup as it is the more modern protocol and the recommended protocol by the PiVPN installation script. WireGuard is a cross-platform open-source VPN that utilises cryptography in its protocol. DigitalOcean will be the VPS host provider used in this video demonstration. It offers cloud servers through a service called Droplets.

🔵 Free $200 DigitalOcean cloud credits using my referral link: https://digitalocean.pxf.io/c/1245219/1373759/15890

How To Get $200 In Free DigitalOcean Cloud Credits    • How To Get $200 In Free DigitalOcean ...  

How To Install PuTTY on Windows 11 And Windows 10    • How To Install PuTTY On Windows 10 Or...  

WireGuard VPN Client Installation https://www.wireguard.com/install/
What Is My IP Address https://whatismyipaddress.com/
Download PuTTY https://www.putty.org/
PiVPN https://www.pivpn.io/
PiVPN Docs https://docs.pivpn.io/

Steps To Setup A Private PiVPN Server On A VPS:
1. Navigate to https://digitalocean.pxf.io/c/1245219/1373759/15890 and create a free DigitalOcean account. This is my referral link granting you $200 in free cloud credit for 60 days as a new user
2. Once you have created your DigitalOcean account, you will be taken to your DigitalOcean dashboard. Click Create.
3. Click Droplets
4. Choose your PiVPN server region, configure your droplet and click Create Droplet
5. Go To https://www.wireguard.com/install/ and install the WireGuard client appropriate for your operating system (OS)
6. Log into your server using an SSH client such as PuTTY. Here is a video of mine that takes you step by step through the process of installing PuTTY    • How To Install PuTTY On Windows 10 Or...  
7. Install PiVPN by running the follwing PiVPN automated installer command:

curl -L https://install.pivpn.io/ | bash

8. Go through the PiVPN setup to generate your server keys in terminal while ensuring to pick the following configuration options during the install:

Create a non-root user account also known as a sudo (won't be logged into but required by the PiVPN installation script to store and view client configuration files
Choose a VPN protocol, WireGuard VPN protocol is recommended and chosen in this video demo, however if you need features like TCP or custom domain search then select the OpenVPN protocol
Go with the default WireGuard port: 51820
Choose a DNS provider for your VPN Clients from the following: Quad9 (default), OpenDNS, Level3, NS.WATCH, Norton, FamilyShield
Select connect to the server by public IP address
Enable unattended server upgrades

Note: Use the Tab key to highlight an option, Space to select an option and Enter to go to the next set of options (page) on your keyboard.

9. Check all PiVPN commands using the following command:

pivpn help

10. Run the next command to create client configuration profiles:

pivpn add

11. For a mobile device with the WireGuard client installed, you have the convenient option to connect using a QR code. You can generate this for each specific client in the command line terminal using the following command:

pivpn qrcode

12. View your created configuration file at the following directory:

cd /home/username/configs

Note 2: Make sure to replace "username" in the directory above with your non root username you created earlier during the PiVPN installation

13. Type the following to view the current directory you are in:

ls

14. View your client .conf files connection information using the following command

cat clientname

Note 3: Make sure to replace clientname with your client's name that you created during step 10


15. Copy the client .conf files contents from [Interface] to AllowedIPs = 0.0.0.0/0, ::0/0 inclusive

16. Open the WireGuard client
17. Click the dropdown arrow next to Add Tunnel and click on Add empty tunnel...
18. Delete the placeholder information and replace it by pasting in the .conf file information
19. Give your newly created tunnel a name in the WireGuard client and click save
20. Click Activate
21. See if your VPN is working correctly by checking if your current IP address is masked by PiVPN and the WireGuard VPN protocol at https://whatismyipaddress.com/

Timestamps:
0:00 - Intro & Context
1:18 - Create A VPS
3:18 - Install WireGuard Client
4:05 - Login as root on your VPS
6:03 - Install PiVPN, Add Clients
12:16 - View Client Config info using QR Code or .conf file
14:05 - Add Tunnels To WireGuard Client And Activate The VPN
14:44 - Check To See If Your IP Address Is Masked By WireGuard
15:18 - Closing & Outro

#PiVPN #VPN #WireGuard




Other Videos By Websplaining


2025-02-14How To Build An AI Agent Or AI ChatBot Using GenAI Platform On DigitalOcean & Add It To Your Website
2025-02-08How To Setup Open WebUI And Run Any AI LLM ChatBot On A DigitalOcean GPU Cloud Server
2025-02-05How To Generate A SSH Public And Private Key Pair Using PuTTYgen To Connect To Your VPS
2025-02-04How To Setup DeepSeek-R1 LLM AI ChatBot Using Ollama On An Ubuntu Linux GPU Cloud Server (VPS)
2024-11-19How To Setup Ollama LLM AI Chatbot With Open WebUI, An Open-source AI User Interface On Ubuntu VPS
2024-11-15How To Set Your Domain Name As Your Bluesky Handle
2024-11-13How To Make An OpenVPN Access Server With Web-Based User Interface (UI) On DigitalOcean
2024-11-07How To Create PiVPN Server Using A Self-hosted Ubuntu Linux VPS And WireGuard Client
2024-11-04How To Make A WireGuard Easy (wg-easy) VPN Server With Web-Based Admin UI On An Ubuntu Linux VPS
2024-10-30How To Install One Click, Pre-configured Hugging Face (HUGS) AI Models On DigitalOcean GPU Droplets
2024-10-29How To Check NVIDIA GPU Specification Information On Ubuntu Linux Command Line Terminal
2024-10-29How To Create A NVIDIA H100 GPU Cloud Server To Run And Train AI, ML, And LLMs Apps On DigitalOcean
2024-10-25How To Make A Counter-Strike 2 (CS2) Game Server On A DigitalOcean Ubuntu Linux VPS (Droplet)
2024-10-22How To Create Your Own OpenVPN Server On An Ubuntu Linux VPS
2024-08-28How To Setup SPR : Secure Programmable Routers VPN Server On An Ubuntu Linux VPS
2024-01-08How To Request To Increase Droplet Limit On DigitalOcean
2024-01-04How To Create Your Own WireGuard VPN Server Using An Ubuntu Linux VPS
2023-12-28How To Create Your Own Pi-hole VPN Server On A Linux VPS Using DigitalOceans 1 Click Droplet Install
2023-11-27How To Quickly Share Your Connected Wi-Fi Network With Your Friends On Android
2023-11-25How To Turn On And Share Your Wi-Fi Hotspot Data With Friends On Android
2023-11-22How To Update The Google Play Store On Android



Other Statistics

Counter-Strike: Source Statistics For Websplaining

At this time, Websplaining has 18,536 views for Counter-Strike: Source spread across 9 videos. His channel published less than an hour of Counter-Strike: Source content, roughly 1.72% of the content that Websplaining has uploaded to YouTube.