{"id":3876,"date":"2026-11-25T06:00:00","date_gmt":"2026-11-25T06:00:00","guid":{"rendered":"https:\/\/vpslake.com\/blog\/?p=3876"},"modified":"2026-11-25T06:00:00","modified_gmt":"2026-11-25T06:00:00","slug":"self-hosted-rustdesk-server-vps","status":"publish","type":"post","link":"https:\/\/vpslake.com\/blog\/2026\/11\/25\/self-hosted-rustdesk-server-vps\/","title":{"rendered":"Self-Hosted RustDesk Server on a VPS: Ports, Size and Cost"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">A rustdesk server self hosted on a VPS gives you your own ID and relay infrastructure for remote access instead of depending only on RustDesk&#8217;s public servers. A small Linux VPS is enough for a personal setup or a small team, provided it has a public IPv4 address, the right ports, and persistent storage for its keys.<\/p>\n\n\n\n<aside class=\"ap-card\" aria-label=\"Buffalo Linux VPS 1 GB (Basic KVM 1)\">\n<span class=\"ap-card__badge\">Best value<\/span>\n<div class=\"ap-card__body\"><p class=\"ap-card__name\">Buffalo Linux VPS 1 GB (Basic KVM 1)<\/p><p class=\"ap-card__best\">Best for tiny bots, VPN, test boxes, first VPS<\/p><ul class=\"ap-card__features\"><li>1 vCPU Intel Xeon E5-2699 v4, 1 GB reserved RAM<\/li><li>20 GB SSD (RAID 1), 1 TB traffic on a 100 Mbps port<\/li><li>1 dedicated IPv4, full root, KVM<\/li><li>Debian 12, Ubuntu 24.04, AlmaLinux 9 or Rocky Linux 9<\/li><li>Buffalo, New York (US East Coast, near Toronto\/NYC)<\/li><li>Pay by crypto, UPI or card<\/li><\/ul><\/div>\n<div class=\"ap-card__side\"><p class=\"ap-card__price\">$3.99\/mo <small>USD monthly<\/small><\/p><a class=\"ap-card__btn\" href=\"https:\/\/my.vpslake.com\/index.php?rp=\/store\/buffalo-new-york-basic-kvm-linux-vps\/basic-kvm-1-linux-vps\">Order now \u2192<\/a><\/div>\n<\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Why run your own RustDesk server<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk Server OSS is the open-source backend for RustDesk. Self-hosting lets you keep the rendezvous service and any relay traffic on infrastructure you control, which is useful when you manage several computers, want a consistent server address, or need a predictable place for your clients to connect.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The server does not replace the RustDesk client installed on each computer. Instead, it helps those clients find one another and provides a relay path when a direct peer-to-peer connection cannot be made. You still control user access, operating-system updates, firewall rules, backups, and the server key.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk also offers a Pro edition with features such as a web console, API, OIDC, LDAP, 2FA, device management, access control, and multiple relays. For a straightforward ID-and-relay setup, the OSS server is the relevant starting point.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What hbbs and hbbr do<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk Server OSS consists mainly of two services. They work together, but they have different jobs:<\/p>\n\n\n\n<figure class=\"wp-block-table ap-table\"><table><thead><tr><th>Service<\/th><th>Role<\/th><th>When it carries traffic<\/th><\/tr><\/thead><tbody><tr><td>hbbs<\/td><td>ID, rendezvous, signalling, and NAT-traversal coordination<\/td><td>When clients register and try to establish a direct session<\/td><\/tr><tr><td>hbbr<\/td><td>Relay server<\/td><td>When the clients cannot connect directly and the session must be relayed<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">Most successful connections can use a direct path between the two endpoint computers. If that path fails, hbbr carries the screen, keyboard, mouse, and other session traffic. That distinction matters for VPS sizing: CPU and RAM needs are modest, but relay bandwidth grows with the number of concurrent sessions and screen activity.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The server&#8217;s public key is also important. RustDesk generates an Ed25519 key pair on first run; clients use the public key to verify that they are talking to your self-hosted server. Keep the private key in the server&#8217;s persistent data and treat it as sensitive.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Choose the right VPS size<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk&#8217;s official requirements describe a basic cloud server as sufficient for a normal deployment. The practical choice depends less on the binaries and more on how often sessions fall back to the relay.<\/p>\n\n\n\n<figure class=\"wp-block-table ap-table\"><table><thead><tr><th>Use case<\/th><th>Starting plan<\/th><th>Why<\/th><\/tr><\/thead><tbody><tr><td>One or two computers, occasional support<\/td><td>1 GB VPS<\/td><td>Enough headroom for the OSS services and a light relay workload<\/td><\/tr><tr><td>A small team or several always-on endpoints<\/td><td>2 GB VPS<\/td><td>More room for Docker, monitoring, and simultaneous sessions<\/td><\/tr><tr><td>Frequent relay use or several active sessions<\/td><td>4 GB VPS<\/td><td>More memory and CPU headroom as relay traffic and maintenance grow<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">VPSLake&#8217;s Buffalo 1 GB Linux VPS is $3.99\/mo and includes 1 vCPU, 1 GB reserved RAM, 20 GB SSD storage on RAID 1, 1 TB traffic, a dedicated IPv4 address, KVM, and full root access. Its port is 100 Mbps. The 2 GB plan is $5.99\/mo with 2 TB traffic and a 200 Mbps port; the 4 GB plan is $9.99\/mo with 3 TB traffic and a 200 Mbps port.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Those traffic allowances are not a promise that every session will use the relay. Direct connections can avoid sending the desktop stream through the VPS. If your deployment regularly relays high-resolution sessions, measure traffic before choosing a larger group of endpoints.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">You can <a href=\"https:\/\/vpslake.com\/buy-buffalo-vps\">compare Buffalo Linux VPS plans<\/a> and select Debian 12, Ubuntu 24.04, AlmaLinux 9, or Rocky Linux 9. Debian 12 is a sensible choice for the commands below.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What you need<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Before you begin, have these items ready:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n\n<li>A Linux VPS with a public IPv4 address and full root access.<\/li>\n\n\n<li>Debian 12 or another supported Linux distribution.<\/li>\n\n\n<li>An SSH client and the server IP address.<\/li>\n\n\n<li>The RustDesk client installed on each computer you want to connect.<\/li>\n\n\n<li>A backup location for the RustDesk data directory and generated key pair.<\/li>\n\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">Step 1: Prepare the VPS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why:<\/strong> A public, reachable host avoids home-router forwarding and gives every RustDesk client one stable server address.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Choose a Linux VPS with a public IPv4 address and full root access. After payment, record the server IP, login details, and the operating system you selected. Use SSH from your computer to connect:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ssh root@SERVER_IP<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Update the system before installing Docker:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>apt update &amp;&amp; apt upgrade -y<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Create a non-root administrator if you normally operate Linux servers that way, then keep root access available for the initial firewall and Docker setup. A public VPS avoids home-router forwarding.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you already use Docker on Debian, VPSLake&#8217;s <a href=\"https:\/\/vpslake.com\/blog\/2026\/11\/03\/install-docker-debian-12\/\">Docker on Debian 12 walkthrough<\/a> covers the host preparation separately.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 2: Deploy RustDesk Server OSS with Docker<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why:<\/strong> Docker keeps the two RustDesk services together and makes later upgrades or moves easier to repeat.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk&#8217;s installation documentation recommends Docker for a reproducible deployment. On a clean Debian or Ubuntu VPS, install Docker using Docker&#8217;s official convenience script, then download the RustDesk Compose file:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>curl -fsSL https:\/\/get.docker.com | sh\nmkdir -p ~\/rustdesk-server\ncd ~\/rustdesk-server\nwget https:\/\/rustdesk.com\/oss.yml -O compose.yml<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Start the services in the background:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose -f compose.yml up -d<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Check that the containers are running:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose -f compose.yml ps<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">The Compose file defines the hbbs and hbbr services and their data locations. Do not delete the persistent data directory when replacing the containers: it holds the generated server key and other state needed by existing clients.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">To inspect recent output if a service does not start, run:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>docker compose -f compose.yml logs --tail=100 hbbs hbbr<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Success looks like both services running without a repeated restart loop. The public key is normally in the RustDesk data directory as id_ed25519.pub; keep a copy of that public key ready for client configuration.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 3: Open only the required ports<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why:<\/strong> The services cannot register clients or relay sessions until the required TCP and UDP traffic can reach the VPS.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For the core OSS setup, RustDesk documents TCP ports 21115\u201321117 and UDP port 21116 as the minimum useful set. The wider TCP range 21114\u201321119 is used by the full set of documented services, while TCP 21118 and 21119 are WebSocket ports for the web client.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">On a host using UFW, the core rules are:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ufw allow 21115:21117\/tcp\nufw allow 21116\/udp\nufw enable\nufw status verbose<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">If you are using the RustDesk web client, follow the official reverse-proxy instructions before exposing its WebSocket ports. Keep TCP 21118 and 21119 closed when you do not use the web client. If you need help generating a UFW ruleset, VPSLake&#8217;s <a href=\"https:\/\/vpslake.com\/ufw-firewall-generator\">free UFW firewall generator<\/a> can produce a starting configuration.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" src=\"https:\/\/vpslake.com\/blog\/wp-content\/uploads\/2026\/11\/self-hosted-rustdesk-server-vps-1.webp\" alt=\"Generate and review UFW rules before enabling the firewall.\"\/><figcaption class=\"wp-element-caption\">Generate and review UFW rules before enabling the firewall.<\/figcaption><\/figure>\n\n\n\n<aside class=\"ap-note\"><p>The minimum port set is enough for a normal OSS deployment. Add the WebSocket ports only when you are deliberately configuring the web client behind a suitable reverse proxy.<\/p><\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">Step 4: Point RustDesk clients at the VPS<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why:<\/strong> Each client needs the ID server address and public key to find your backend and verify it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Install the RustDesk client on each computer you want to manage. In the client, open the network settings and enter the VPS hostname or public IP as the ID Server. Then enter the server&#8217;s public key from id_ed25519.pub.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a basic same-host hbbs and hbbr deployment, the client can usually derive the relay address from the ID server. If you use a separate relay host or a non-default port, set the Relay Server explicitly according to the RustDesk documentation.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The essential values are:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n\n<li><strong>ID Server:<\/strong> the public DNS name or IP address of your hbbs host.<\/li>\n\n\n<li><strong>Relay Server:<\/strong> the hbbr address when it is separate or needs to be specified manually.<\/li>\n\n\n<li><strong>Key:<\/strong> the public key generated by your server, not a password and not a Pro license key.<\/li>\n\n<\/ol>\n\n\n\n<p class=\"wp-block-paragraph\">After saving the settings, test from two networks if possible, such as a home connection and a mobile hotspot. A client that registers successfully but cannot complete a session usually points to a missing relay rule, a blocked UDP port, or an incorrect key.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Step 5: Verify and maintain the deployment<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>Why:<\/strong> Service status, listening ports, logs, and backups catch the most common setup errors before you rely on the server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Use the following checks after the first connection:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>cd ~\/rustdesk-server\ndocker compose -f compose.yml ps\ndocker compose -f compose.yml logs --tail=50 hbbs hbbr\nss -lntup | grep -E '2111[4-9]'<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">Keep the VPS operating system and RustDesk containers updated. Before an update, back up the Compose data directory and server key pair.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">For a small deployment, a 1 GB plan is a reasonable starting point. Move to the 2 GB or 4 GB plan when monitoring shows sustained memory pressure, when you add other services, or when relay concurrency makes the original host too busy.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Self-hosting cost vs AnyDesk or TeamViewer<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">The Buffalo 1 GB VPS costs $3.99\/mo, so the infrastructure entry point is predictable and low. VPSLake also offers quarterly billing at 5% less and yearly billing with two months free. The OSS deployment does not add a per-seat license charge.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">AnyDesk and TeamViewer are managed products with their own subscription structures, administration features, and support options. A self-hosted RustDesk setup trades that managed model for control of the VPS, network rules, keys, upgrades, and backups. For a household, small support team, or lab that already has someone comfortable with Linux, the VPS model can keep the recurring server cost tied to infrastructure rather than the number of remote endpoints.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The right comparison is not only the monthly price. Check whether you need a central web console, identity integration, device policies, audit features, or a managed support workflow. RustDesk Server Pro addresses several of those business requirements; OSS is focused on the core ID and relay functions.<\/p>\n\n\n\n<aside class=\"ap-cta\" aria-label=\"Get a Buffalo Linux VPS\"><div class=\"ap-cta__content\"><p class=\"ap-cta__eyebrow\">Start self-hosting<\/p><p class=\"ap-cta__title\">Get a Buffalo Linux VPS<\/p><p class=\"ap-cta__text\">Run your RustDesk ID and relay services on a private Linux VPS with a dedicated IPv4 address.<\/p><\/div><a class=\"ap-cta__btn\" href=\"https:\/\/vpslake.com\/buy-buffalo-vps\">View VPS plans<\/a><\/aside>\n\n\n\n<h2 class=\"wp-block-heading\">FAQ<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">How much RAM does a self-hosted RustDesk server need?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">RustDesk&#8217;s official documentation says the hardware requirements are very low. A 1 GB VPS is a practical starting point for a light personal deployment; choose 2 GB or 4 GB when you expect more concurrent relay sessions or plan to run other services on the host.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What ports does a RustDesk server need?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The minimum useful set is TCP 21115\u201321117 and UDP 21116. RustDesk also documents TCP 21114\u201321119 for the broader deployment, with TCP 21118 and 21119 intended for WebSocket use. Keep ports you do not need closed.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">What are hbbs and hbbr in RustDesk?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">hbbs is the ID, rendezvous, and signalling service. hbbr is the relay service used when two endpoints cannot establish a direct connection.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Where do I find the RustDesk server key?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">The public key is normally generated on the first run and stored as id_ed25519.pub in the server&#8217;s RustDesk data directory. Enter that public key in the client network settings and preserve the matching private key in persistent storage.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Can I run RustDesk Server OSS on a $4 VPS?<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">Yes, a Buffalo Linux VPS 1 GB at $3.99\/mo is a suitable starting point for a small deployment with light relay use. Watch memory and traffic as you add endpoints; the 2 GB and 4 GB plans provide more headroom for busier setups.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/rustdesk.com\/docs\/en\/self-host\/\" target=\"_blank\" rel=\"noopener\">RustDesk self-hosting documentation<\/a> explains the server architecture and port roles, while the <a href=\"https:\/\/rustdesk.com\/docs\/en\/self-host\/rustdesk-server-oss\/install\/\" target=\"_blank\" rel=\"noopener\">official OSS installation guide<\/a> covers Docker, firewall, and client configuration details.<\/p>\n\n\n\n<script type=\"application\/ld+json\">{\"@context\": \"https:\/\/schema.org\", \"@type\": \"FAQPage\", \"mainEntity\": [{\"@type\": \"Question\", \"name\": \"How much RAM does a self-hosted RustDesk server need?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"RustDesk's official documentation says the hardware requirements are very low. A 1 GB VPS is a practical starting point for a light personal deployment; choose 2 GB or 4 GB when you expect more concurrent relay sessions or plan to run other services on the host.\"}}, {\"@type\": \"Question\", \"name\": \"What ports does a RustDesk server need?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The minimum useful set is TCP 21115\u201321117 and UDP 21116. RustDesk also documents TCP 21114\u201321119 for the broader deployment, with TCP 21118 and 21119 intended for WebSocket use. Keep ports you do not need closed.\"}}, {\"@type\": \"Question\", \"name\": \"What are hbbs and hbbr in RustDesk?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"hbbs is the ID, rendezvous, and signalling service. hbbr is the relay service used when two endpoints cannot establish a direct connection.\"}}, {\"@type\": \"Question\", \"name\": \"Where do I find the RustDesk server key?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"The public key is normally generated on the first run and stored as id_ed25519.pub in the server's RustDesk data directory. Enter that public key in the client network settings and preserve the matching private key in persistent storage.\"}}, {\"@type\": \"Question\", \"name\": \"Can I run RustDesk Server OSS on a $4 VPS?\", \"acceptedAnswer\": {\"@type\": \"Answer\", \"text\": \"Yes, a Buffalo Linux VPS 1 GB at $3.99\/mo is a suitable starting point for a small deployment with light relay use. Watch memory and traffic as you add endpoints; the 2 GB and 4 GB plans provide more headroom for busier setups. RustDesk self-hosting documentation explains the server architecture and port roles, while the official OSS installation guide covers Docker, firewall, and client configuration details.\"}}]}<\/script>\n\n","protected":false},"excerpt":{"rendered":"Learn how to run a rustdesk server self hosted on a VPS, including hbbs and hbbr, ports, firewall rules, sizing, keys, costs, and setup here.","protected":false},"author":1,"featured_media":3877,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"csco_singular_sidebar":"","csco_page_header_type":"","csco_page_load_nextpost":"","footnotes":""},"categories":[9],"tags":[118,93,317,608,139],"class_list":["post-3876","post","type-post","status-publish","format-standard","has-post-thumbnail","category-vps-hosting","tag-docker","tag-linux-vps","tag-remote-access","tag-rustdesk","tag-self-hosting","cs-entry"],"_links":{"self":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/3876","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/comments?post=3876"}],"version-history":[{"count":1,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/3876\/revisions"}],"predecessor-version":[{"id":4183,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/posts\/3876\/revisions\/4183"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media\/3877"}],"wp:attachment":[{"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/media?parent=3876"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/categories?post=3876"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/vpslake.com\/blog\/wp-json\/wp\/v2\/tags?post=3876"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}