I recently found that Oracle Cloud offers a generous Always Free tier — yes, a VPS that can run forever. Thank you, Oracle!
Here’s what I deployed on that VPS (PocketBase), plus how I fixed the firewall and enabled HTTPS.
Why PocketBase
I was building an MVP for a friend (see Allo LAM3LLEM). We wanted to move fast, so I picked two tools:
- Next.js: great DX and a stack AI models are well‑trained on.
- PocketBase: acts as a lightweight API + DB + auth in one binary. I don’t want to rebuild common features from scratch.
Now let’s go to the main goal here: how to set up Pocketbase on an Oracle VPS!
Setup PocketBase on Oracle Cloud
PocketBase runs as a single binary. Make sure you have the tools to download and unzip it.
- Install/Update required tools
sudo apt update && sudo apt install wget unzip -y
- Download PocketBase
wget https://github.com/pocketbase/pocketbase/releases/download/v0.29.3/pocketbase_0.29.3_linux_amd64.zip
- Unzip and move into the folder
unzip pocketbase_0.29.3_linux_amd64.zip -d pocketbase
cd pocketbase
- Run PocketBase
./pocketbase serve --http=0.0.0.0:8090
Now try accessing it in your browser: http://YOUR_SERVER_IP:8090/
Fix Oracle Cloud Firewall Issue
- Oracle Cloud blocks ports by default. To allow traffic on port 8090:
- Go to Oracle Cloud Console
- Navigate to Networking → Virtual Cloud Networks (VCNs)
- Select your VCN → Subnets
- Find the subnet your instance uses
- Open the Security List
- Under Ingress Rules, click “Add Ingress Rule”:
- Source CIDR:
0.0.0.0/0
- IP Protocol:
TCP
- Destination Port Range:
8090
- Source CIDR:
- Update VPS firewall (iptables)
- Edit firewall rules on your VPS:
sudo nano /etc/iptables/rules.v4
- Add this line:
-A INPUT -p tcp -m state --state NEW -m tcp --dport 8090 -j ACCEPT
- Save and reload:
sudo iptables-restore < /etc/iptables/rules.v4
- Edit firewall rules on your VPS:
Run PocketBase in Background with PM2
- Install Node.js and PM2 (using NVM):
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash source ~/.bashrc nvm install --lts npm install -g pm2
- Start PocketBase with PM2:
pm2 start ./pocketbase/pocketbase --name pocketbase -- serve --http=0.0.0.0:8090
- Check logs and copy the initial admin URL to create the super user:
pm2 logs pocketbase
Enable HTTPS with a Domain (Fix Render/Next.js Issue)
When connecting your PocketBase API to a Next.js app on Render, you’ll want HTTPS. Let’s set up Nginx and a free TLS certificate.
Point your domain: In your domain registrar, create an A record pointing
api.simolog.com
to your Oracle VPS public IP.Install Nginx as a reverse proxy
sudo apt install nginx -y
Create a config file:
sudo nano /etc/nginx/sites-available/pocketbase
Add this configuration:
server { server_name api.simolog.com; location / { proxy_pass http://127.0.0.1:8090; proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header X-Forwarded-Proto $scheme; } }
Enable the site:
sudo ln -s /etc/nginx/sites-available/pocketbase /etc/nginx/sites-enabled/ sudo nginx -t sudo systemctl restart nginx
Add free SSL with Certbot:
sudo apt install certbot python3-certbot-nginx -y # issue certificate sudo certbot --nginx -d api.simolog.com
Now PocketBase will be available on: https://api.simolog.com
If DNS is still propagating, use a lookup tool like dnschecker.org to verify your A record.