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.

  1. Install/Update required tools
sudo apt update && sudo apt install wget unzip -y
  1. Download PocketBase
wget https://github.com/pocketbase/pocketbase/releases/download/v0.29.3/pocketbase_0.29.3_linux_amd64.zip
  1. Unzip and move into the folder
unzip pocketbase_0.29.3_linux_amd64.zip -d pocketbase
cd pocketbase
  1. Run PocketBase
./pocketbase serve --http=0.0.0.0:8090

Now try accessing it in your browser: http://YOUR_SERVER_IP:8090/

Error encountered when accessing PocketBase before fixing firewall

Fix Oracle Cloud Firewall Issue

  1. Oracle Cloud blocks ports by default. To allow traffic on port 8090:
    1. Go to Oracle Cloud Console
    2. Navigate to Networking → Virtual Cloud Networks (VCNs)
    3. Select your VCN → Subnets
    4. Find the subnet your instance uses
    5. Open the Security List
    6. Under Ingress Rules, click “Add Ingress Rule”:
      • Source CIDR: 0.0.0.0/0
      • IP Protocol: TCP
      • Destination Port Range: 8090

ingress-rule

  1. 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
      

Run PocketBase in Background with PM2

  1. 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
    
  2. Start PocketBase with PM2:
    pm2 start ./pocketbase/pocketbase --name pocketbase -- serve --http=0.0.0.0:8090
    
  3. 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.

  1. Point your domain: In your domain registrar, create an A record pointing api.simolog.com to your Oracle VPS public IP.

  2. Install Nginx as a reverse proxy

    sudo apt install nginx -y
    
  3. Create a config file:

    sudo nano /etc/nginx/sites-available/pocketbase
    
  4. 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;
        }
    }
    
  5. Enable the site:

    sudo ln -s /etc/nginx/sites-available/pocketbase /etc/nginx/sites-enabled/
    sudo nginx -t
    sudo systemctl restart nginx
    
  6. 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.