DebianDebian Based

How To Install RustDesk on Debian 12

Install RustDesk on Debian 12

RustDesk stands out in the crowded field of remote desktop applications for several reasons. As an open-source solution, it offers transparency and customizability that proprietary software often lacks. Its cross-platform support means you can connect to your Debian 12 system from various devices, including Windows, macOS, and mobile platforms. Moreover, RustDesk’s focus on security makes it an attractive option for those concerned about privacy and data protection.

By choosing RustDesk for your remote desktop needs on Debian 12, you’re opting for a flexible, secure, and community-driven solution. Whether you’re managing servers, providing remote support, or simply accessing your home computer from afar, RustDesk offers a comprehensive set of tools to meet your needs.

Prerequisites

Before diving into the installation process, it’s crucial to ensure your Debian 12 system meets the necessary requirements and is properly configured. Here’s what you’ll need:

  • A Debian 12 (Bookworm) system with at least 2GB of RAM and 20GB of free disk space
  • An active internet connection
  • Sudo privileges on your Debian system
  • Docker and Docker Compose installed (we’ll cover this in the next section)
  • Open ports: 21115-21119 (TCP/UDP)

To ensure smooth operation, you’ll need to configure your firewall to allow traffic on the required ports. If you’re using UFW (Uncomplicated Firewall), you can open these ports with the following commands:

sudo ufw allow 21115:21119/tcp
sudo ufw allow 21115:21119/udp
sudo ufw reload

If you haven’t already installed Docker and Docker Compose, you can do so with these commands:

# Install Docker
sudo apt update
sudo apt install docker.io

# Install Docker Compose
sudo apt install docker-compose

# Add your user to the docker group (log out and back in after this)
sudo usermod -aG docker $USER

Server-Side Installation

The RustDesk server consists of two main components: hbbs (RustDesk ID/Rendezvous server) and hbbr (RustDesk relay server). We’ll use Docker to set up these components, ensuring a clean and easily manageable installation.

Creating the Directory Structure

First, let’s create a directory to store our RustDesk server configuration:

mkdir -p ~/rustdesk-server/data
cd ~/rustdesk-server

Configuring the Docker Environment

Create a docker-compose.yml file in the rustdesk-server directory with the following content:

version: '3'

services:
  hbbs:
    container_name: hbbs
    image: rustdesk/rustdesk-server:latest
    command: hbbs -r rustdesk.example.com:21117
    ports:
      - 21115:21115
      - 21116:21116
      - 21118:21118
    volumes:
      - ./data:/root
    restart: unless-stopped

  hbbr:
    container_name: hbbr
    image: rustdesk/rustdesk-server:latest
    command: hbbr
    ports:
      - 21117:21117
      - 21119:21119
    volumes:
      - ./data:/root
    restart: unless-stopped

Replace rustdesk.example.com with your server’s public IP address or domain name.

Installing RustDesk Server Components

With the Docker Compose configuration in place, you can now start the RustDesk server components:

docker-compose up -d

This command will pull the necessary Docker images and start the hbbs and hbbr services in detached mode.

Firewall Configuration and Port Forwarding

If your Debian 12 system is behind a router, you’ll need to set up port forwarding for the following ports:

  • 21115-21119 (TCP)
  • 21115-21119 (UDP)

Consult your router’s documentation for specific instructions on port forwarding.

Client Installation Process

With the server components up and running, let’s move on to installing the RustDesk client on your Debian 12 system.

Downloading the RustDesk Client Package

Visit the official RustDesk GitHub releases page to download the latest Debian package:

wget https://github.com/rustdesk/rustdesk/releases/download/1.3.3/rustdesk-1.3.3-x86_64.deb

Replace 1.3.3 with the latest version number available at the time of installation.

Installation Methods

You have two options for installing the RustDesk client:

APT Package Manager Installation

If you prefer using the APT package manager, follow these steps:


sudo apt update
sudo apt install ./rustdesk-1.3.3-x86_64.deb

Manual DEB Package Installation

Alternatively, you can use the dpkg command for manual installation:


sudo dpkg -i rustdesk-1.3.3-x86_64.deb
sudo apt-get install -f  # Install any missing dependencies

Post-installation Configuration

After installation, you can launch RustDesk from the application menu or by running rustdesk in the terminal. On first launch, you’ll need to configure the client to connect to your self-hosted server.

Install RustDesk on Debian 12

Configuration and Setup

Proper configuration is crucial for ensuring a secure and efficient remote desktop experience with RustDesk on Debian 12.

Network Settings Configuration

Open RustDesk and navigate to the settings menu. Under the “Network” tab, you’ll find options to configure your connection preferences:

  • Set the “ID/Relay Server” to your server’s IP address or domain name
  • Ensure the correct ports are specified (21115-21119)
  • Choose between UDP and TCP protocols based on your network requirements

Server Connection Setup

To connect your RustDesk client to your self-hosted server:

  1. Open RustDesk settings
  2. Navigate to the “ID/Relay Server” section
  3. Enter your server’s IP address or domain name
  4. Click “Apply” to save the changes

Security Configurations

RustDesk offers several security features to protect your remote connections:

  • Enable two-factor authentication for an extra layer of security
  • Set up a strong password for accessing your Debian 12 system remotely
  • Configure IP whitelisting to restrict access to trusted networks

Authentication Setup

To secure your RustDesk connections:

  1. Go to RustDesk settings
  2. Navigate to the “Security” tab
  3. Set a strong password for remote access
  4. Enable additional security features as needed

Advanced Configuration

For power users and administrators, RustDesk offers advanced configuration options to fine-tune your remote desktop experience on Debian 12.

Custom ID Configuration

You can set a custom ID for your Debian 12 system to make it easier to remember and connect:

rustdesk --set-id your-custom-id

Password Protection Setup

To set or change the password for unattended access:

rustdesk --set-password your-secure-password

Command-line Parameters

RustDesk supports various command-line parameters for advanced users:

  • --password: Set a new password
  • --config-file: Specify a custom configuration file
  • --log-level: Set the logging verbosity

Performance Optimization

To optimize RustDesk performance on Debian 12:

  • Adjust video quality settings based on your network speed
  • Enable hardware acceleration if supported by your GPU
  • Configure custom keyboard shortcuts for efficient navigation

Troubleshooting Guide

Even with careful installation and configuration, you may encounter issues. Here are some common problems and their solutions:

Connection Issues

If you’re having trouble connecting to your Debian 12 system:

  • Verify that the RustDesk server components (hbbs and hbbr) are running
  • Check your firewall settings to ensure the required ports are open
  • Confirm that your router’s port forwarding is correctly configured

Performance Problems

For slow or laggy connections:

  • Lower the video quality in the RustDesk settings
  • Ensure you have sufficient bandwidth on both the client and server sides
  • Try switching between UDP and TCP protocols to see which performs better

Audio Issues

If you’re experiencing audio problems:

  • Check that the correct audio device is selected in RustDesk settings
  • Verify that PulseAudio is running on your Debian 12 system
  • Restart the RustDesk client and server if audio suddenly stops working

Security Best Practices

Maintaining a secure remote desktop environment is crucial. Follow these best practices to enhance the security of your RustDesk setup on Debian 12:

Encryption Configuration

RustDesk uses end-to-end encryption by default, but you can further strengthen your security by:

  • Using a strong, unique password for each remote connection
  • Enabling two-factor authentication when available
  • Regularly updating your encryption keys

Access Control Setup

Implement strict access controls to prevent unauthorized access:

  • Use IP whitelisting to restrict connections to trusted networks
  • Implement user-based access controls if managing multiple users
  • Regularly audit access logs to detect any suspicious activity

Network Security Considerations

Enhance your network security to protect your RustDesk connections:

  • Use a VPN for an additional layer of encryption
  • Implement intrusion detection and prevention systems
  • Regularly update your Debian 12 system and RustDesk to patch security vulnerabilities

Congratulations! You have successfully installed RustDesk. Thanks for using this tutorial for installing the RustDesk on your Debian 12 “Bookworm” system. For additional help or useful information, we recommend you check the official RustDesk website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button