Why a small board is ideal for a VPN server
A VPN server needs one thing above all: to stay on. A desktop PC running 24/7 is noisy and expensive to power; a single-board computer uses just a few watts, makes no noise and fits next to the router.
It is also powerful enough. MiVPN uses WireGuard, a very light VPN protocol, so even a modest board can handle the traffic of a home connection comfortably.
What you need
- A board: a Raspberry Pi (3, 4 or 5), an Orange Pi or a similar single-board computer.
- A system: Raspberry Pi OS 12 (Bookworm), Debian 12 or later, or Ubuntu 22.04 or later. Both 64-bit (arm64) and 32-bit Raspberry Pi systems (armhf) are supported.
- Storage and power: a good microSD card (or an SSD) and the official or a quality power supply.
- A network cable to the router: more stable than WiFi for a server.
- Access to a terminal on the board, directly or over SSH, with a user that can use
sudo. - A free mivpn.net account.
Install MiVPN Server
Open a terminal on the board (or connect over SSH) and add the MiVPN repository. The first line adds the key the packages are signed with, the second adds the repository and the last two install the server:
curl -fsSL https://mivpn.net/apt/mivpn.gpg | sudo tee /usr/share/keyrings/mivpn.gpg >/dev/null
echo "deb [signed-by=/usr/share/keyrings/mivpn.gpg] https://mivpn.net/apt stable main" | sudo tee /etc/apt/sources.list.d/mivpn.list
sudo apt update
sudo apt install mivpn-server
You only do this once: from then on, MiVPN updates arrive together with the rest of the system's updates.
Link it to your account and start it
Link the board to your account (it will ask for your password, which is only used to sign in and is not stored) and start the server:
sudo mivpn setup -e you@example.com
sudo mivpn enable
setup creates the WireGuard server, checks whether your connection accepts incoming traffic and, depending on the answer, opens the port on the router (UPnP) or switches on the MiVPN relay. enable starts everything and makes it start again by itself after a reboot or a power cut.
To check that it works:
sudo mivpn status
You should see the server running and the link with mivpn.net connected.
Connect your devices
Install the MiVPN app on your phone, tablet or laptop (Android, iOS, Windows, macOS and Linux), sign in with the same account and connect. The configuration downloads by itself: from anywhere, you are now inside your home network.
If your board has a desktop and you prefer windows to terminals, there is also MiVPN Server for Linux desktop, with the same functions.
Keep it running 24/7
- Use a cable, not WiFi, between the board and the router.
- Use a good power supply: a weak one is the most common cause of random reboots.
- Use a quality card or an SSD: cheap cards wear out sooner.
- Update from time to time:
sudo apt update && sudo apt install --only-upgrade mivpn-serverupdates only MiVPN, and the server restarts by itself.
Your own VPN server, free to start
Install MiVPN Server on any computer at home and connect from your phone or laptop. No configuration files, no third-party servers.
Frequently asked questions
Which Raspberry Pi do I need?
A Raspberry Pi 3, 4 or 5 is enough: WireGuard is very light. An Orange Pi or a similar board with Debian or Ubuntu works the same way.
Do I need a screen and a keyboard?
No. You can do everything over SSH from another computer.
Can I use the board for other things too?
Yes, as long as nothing else uses the same UDP port as the VPN server (51820 by default, which you can change during setup).
How do I move the server to another board later?
Install MiVPN Server on the new one and run sudo mivpn setup -e your@email --replace. The old board stops serving by itself, and the MiVPN app downloads the new configuration automatically.