OpenClaw on Oracle Free Tier: Secure Setup Guide

Gave up on Oracle; the system is a nightmare to comprehend (non-standard silliness) and the free tier 4-core is never available anyway.

Below Is Redundant

This guide outlines a secure, privacy-focused method for hosting the OpenClaw AI Assistant on Oracle Cloud’s “Always Free” tier, avoiding the security risks of third-party messaging platforms like Telegram.

1. Why Oracle Free Tier?

Oracle’s Ampere A1 Compute (ARM-based) is the best free deal in the cloud:

  • CPU: 4 OCPUs (ARM)
  • RAM: 24 GB RAM
  • Cost: $0 (Always Free)
  • Capacity: Easily handles OpenClaw and several background AI tasks.

2. The “Ultra-Secure” Architecture

Instead of using Telegram or a public web server (Nginx), we use an SSH Tunnel.

Benefits:

  • Hidden from Internet: No web ports (80/443/18789) are opened in the Oracle Cloud firewall.
  • No Third Parties: Your chat data never touches Telegram or Discord servers.
  • Zero-Config SSL: Since you access via localhost, the browser provides a secure context automatically.

3. Preparation Checklist

  1. Oracle Account: Sign up at oracle.com/cloud/free/.
  2. SSH Key: Ensure you have an SSH public key (~/.ssh/id_rsa.pub) ready.
  3. Local Tools: Install a terminal (Windows: PowerShell/WSL, Mac/Linux: Terminal).

4. Step-by-Step Installation

Phase 1: Create the Instance

  • Image: Ubuntu 22.04 or 24.04 (Standard for Node.js compatibility).
  • Shape: VM.Standard.A1.Flex (Assign 2-4 OCPUs and 12-24 GB RAM).
  • Networking: Use the default VCN. Do NOT add any Ingress Rules for port 18789. Only port 22 (SSH) should be open.

Phase 2: System Setup

Connect to your server:

ssh -i your_key ubuntu@your_oracle_ip

Update and install dependencies:

sudo apt update && sudo apt upgrade -y# Install Node.js 22 (Required by OpenClaw)curl -fsSL https://deb.nodesource.com/setup_22.x | sudo -E bash -sudo apt install -y nodejs build-essential

Phase 3: Install OpenClaw

Run the official one-line installer:

curl -L https://openclaw.ai/install.sh | bash

Follow the wizard. When asked about platforms, you can skip Telegram/Discord and focus on the Control UI.


5. Security Configuration

Set a Gateway Password

OpenClaw uses a token by default. You can set a strong password in your environment:

# Add this to your ~/.bashrc or a .env fileexport OPENCLAW_GATEWAY_PASSWORD="your-super-strong-password"

PM2 (Keep it Running 24/7)

sudo npm install -g pm2pm2 start "npx openclaw" --name openclawpm2 savepm2 startup

6. Accessing the Chat (The SSH Tunnel)

This is the “magic” step. Run this on your local computer (not the server):

ssh -i your_key -L 18789:localhost:18789 ubuntu@your_oracle_ip

How to Chat:

  1. Keep that terminal window open.
  2. Open your browser to: http://localhost:18789
  3. Enter your Gateway Password/Token.
  4. You are now chatting with your private AI via your Oracle server!

7. Security Reminders

  •  Firewalls: Ensure ufw or iptables on the server also blocks 18789 from the outside.
  •  Updates: Run openclaw update regularly.
  •  SSH Keys: Use a passphrase for your SSH key for an extra layer of protection.