Oracle Cloud Free Tier WireGuard VPN (2026): Setup, and Why It Sometimes Fails

Run a free WireGuard VPN on Oracle Cloud Always Free in 2026: create the instance, open UDP 51820 in the security list, fix the OCI iptables rule that silently blocks traffic, and configure clients. Plus the honest limits of the free tier.

By Eric GerardFounder · VPNSmith - Self-host VPN & GDPR VPS specialist

Updated 9 min read9 min

Affiliate links: we may earn a commission, at no extra cost to you. Method

Black Friday 2026Proton VPN Plus $59.76 for 24 months(checked 24 Nov, affiliate link)

Generate my configRead the guide

fig. 01 / self-host-vpnencrypted tunnelUDP 51820DEVICE10.8.0.2SERVER10.8.0.1INTERNETNATAllowedIPs = 0.0.0.0/0, ::/0ListenPort = 51820 (server)
fig. 01 / self-host-vpn

Oracle Cloud's Always Free tier is one of the few genuinely free ways to run your own VPN on a real cloud server with a public IP. It is popular for exactly that reason. It is also the source of a lot of "why won't this work" frustration, because two OCI-specific quirks silently block WireGuard even when your config is perfect. Here is the honest, working version: how to set it up, the two things that trip almost everyone up, and where the free tier's limits actually bite.

Black Friday 2026Proton VPN Plus $59.76 for 24 months, unchanged when re-read on 27 Nov. Surfshark Starter now €53.73 for 27 months (was €67.23), next to a self-hosted VPS. See the dated comparison · Get the Proton VPN deal (affiliate link) · Proton Unlimited at $6.49 a month: the bundle, priced · Self-hosting? Contabo Black Friday is live: Cloud VPS Plus 2 at 7.20 € a month instead of 9.00 € (read 24 Nov)

fig. 01 / self-host-vpnencrypted tunnelUDP 51820DEVICE10.8.0.2SERVER10.8.0.1INTERNETNATAllowedIPs = 0.0.0.0/0, ::/0ListenPort = 51820 (server)
fig. 01 / self-host-vpn

If the free tier is out of capacity in your region, or you need a server that will not be reclaimed when idle, the paid fallback this guide compares against is a Contabo Cloud VPS (affiliate link): 4 vCPU and 8 GB from 4.40 € a month for the first 24 months, then the catalogue price of 5.50 €, as read on contabo.com on 21 November 2026. The WireGuard steps below are the same on both. Another option: HostPapa Unmanaged VPS Lite (affiliate link) is 2.95 $ a month on a 3-year term, then the regular rate (1 core, 1 GB RAM, 25 GB NVMe, root SSH access, 30-day money-back guarantee, read on 28 October 2026).

Second option, on Black Friday sale: Hostinger KVM 1 (affiliate link) at $6.49 a month paid upfront for 24 months ($155.76), with 1 vCPU, 4 GB RAM and 50 GB NVMe, renewing at $11.99 a month (prices read on hostinger.com on 18 November 2026, sale from 19 October to 14 December 2026). Less RAM than Contabo for more money, but Hostinger displays a 30-day money-back guarantee on its VPS page, handy if you are only testing.

What you get on Always Free

Oracle's Always Free resources do not expire the way a trial does. Every account gets a couple of small AMD micro instances (VM.Standard.E2.1.Micro), plus Arm Ampere A1 capacity (VM.Standard.A1.Flex) worth 1,500 OCPU hours and 9,000 GB hours a month, which Oracle's documentation translates to 2 OCPUs and 12 GB of memory for an Always Free account (older guides still quote 4 cores and 24 GB, that is no longer the figure), and a generous 10 TB of outbound transfer per month. For a single-user WireGuard VPN that is far more than enough - the bottleneck will be your home connection, not the instance. So yes, the running cost really can be zero.

The setup, in order

The procedure itself is standard WireGuard, with two OCI-specific steps you cannot skip. Create an Always Free instance with a Ubuntu 22.04 image and your SSH key, and note its public IPv4. Then, before anything else on the networking side, open the port and fix the firewall.

Close-up of colorful programming code on a computer monitor. On Oracle Cloud, WireGuard needs both a security-list rule and an instance firewall edit before traffic gets through.
Close-up of colorful programming code on a computer monitor. On Oracle Cloud, WireGuard needs both a security-list rule and an instance firewall edit before traffic gets through.

The two things that silently break it

If you have ever searched "oracle cloud wireguard not working", it is almost certainly one of these two, and often both.

First, the security list. Your VCN's public subnet has a security list that acts as a stateful firewall at the network edge. WireGuard's default UDP port 51820 is not open by default, so you must add an ingress rule: source 0.0.0.0/0, protocol UDP, destination port 51820. Miss this and the packets never even reach your instance.

Second, and much less obvious, the instance firewall. Oracle's Ubuntu images do not ship with an empty firewall. They come with an iptables INPUT chain that rejects most inbound traffic, persisted via netfilter-persistent. So you can open the security list correctly and still get nothing, because the box itself drops the packet. The fix is to insert an ACCEPT rule for UDP 51820 above the reject line - sudo iptables -I INPUT 6 -p udp --dport 51820 -j ACCEPT - and save it with sudo netfilter-persistent save. Do both, and the WireGuard handshake completes on the first try.

Not sure which of the two still blocks you? The free WireGuard port checker gives a tcpdump test to run on the instance: no packet at all means the security list, packets that arrive without a handshake point to the instance firewall or the keys. For the keys, paste the instance's wg0.conf and the client file into the free WireGuard pair checker: it derives each public key from the other side's private key and says which file is wrong, without the keys leaving your browser.

With both openings in place, you still need the configs. Our free WireGuard config generator writes the server wg0.conf and one config per device (QR code for phones) in a minute, keys generated in your browser. Put the instance's public IPv4 as the endpoint, and replace eth0 in the PostUp and PostDown lines with the instance's real interface: Oracle's Ubuntu images often name it ens3 or enp0s6, and ip route | grep default shows it. A wrong name there gives a tunnel that connects but has no internet. The generator is free with no account, up to 250 devices, and its ZIP export holds every client .conf and its QR code as a PNG, handy to set up a whole office or family in one go.

Generate your WireGuard configs here

Type your server address, choose the number of devices, then scan each QR code from the app.

All keys are generated in your browser (Curve25519 / X25519). Nothing is sent to our servers - your config stays 100% private.

Public IPv4 or domain of the machine that will run WireGuard. No server yet? Leave it empty and add it later.

Free, no account: up to 250 clients, each .conf with its QR code, and one ZIP with every file.

Everything the device sends to the internet goes through your server.

Advanced settingsTunnel subnet, DNS, site-to-site LANs. The defaults work for most setups.

Optional. Enter the LAN subnet behind the server and/or behind a client that acts as a site gateway (a router, a Raspberry Pi, a NAS). The generator adds each LAN to the server's AllowedIPs, gives every peer the routes to the other LANs, and writes the forwarding rules on the gateways. Leave a field empty for a normal client.

What you download

  • wg0.conf

    for the server

  • client1.conf

    one per device

  • QR (sample)

    for the phone app

Illustration only: the lines and the QR code are fictional, no real key. Your real files are generated in your browser when you click.

Where the free tier's limits actually bite

Free is real, but it is not the same as dependable, and being honest about that saves you a bad afternoon later.

The first friction is capacity. The Arm Ampere A1 shape is the popular one, and "Out of host capacity" errors when you try to create it are common in busy regions. You can retry at off-peak times or pick a quieter availability domain, but the simplest fix is to use the Always Free AMD micro shape instead - it is smaller, but a single-user WireGuard tunnel does not need much.

The second is reclamation. Oracle's policy permits reclaiming idle Always Free compute, and a lightly used VPN can look idle. A VPN you use daily generally stays active enough to be fine, but it is a risk you do not control, and an interruption you did not schedule is exactly what you do not want from the tunnel you rely on.

The third is bandwidth, and it is the one most guides skip. Oracle documents the AMD micro shape at 1/8 of an OCPU, 1 GB of memory and up to 50 Mbps to the internet. That is fine for SSH and light browsing, but it caps every device on your tunnel at 50 Mbps combined, so the "just use the micro shape" fallback costs you speed on a fibre line. The Arm A1 shape scales its bandwidth with the OCPUs you give it, which is why everyone fights for it.

On reclamation, Oracle is precise: an Always Free instance counts as idle if, over 7 days, its 95th-percentile CPU use stays under 20 %, its network use under 20 % and, on A1 shapes, its memory use under 20 %. A personal WireGuard server sits below those thresholds for much of the week, which is why the risk never fully goes away even with daily use. Some people run a load generator to look busy; that burns the free resources to protect them, and it is still Oracle's call in the end.

If you hit one of these walls (no A1 capacity for days, a 50 Mbps ceiling, or a reclaimed instance), the WireGuard config you just wrote moves as-is to any VPS with a public IPv4: only the Endpoint IP changes on your clients.

A VPN changes your IP. It does not change your browser.

A tunnel replaces the address a service sees. It changes nothing about what your browser announces on its own - fonts, screen, time zone, graphics stack - and that combination is often stable enough to recognise you across sessions, tunnel or no tunnel.

Measure your own browser fingerprint - passive, no questions, no account, no email.

When to move to a paid VPS

For a lot of people the honest path is: start on Oracle Always Free to learn the setup and prove it works, then move to a low-cost paid VPS once the VPN becomes something you depend on every day. A paid box removes the two things Oracle's free tier cannot promise - guaranteed capacity in the region you want, and no idle-reclamation risk - usually for only a few euros a month. If you reach that point, our self-hosted WireGuard VPN on Contabo guide walks through the same WireGuard setup on a paid box that is reliably yours. To pick that box, our best VPS for a VPN comparison puts eight hosts side by side on the price you actually pay, IPv4 included; the one it recommends for a server you keep is a Contabo Cloud VPS, 4 vCPU and 8 GB for 5.50 € a month on 24 months as read on 17 October 2026.

Either way, the WireGuard configuration you learn here is identical. The only real difference between the free Oracle instance and a paid VPS is how much you can count on the server still being there tomorrow.

Affiliate link

Checked 24 Nov 2026: €4.40 for the first 24 months, list price €5.50

Frequently asked questions

Is Oracle Cloud really free for a VPN?
Yes, within the Always Free tier. Oracle gives every account a set of Always Free resources that do not expire, including small AMD micro instances and Arm Ampere A1 capacity equivalent to 2 OCPUs and 12 GB of memory, plus 10 TB of outbound data transfer per month. A personal WireGuard VPN fits comfortably inside that, so the running cost genuinely is zero as long as you stay on Always Free shapes.
Why is my Oracle Cloud WireGuard not working?
Almost always one of two things. First, the VCN security list is missing an ingress rule for UDP 51820, so the packets are dropped at the network edge. Second, and more subtle, Oracle's Ubuntu images ship with an iptables INPUT chain that rejects inbound traffic by default, so even with the security list open the instance itself blocks the port. You need to add an ACCEPT rule for UDP 51820 above the reject line and persist it. Fix both and the handshake completes.
Why can't I create an Arm (A1) instance?
The 'Out of host capacity' error on VM.Standard.A1.Flex is common because the free Arm Ampere capacity is heavily used in popular regions. Options: retry at off-peak hours, pick a less busy availability domain, or simply use the Always Free AMD micro shape (VM.Standard.E2.1.Micro) instead, which is lighter but perfectly adequate for a single-user WireGuard VPN.
Can Oracle reclaim my free VPN instance?
Oracle's policy allows reclaiming idle Always Free compute, and a low-traffic VPN box can look idle. In practice a VPN you actually use generates enough activity to be fine, but there is a real risk of interruption you do not control. If the VPN is important - always on, no surprises - a low-cost paid VPS is the more dependable home for it.
Oracle free tier vs a cheap paid VPS - which should I use?
Use Oracle Always Free if your priority is zero cost and you can tolerate occasional capacity or reclamation friction. Use a cheap paid VPS if you want a box that is reliably yours, in the region you choose, with predictable performance and no idle-reclamation risk. Many people start on Oracle free and move to a paid VPS once the VPN becomes something they rely on daily.