🚀 Part 2 — Setting Up Your Oracle Cloud Account and Compute Instance for Node.js + React.js Deployment
🌐 Overview
In the previous part, we explored why Oracle Cloud Infrastructure (OCI) is becoming a top choice for developers deploying full-stack JavaScript apps.
Now, it’s time to get your hands dirty — we’ll create your Oracle Cloud Free Tier account, configure your Virtual Cloud Network (VCN), and set up a Compute Instance (virtual server) to host your Node.js backend and React.js frontend.
This guide will help you go from zero to a live server on OCI, ready for app deployment.
🧭 Step 1: Create an Oracle Cloud Free Tier Account
Oracle Cloud offers one of the most generous free-tier programs among all cloud providers. It includes:
- 2 AMD or Arm-based Compute Instances
- 10 GB Object Storage
- Autonomous Database (Free)
- 10 TB/month outbound bandwidth
- Load balancer, monitoring, and more
🔹 Steps to Register:
- Visit 👉 https://www.oracle.com/cloud/free/
- Click Start for Free.
- Fill in your details:
- Country and name
- Valid email address
- Mobile number for OTP verification
- Payment Information (Mandatory for verification):
- You can use a debit or credit card.
- Oracle only performs a ₹1 authorization hold (not a charge).
- If your account has insufficient balance, the transaction fails, but no auto-charge will happen later.
- After verification, your OCI account is created.
💡 Pro Tip: Choose the region closest to your users for better latency (e.g., “Mumbai” for India).
🧰 Step 2: Log In to the Oracle Cloud Console
Once your account is active:
- Go to https://cloud.oracle.com/
- Log in using your Cloud Account Name and credentials.
- You’ll land on the OCI Dashboard, which looks like this:
+-----------------------------------------------------------+
| Oracle Cloud Console |
|-----------------------------------------------------------|
| Compute | Networking | Storage | Monitoring | ... |
+-----------------------------------------------------------+
This dashboard is your control center for managing compute instances, VCNs, and all cloud services.
🌐 Step 3: Create a Virtual Cloud Network (VCN)
Before launching your instance, you must set up a Virtual Cloud Network (VCN) — it’s like a private cloud LAN where your instance lives.
🔹 To Create VCN:
- From the left menu → Networking → Virtual Cloud Networks
- Click Create VCN
- Choose VCN with Internet Connectivity
- Provide:
- VCN Name →
my-node-react-vcn - CIDR Block → default
10.0.0.0/16
- VCN Name →
- Check ✅ “Create related resources”
This automatically creates:- Public Subnet
- Internet Gateway
- Route Table
- Security List
Click Create VCN and OCI will handle everything for you.
💻 Step 4: Create a Compute Instance (Virtual Server)
This instance is where your Node.js and React.js apps will live.
🔹 Steps:
- Navigate to Compute → Instances
- Click Create Instance
- Fill in details:
- Name:
node-react-server - Placement: Choose a region and availability domain (default is fine)
- Image: Ubuntu 22.04 (recommended)
- Shape: Choose Always Free Eligible (Ampere A1 or AMD)
- Name:
- Add SSH Keys:
Generate SSH keys using:
ssh-keygen -t rsa- Copy your public key content into OCI under “Add SSH key”.
- Keep your private key safe — you’ll use it to connect.
Click Create, and within a few minutes your VM will be ready.
🔐 Step 5: Access Your Instance via SSH
Once the instance is active:
- Note your Public IP Address from the instance dashboard.
- Connect using SSH from your local terminal:
ssh -i ~/.ssh/id_rsa ubuntu@<your-public-ip>
If connected successfully, you’ll see:
Welcome to Ubuntu 22.04 LTS (GNU/Linux 5.x aarch64)
🎉 Congratulations! You’re now inside your cloud VM.
🧱 Step 6: Configure Security Rules (Firewall)
By default, OCI blocks all external traffic. You must open required ports for Node.js and React.js.
🔹 To Allow HTTP/HTTPS:
- Go to Networking → Virtual Cloud Networks → your VCN
- Click Security Lists → Default Security List
- Add ingress rules:
- Port 80 (HTTP): Source CIDR
0.0.0.0/0 - Port 443 (HTTPS): Source CIDR
0.0.0.0/0 - Port 3000 (Node.js): Source CIDR
0.0.0.0/0(optional for testing)
- Port 80 (HTTP): Source CIDR
Save changes.
⚙️ Step 7: Basic Server Setup After SSH Login
Before deploying apps, install updates and essential tools:
sudo apt update && sudo apt upgrade -y
sudo apt install git curl nginx -y
✅ Nginx → will serve your React build later
✅ Git → to pull your project from GitHub
✅ Curl → to install Node.js and test endpoints
🧩 Step 8: Verify Instance Health
Test connectivity and uptime:
ping -c 4 google.com
To check system resource usage:
htop
And to confirm your public IP:
curl ifconfig.me
If all commands work — your OCI server is live, healthy, and internet-accessible.
🌍 Step 9: (Optional) Reserve a Static IP Address
Dynamic IPs change after instance restarts. To avoid that:
- Navigate to Networking → Reserved Public IPs
- Click Create Reserved Public IP
- Assign it to your instance.
Now you can safely use this IP in your domain DNS records.
🧠 Pro Tips
- Always use free-tier eligible shapes (e.g.,
VM.Standard.A1.Flex) to avoid costs. - Use OCI Monitoring to track usage and CPU load.
- Create snapshots of your instance before major updates.
- Avoid exposing unnecessary ports for better security.
✅ Summary
You’ve successfully:
- Created an Oracle Cloud Free Tier account
- Configured a Virtual Cloud Network (VCN)
- Launched a Compute Instance (Ubuntu)
- Connected via SSH
- Set up networking and firewall rules
Your cloud environment is now fully ready to host Node.js and React.js applications.
In the next tutorial (Part 3), we’ll:
🔧 Install Node.js, npm, and PM2 on the OCI instance,
🧩 Set up your backend server, and
🔍 Test it live over the internet.
