Hardened Remote Access & Security Runbook

Code Version: 0.8.0 | Wiki Version: 0.8.0

1. Remote Access Architectural Overview

Trading operations require reliable, hardened remote access from both desktop workstations and mobile smartphones without exposing the Oracle Cloud ARM VM to public port scans, credential stuffing, or distributed denial of service (DDoS) attacks. Two turnkey remote access options are supported:

Feature / Parameter Option A: Cloudflare Zero Trust (Recommended) Option B: Turnkey Caddy Proxy
Open Inbound Ports 0 Open Ports (Outbound-only TLS tunnel) Ports 80 & 443 open to Internet
Firewall Exposure 100% invisible to external port scanners Target of automated vulnerability scanners
Authentication Wall Google SSO / GitHub / Email OTP at Edge HTTP Basic Auth (bcrypt hashed)
SSL/TLS Certificates Free automatic Cloudflare Edge SSL Free automatic Let's Encrypt certificates
Pricing Tier 100% Free (Up to 50 users included) 100% Free (Open source Caddy)

2. Turnkey Setup: Cloudflare Zero Trust Tunnel (Option A)

Cloudflare Zero Trust tunnels connect your local dashboard service to Cloudflare's global edge network via an encrypted outbound connection, requiring zero open firewall ports on your VM.

Step 1: Create a Cloudflare Tunnel

  1. Sign in to the Cloudflare Zero Trust Dashboard.
  2. Navigate to Networks → Tunnels and click Create a Tunnel.
  3. Select Cloudflared, name it (e.g. drt-dashboard), and save.
  4. Copy the generated Tunnel Token.

Step 2: Launch the Cloudflared Container

Provide the token and launch the tunnel container using the included configuration:

# Set your tunnel token
export CLOUDFLARE_TUNNEL_TOKEN="eyJhIjoi..."

# Launch the tunnel service
docker compose -f deploy/cloudflared/docker-compose.tunnel.yml up -d

Step 3: Route Public Hostname to Dashboard

In the Cloudflare Tunnel configuration tab:

Optionally configure Cloudflare Access application rules to require Google SSO or email one-time PIN (OTP) verification before accessing the URL.

3. Turnkey Setup: Caddy HTTPS Reverse Proxy (Option B)

If you prefer a direct reverse proxy with automated Let's Encrypt / ZeroSSL SSL certificates, use Caddy with the configuration in deploy/caddy/Caddyfile.

Step 1: Install Caddy

sudo apt update && sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https curl
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-stable-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/stable/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-stable.list
sudo apt update && sudo apt install -y caddy

Step 2: Configure Caddyfile (/etc/caddy/Caddyfile)

Edit /etc/caddy/Caddyfile and point to your custom domain:

{
    email admin@yourdomain.com
    servers {
        protocols h1 h2
    }
}

trade.yourdomain.com {
    reverse_proxy 127.0.0.1:8050
}

Step 3: Open Firewall Ports (80, 443)

sudo ufw allow 80/tcp && sudo ufw allow 443/tcp && sudo ufw --force enable
sudo iptables -I INPUT 1 -p tcp --dport 80 -j ACCEPT
sudo iptables -I INPUT 1 -p tcp --dport 443 -j ACCEPT
sudo netfilter-persistent save 2>/dev/null || true
sudo systemctl restart caddy

4. Mobile PWA Installation ("Add to Home Screen")

The dashboard is fully configured as a Progressive Web App (PWA) via manifest.json and sw.js: