cjscrofani.com
8 min read

Self-Hosted RustDesk Server on Oracle Cloud Free Tier

Self-HostedCloudRemote Access

Deploy a privacy-focused, self-hosted alternative to TeamViewer on Oracle Cloud's free tier with Docker and SSL.

A complete guide for setting up your own RustDesk remote desktop server on Oracle Cloud Infrastructure Free Tier. Deploy a privacy-focused, open-source alternative to TeamViewer with Docker and Nginx as a reverse proxy with SSL.

What is RustDesk?

RustDesk is an open-source remote desktop software that provides a secure, self-hosted alternative to proprietary solutions like TeamViewer and AnyDesk. Written in Rust, it offers excellent performance, cross-platform support, and complete control over your remote access infrastructure.

Privacy First

Host your own server for complete data privacy and control over remote connections

Cross-Platform

Works on Windows, macOS, Linux, Android, and iOS with native applications

End-to-End Encryption

All remote sessions are encrypted with industry-standard protocols

Free Hosting

Oracle Cloud Free Tier provides enough resources to run your server at no cost

Oracle Cloud Free Tier

Compute

2 AMD-based VMs (1 GB RAM each) or 4 Arm-based VMs (24 GB RAM total)

Storage

200 GB total Block Volume storage

Network

10 TB outbound data transfer per month

Prerequisites

  • Oracle Cloud Account: Sign up for free tier access
  • Domain Name: For SSL certificate (optional but recommended)
  • Basic Linux Knowledge: For server configuration

Installation Guide

Step 1: Create Oracle Cloud VM
  1. Log in to Oracle Cloud Console
  2. Create a new Compute Instance
  3. Choose Ubuntu 22.04 LTS as the OS image
  4. Select the Always Free eligible shape (VM.Standard.E2.1.Micro)
  5. Download your SSH key pair
  6. Launch the instance
Step 2: Configure Firewall Rules

Open required ports in Oracle Cloud VCN Security Lists:

TCP 21115-21119RustDesk services
TCP 443HTTPS/SSL
TCP 22SSH
Step 3: Install Docker
# Update system packages
sudo apt update && sudo apt upgrade -y
# Install Docker
curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
# Add user to docker group
sudo usermod -aG docker $USER
Step 4: Deploy RustDesk Server

Create docker-compose.yml:

version: '3' services: hbbs: container_name: hbbs image: rustdesk/rustdesk-server:latest command: hbbs -r <your-domain>:21117 volumes: - ./data:/root network_mode: "host" restart: unless-stopped hbbr: container_name: hbbr image: rustdesk/rustdesk-server:latest command: hbbr volumes: - ./data:/root network_mode: "host" restart: unless-stopped

Run: docker-compose up -d

Step 5: Configure Nginx Reverse Proxy

Install and configure Nginx with SSL:

  1. Install Nginx and Certbot
  2. Configure reverse proxy for RustDesk ports
  3. Obtain SSL certificate with Let's Encrypt
  4. Configure automatic certificate renewal
Step 6: Configure RustDesk Clients
  1. Download RustDesk client for your platform
  2. Open Settings → Network
  3. Set ID Server to your domain or IP
  4. Set Relay Server to your domain or IP
  5. Enter the server's public key (found in data/id_ed25519.pub)

Testing Your Server

  1. Install RustDesk on two devices
  2. Configure both clients with your server details
  3. Note the unique RustDesk ID on the first device
  4. Use the second device to connect by entering the first device's ID
  5. Verify remote connection establishes successfully

Benefits of Self-Hosting

Complete Privacy

Your remote desktop sessions never touch third-party servers

No Usage Limits

Unlimited connections and session time with your own infrastructure

Cost Effective

Free hosting on Oracle Cloud Free Tier forever

Customizable

Full control over configuration, security policies, and access control

Additional Resources