RustDesk
RustDesk allows to share your desktop remotely with someone else, like AnyDesk, TeamViewer, etc. However it is self-hosted (can be installed on your own server).
note
The free plan does not have the web console and some advanced features, but it still allows sharing the desktop.
We will install it inside a container called utils
.
1. Create a container
We can create a new container with the script create-container.sh
that we have seen before:
#wget https://linux-cli.fs.al/apps/part6/create-container.sh
#chmod +x create-container.sh
./create-container.sh utils 10.31.96.205
incus ls
2. Forward the ports
hostname -I
HOST_IP=65.109.96.100
incus network forward list incusbr0
incus network forward show incusbr0 $HOST_IP
CONTAINER_IP=10.31.96.205
incus network forward port add \
incusbr0 $HOST_IP \
tcp 21115-21118 \
$CONTAINER_IP
incus network forward port add \
incusbr0 $HOST_IP \
udp 21116 \
$CONTAINER_IP
incus network forward show incusbr0 $HOST_IP
3. Install RustDesk
incus shell utils
mkdir -p /root/rustdesk/
cd /root/rustdesk/
cat <<EOF > compose.yml
services:
hbbs:
container_name: hbbs
image: rustdesk/rustdesk-server:latest
command: hbbs
volumes:
- ./data:/root
ports:
- "21115:21115"
- "21116:21116"
- "21116:21116/udp"
- "21118:21118"
depends_on:
- hbbr
restart: unless-stopped
hbbr:
container_name: hbbr
image: rustdesk/rustdesk-server:latest
command: hbbr
volumes:
- ./data:/root
ports:
- "21117:21117"
- "21119:21119"
restart: unless-stopped
EOF
cat compose.yml
docker compose up -d
ls
ls data/
nano data/id_ed25519.pub
This is the key that should be used by the clients to connect to this server (see the next section).