Post

How to install Rustdesk

How to install Rustdesk

Introduction

1) Open up the right ports. 2) Write the rustdesk systemd unit file. 3) Write a volume file. 4) Copy the rustdesk client encryption key.

Open up the required firewall ports.

1
sudo firewall-cmd --add-port=21114/tcp --add-port=21115/tcp --add-port=21116/tcp --add-port=21116/udp --add-port=21118/tcp --add-port=21117/tcp --add-port=21119/tcp --permanent

Then run the following to load the changes.

1
sudo firewall-cmd --reload

Write the rustdesk systemd unit file.

In ~/.config/containers/systemd/rustdesk.container, write the following configuration.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
[Container]
AutoUpdate=registry
Image=ghcr.io/rustdesk/rustdesk-server:latest
Label="io.containers.autoupdate=registry"
Exec=hbbs
Volume=rustdesk.volume:/root:Z
Network=host
PublishPort=21114:21114/tcp
PublishPort=21115:21115/tcp
PublishPort=21116:21116/tcp
PublishPort=21116:21116/udp
PublishPort=21118:21118/tcp
PublishPort=21117:21117/tcp
PublishPort=21119:21119/tcp

[Service]
Restart=always

[Install]
WantedBy=default.target

Write the volume file.

In ~/.config/containers/systemd/, create the file rustdesk.volume.

In the file, write the following configuration.

1
2
3
[Volume]
User=myee
Group=myee

Copy the rustdesk client encryption key.

After starting the rustdesk service systemctl --user start rustdesk.service you need to copy the encryption key. Starting the rustdesk service will write a bunch of files in ` .local/share/containers/storage/volumes/systemd-rustdesk/_data/`.

In ` .local/share/containers/storage/volumes/systemd-rustdesk/_data/, copy the key in id_ed25519.pub`

1
2
3
4
5
6
7
8
9
myee@protectli1 ~> ls -lart .local/share/containers/storage/volumes/systemd-rustdesk/_data/
total 108
drwx------. 3 myee myee    19 Dec 17 11:57 ../
-rw-r--r--. 1 myee myee    44 Dec 17 12:25 id_ed25519.pub
-rw-r--r--. 1 myee myee    88 Dec 17 12:25 id_ed25519
-rw-r--r--. 1 myee myee  4096 Dec 17 12:25 db_v2.sqlite3
drwxr-xr-x. 2 myee myee   117 Dec 17 12:25 ./
-rw-r--r--. 1 myee myee 32768 Dec 17 12:25 db_v2.sqlite3-shm
-rw-r--r--. 1 myee myee 61832 Dec 17 12:25 db_v2.sqlite3-wal
This post is licensed under CC BY 4.0 by the author.