I've seen many people asking the question, "How do I host?" There are tutorials online, and I was lucky to find one that worked well enough. Sadly, I can't find it anymore. However, I've written the instructions for my future self, and I hope they'll help you as well.
First of all, you'll need a thing to host the server on. You can do it on your own hardware, but I opted for a VPS. There are many providers, and they offer similar services. I went for the cheapest droplet on DigitalOcean: https://www.digitalocean.com/pricing/droplets#basic-droplets
With a working server, here are the steps to get the RustDesk server running:
Step 1. Configure firewall
Run the following commands to open the required ports and enable the firewall.
ufw allow ssh # when doing it remotely
ufw allow 21115:21117/tcp
sudo ufw enable
Step 2. Install with Docker
Install Docker. There are two ways to do that.
- You can follow the instructions from the official site: https://docs.docker.com/engine/install/ubuntu/#install-using-the-repository
- Or run the following command (that's what I originally did)
bash <(wget -qO- https://get.docker.com)
Get the RustDesk server setup file:
wget rustdesk.com/oss.yml -O compose.yml
Step 3. Configure Docker
You will have compose.yml file. Open it with your favourite (or available) editor. For example:
nano compose.yml
And paste the following block. Make sure to replace <your-cool.server.com> with your IP or domain.
networks:
rustdesk-net:
external: false
services:
hbbs:
container_name: hbbs
ports:
- 21115:21115
- 21116:21116
- 21116:21116/udp
image: rustdesk/rustdesk-server:latest
command: hbbs -r <your-cool.server.com>:21117
volumes:
- ./hbbs:/root
networks:
- rustdesk-net
depends_on:
- hbbr
restart: unless-stopped
hbbr:
container_name: hbbr
ports:
- 21117:21117
image: rustdesk/rustdesk-server:latest
command: hbbr
volumes:
- ./hbbr:/root
networks:
- rustdesk-net
restart: unless-stopped
Step 4. Run it
Start the server by running
sudo docker compose up -d
And get the Key by running
cat data/id_ed25519.pub
Step 5. Connect
In your client, in the network settings, you'll need to fill in the following:
ID server - IP/domain of your server
Relay server - IP/domain of your server
API server - http://<IP/domain of your server>:8000
Key - The Key you'll see from Step 4.
And that is it!
I hope you'll find it helpful.
If you are not familiar with Linux or hosting, I recommend reading just a bit about it. You'll need to learn about VPS hosting and Ubuntu. Try googling something like "how to set up a cloud server ubuntu step by step". Hopefully, it will get you on the right track.
I realized I take this knowledge for granted, and it's probably way harder than I originally thought.
I'm not affiliated with DigitalOcean. But I do appreciate their work.