How to set up a VPN on Oracle Cloud
We earn commissions when you shop through the links below.
Turn an Oracle Cloud Compute instance into your own WireGuard, AmneziaWG or VLESS VPN — one short terminal step, the rest in the Nullsify dashboard.
Is Oracle Cloud a good fit for a VPN?
- A free VPN server
- Unusual locations in Latin America and the Middle East
- Sign-up needs a credit card for verification, even for the free tier.
- Oracle may stop Always Free instances it considers idle — very low CPU, network and memory use over a week — and a lightly used VPN can look idle. Upgrading the account to Pay As You Go avoids that, and free-tier resources stay free.
Part 1: On Oracle Cloud
Create a Compute instance
In the Oracle Cloud console, go to Compute → Instances and click Create instance.
Pick the location closest to you for the best speed, or the country whose IP address you need — see Oracle Cloud's locations.
Choose Ubuntu
Change the image to Canonical Ubuntu 24.04 or 22.04 — the steps below assume Ubuntu. Oracle Linux 8 and 9 work too, but then the login user is opc instead of ubuntu.
Pick a size
The smallest plan with 1 GB of RAM is plenty for a personal, family or small-team VPN. Serving more people? The capacity calculator shows how many users each size handles.
Set up the login
Oracle only allows SSH key login, as a user named ubuntu. Download the private key it offers when creating the instance, or add your own public key.
Copy the IP address
The public IP address is on the instance's details page.
Open the firewall
Oracle Cloud has two firewalls, and both block VPN traffic by default. First, in the instance's virtual cloud network, open the subnet's security list and add ingress rules from 0.0.0.0/0 for UDP 51820 (WireGuard and AmneziaWG) and TCP 443 (VLESS).
Second, the server's own firewall. Log in as ubuntu with your key using an SSH app (Terminal on macOS and Linux, PowerShell or PuTTY on Windows), and run:
sudo iptables -I INPUT -p udp --dport 51820 -j ACCEPT sudo iptables -I INPUT -p tcp --dport 443 -j ACCEPT sudo iptables -D FORWARD -j REJECT --reject-with icmp-host-prohibited sudo netfilter-persistent save
If the third line says “Bad rule”, there was nothing to remove — that's fine.
- The Always Free shapes (Ampere Arm, or the small AMD one) work. Free Arm capacity is often sold out in busy regions, so try another availability domain or region if creation fails.
Part 2: In Nullsify
Add the server to Nullsify
In the dashboard, click the + next to Servers. Enter a name, the IP address, and the password — or choose Private key and paste your key. It's used once to install Nullsify's agent and is never saved.
Oracle Cloud doesn't log you in as root, so open Advanced settings and change Username to ubuntu.
Then pick a protocol. Not sure which? Take the 30-second protocol picker.
Wait for Active, then connect
Setup takes a few minutes. When the server shows Active, click Get Config and scan the QR code with the app for your protocol — the setup guide lists apps for every device.