What is Remote Desktop? #
Remote Desktop technology allows users to connect, control, and manage computers or virtual machines over a network. It’s widely used in IT support, DevOps, and enterprise environments for convenience, monitoring, and troubleshooting.
Common Remote Desktop Services #
-
Native OS Support (best performance, but limited to local networks):
- Windows – RDP (available only for Pro/Paid versions).
- Linux – xrdp.
- macOS – No full native support (only screen sharing or third-party apps).
-
Browser-Based Remote Desktop (lightweight, ideal for terminals):
- Apache Guacamole
- Kasm Workspace
-
Software-Enabled Remote Desktops (near-native performance):
- VNC – Powerful but requires configuration overhead.
- TeamViewer – Paid, uses vendor relay servers.
- AnyDesk – Free for personal use; subscription required for custom servers.
-
RustDesk – The Open-Source Alternative
- Written in Rust + Flutter.
- Works on Windows, Linux, macOS, Android, iOS, and Web.
- Offers self-hosting: deploy your own relay + signaling servers for data privacy and full control.
How to Self-Host RustDesk (Relay Server on AWS) #
Below is a step-by-step guide to setting up RustDesk self-hosted relay using Docker on an AWS EC2 instance.
Step 1: Install RustDesk Clients #
- Download: RustDesk Official Site
- Windows: Install as the user account you plan to remote into.
- Linux (Kali Example):
sudo apt-get update && apt-get upgrade -y sudo apt install -y pkg-config libssl-dev openssl libxcb-shape0-dev libxcb-xfixes0-dev wget https://github.com/rustdesk/rustdesk/releases/download/1.3.7/rustdesk-1.3.7-x86_64.deb sudo dpkg -i rustdesk-1.3.7-x86_64.deb
Step 2: Set Up Relay + Signaling Server #
-
Option A – VPN Based (most secure)
- Only authorized users with VPN access can reach the relay server.
-
Option B – Cloud Based (AWS EC2 Example)
-
Launch EC2 Instance:
-
OS: Ubuntu
-
Size: 1 CPU / 1 GB RAM / 10 GB storage
-
-
Open required ports:
-
21116 (TCP/UDP)
-
21117 (TCP)
-
-
Optional: 21118, 21119 for web access.
-
Install Docker + Compose:
sudo apt-get update && apt-get upgrade -y
sudo apt-get install ca-certificates curl -y
sudo install -m 0755 -d /etc/apt/keyrings
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo tee /etc/apt/keyrings/docker.asc > /dev/null
echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io docker-compose-plugin -y
- Docker Compose Setup:
mkdir rustdesk && cd rustdesk
nano docker-compose.yml
services:
hbbs:
container_name: hbbs
image: rustdesk/rustdesk-server:latest
command: hbbs
volumes:
- ./data:/root
network_mode: "host"
depends_on:
- hbbr
restart: unless-stopped
hbbr:
container_name: hbbr
image: rustdesk/rustdesk-server:latest
command: hbbr
volumes:
- ./data:/root
network_mode: "host"
restart: unless-stopped
sudo docker compose up -d
-
Copy Keys + Configure Clients:
-
Retrieve public key (id_xxxx.pub) from /data directory.
-
Enter EC2 public IP + public key into RustDesk client under Network Settings.
-
Set a permanent password for persistent access.
Why RustDesk? #
- Free & Open-Source (no vendor lock-in)
- Cross-Platform (Windows, Linux, macOS, Android, iOS, Web)
- Self-Hosted for Privacy (control your own relay servers)
- Simple Docker Deployment (works on AWS, Azure, GCP, bare-metal, etc.)
RustDesk is ideal for DevOps engineers, IT support teams, and privacy-focused users who want secure and reliable remote desktop access without depending on paid SaaS vendors.
Final Thoughts #
- If you’re tired of TeamViewer’s licensing limits or AnyDesk’s restrictions, RustDesk is your self-hosted alternative.
- Deploy it on AWS EC2 with Docker in minutes and gain secure, private, and cross-platform remote desktop access.