Rustdesk
RustDesk is a fantastic tool for remote desktop management, providing a seamless experience for both users and administrators. Setting up your own RustDesk server can give you better control, privacy, and performance. Here’s a step-by-step guide to get your RustDesk server up and running using Docker.
Prerequisites
Before we start, ensure you have Docker installed on your system. If not, follow these steps to install Docker.
Installing Docker
Download the Docker installation script:
You can download the Docker installation script from the following link: Docker Installation Script
Make the script executable:
Open your terminal and run the following command to make the script executable:
chmod +x ./docker-install.sh
Run the Docker installation script:
Execute the script to install Docker:
./docker-install.sh
Verify Docker installation:
After the installation is complete, verify that Docker is installed by checking the version:
docker version
Setting Up RustDesk Server with Docker-Compose
Create a directory for your Docker setup:
mkdir rustdesk-docker cd rustdesk-docker
Create and edit the
docker-compose.yml
file:Inside the
rustdesk-docker
directory, create a file nameddocker-compose.yml
and paste the following configuration:version: '3.3' networks: rustdesk-net: external: false services: hbbs: container_name: hbbs ports: - 21115:21115 - 21116:21116 - 21116:21116/udp - 21118:21118 image: rustdesk/rustdesk-server:latest command: hbbs -r rustdesk.example.com:21117 volumes: - ./data:/root networks: - rustdesk-net depends_on: - hbbr restart: unless-stopped hbbr: container_name: hbbr ports: - 21117:21117 - 21119:21119 image: rustdesk/rustdesk-server:latest command: hbbr volumes: - ./data:/root networks: - rustdesk-net restart: unless-stopped
You can adjust the ports and hostname as per your requirements. For now, we'll use the default settings.
Start the RustDesk server:
Run the following command to start the RustDesk server in detached mode:
sudo docker-compose up -d
Verify the containers are running:
Check if the RustDesk server containers are running:
sudo docker-compose ps
Check the logs:
To ensure everything is running smoothly, check the logs:
sudo docker-compose logs -f
Configuring DNS
Since we are running the server locally, we need to add a new DNS record on the client-side to resolve the hostname to our server's IP address.
Edit the hosts file:
On Windows:
C:\Windows\System32\drivers\etc\hosts
On Linux:
/etc/hosts
Add the following line:
rustdesk.example.com 192.168.8.10
Replace 192.168.8.10
with your server's static IP address.
Client Configuration
On the client-side, configure the network settings in RustDesk:
ID Server: Enter the address or IP of your RustDesk server.
Key: Use the key generated during the setup (check the Docker logs for the key).
You should now have a fast and secure RustDesk server running on your own infrastructure. Enjoy the enhanced performance and control!
Happy remoting!