Oracle Cloud Infrastructure: WireGuard Deployment Guide
Overview
This guide demonstrates the deployment and configuration of a VPN gateway in Oracle Cloud Infrastructure (OCI). The walkthrough covers ingress rules and WireGuard configuration using an automated script.
Prerequisites
Required Components
- Oracle Cloud Infrastructure account with appropriate permissions
Documentation References
Infrastructure Setup
Virtual Cloud Network (VCN) Configuration
-
Create VCN with Custom CIDR Block:
- Navigate to Networking → Virtual Cloud Networks
- Create VCN with CIDR block:
10.0.0.0/16
- Enable DNS hostnames and DNS resolution
-
Configure Subnets:
- The virtual machine setup wizard will walk you through this setup.
Security List Configuration
Configure security lists to allow VPN traffic:
Inbound Rules:
- Source:
0.0.0.0/0
, Protocol: UDP, Port: 7910 - Source:
0.0.0.0/0
, Protocol: 22 (ssh) <– Ideal to add your IP address

Installation Script
One-Click WireGuard VPN Setup for Oracle Cloud
https://github.com/not2cleverdotme/Oracle_Cloud_Wireguard
This repository provides a complete, automated solution for setting up a WireGuard VPN server on Oracle Cloud Infrastructure (OCI). Perfect for beginners and non-technical users - just run one script and you’ll have a fully functional VPN server!
🚀 Quick Start (3 Steps)
- Download the installation script
- Run the script
- Add your devices to the VPN
That’s it! No technical knowledge required.
✨ Features
- 🔧 One-Click Installation - Single script does everything automatically
- 🛡️ Built-in Security - Automatic firewall configuration and security fixes
- 📱 Easy Device Management - Simple commands to add phones, laptops, etc.
- 🌐 Multi-Platform Support - Works on Windows, Mac, Linux, Android, iOS
- ☁️ Oracle Cloud Optimized - Specifically designed for OCI environments
- 🔍 Auto-Troubleshooting - Automatically fixes common connectivity issues
- 📊 Status Monitoring - Easy commands to check if everything is working
📋 What You Need
- Oracle Cloud account (free tier works great!)
- A computer to run the installation script
- Basic command line knowledge (we’ll guide you through it)
Supported Operating Systems:
- Oracle Linux ✅
- Ubuntu ✅
- CentOS ✅
- RHEL ✅
🚀 Quick Start
Step 1: Download the Installation Script
wget https://raw.githubusercontent.com/not2cleverdotme/Oracle_Cloud_Wireguard/refs/heads/main/wireguard_oracle_cloud_install.sh
Step 2: Make it Executable
chmod +x wireguard_oracle_cloud_install.sh
Step 3: Run the Installation
sudo ./wireguard_oracle_cloud_install.sh
That’s it! Refer to the repo for troubleshooting assistance.
Client Side
Download the .conf to your device, either desktop or mobile. Install the WireGuard app and then import the configuration file.
Conclusion
This VPN deployment script should provide a good foundation to setting up your own VPN instead of relying on a paid service. Although speed is dependant on the VM resources, it will still provide you with enough bandwidth to safely navigate the web. Feel free to make adjustments to your VM resources to see if it helps address the speed issues. I kept things to the free tier so that I don’t need to worry about costs.