The short version

About CortenDesk

Does this replace the RustDesk server?

Yes. The image ships hbbs and hbbr from CortenDesk Server, our fork with fixes the open-source server lacks, so one container is the whole deployment. Sessions go peer to peer or through the relay; they never pass through the console. To keep servers you already run, set CORTENDESK_EMBEDDED_SERVER=false and point the console at them.

Do I need a modified client?

No. CortenDesk speaks the HTTP API that stock RustDesk clients already use. You set the API Server field in a normal client. There is no client fork to maintain.

Do I need a RustDesk Pro license?

No. CortenDesk ships its own AGPL server and works with the standard RustDesk client. There is no license to buy, nothing to activate and no license to move when you change servers.

Why is it free if I host it myself?

It is AGPL-3.0, with no paid tier, no license key and no feature held back. You run it and you own the data. If it saves you money, sponsoring keeps it going.

Is it affiliated with RustDesk?

No. It is an independent project built against the open-source server and the documented client API.

What do I need to run it?

Docker and a MySQL or MariaDB database; the image includes the RustDesk server. A manual install on PHP 8.3 or newer also works, and that route needs a RustDesk server you run separately.


Getting it running and keeping it current

Installing and upgrading

How do I install it?

Copy the Docker Compose file from the install page, set APP_URL to the address your clients and browsers will use, and run docker compose up -d. The ID server, relay address and key are derived on first boot. Sign in as admin / changeme and change that password straight away.

I already run the open-source RustDesk server. How do I switch?

Stop your old hbbs and hbbr and mount their data directory at /data/rustdesk in the CortenDesk container. The key pair, device IDs and peer database carry over, so no client needs reconfiguring. Then set API Server on the clients to the console URL. Step by step: Moving to the bundled server.

I use lejianwen/rustdesk-api. Can I bring my data?

Yes. php artisan cortendesk:import-lejianwen <path-to-sqlite-db> imports users with their passwords, devices, address books and audit history. See Importing from rustdesk-api.

How do I upgrade?

Take a backup in Settings → Backups, then run docker compose pull and docker compose up -d. Database migrations run when the new container starts. Your data lives in volumes, so replacing the container is safe. Only docker compose down -v deletes it. More in How to upgrade.

How do I move to a new server?

Download a backup archive from Settings → Backups. Start a fresh container on the new host, sign in, upload the archive and restore it, then restart the container so it picks up the restored server key. Point your DNS at the new host and devices come back within a heartbeat. See Backups.

How do I uninstall it?

docker compose down stops and removes the containers and keeps your data. docker compose down -v also deletes the volumes: the database, the app key and the server key pair. Take a backup first if you might come back.


Day-to-day administration

Running it

How do I start, stop or check it?

docker compose stop, start and restart. The ID server and relay run inside the container and stop and start with it. docker compose ps shows the health check. In the console, Diagnostics checks the database, the ID server, the relay and the scheduler, and /health/ready gives the same answer to a monitor.

Where are the logs?

docker compose logs -f cortendesk shows the console, hbbs and hbbr together. CORTENDESK_LOG_LEVEL=debug makes all three more talkative. Connections, file transfers, sign-ins and admin actions are also kept in the console under Logs.

Which ports do I need to open?

TCP 21115, 21116 and 21117, and UDP 21116, for the ID server and relay. The console itself listens on 8080; put it behind a reverse proxy on 443. Open the ports in your cloud provider's firewall as well as on the host. The full list is in RustDesk server in Docker.

How do I set up HTTPS?

Put a reverse proxy such as Caddy, nginx or Traefik in front of port 8080 and set APP_URL to the https address. The web client gets hardware video for every codec over HTTPS. Examples are in Reverse proxy and TLS.

How do I change the admin password?

Sign in, open My Account from the top-right menu and use Change Password. An admin can also set any user's password from Users, which signs that user out everywhere, including their RustDesk clients.

I forgot the admin password. How do I get back in?

Use "Forgot password" on the sign-in page if email is set up and the account has an address. Another admin can set it from Users. If neither works, set it from the command line:
docker compose exec cortendesk php artisan tinker --execute="App\Models\User::where('username', 'admin')->first()->update(['password' => 'new-password']);"

How do I reset two-factor for someone who lost their phone?

docker compose exec cortendesk php artisan cortendesk:2fa-reset <username>. They sign in with their password and enrol again. Other ways back in are in the command-line reference.

Emails are not sending. What do I check?

Send a test from Settings → Email; it shows the mail server's own error. Many VPS providers block outgoing ports 25 and 465, so use 587 if your relay offers it. If your provider no longer issues SMTP passwords, a transactional service like Amazon SES, Postmark or Brevo works. See Email and invitations.


Getting devices in and keeping them right

Clients and devices

How do I point clients at it?

On each RustDesk client, Settings → Network: set ID Server, Relay Server, Key and API Server. Settings → Server in the console shows all four ready to copy. Devices appear within one heartbeat, about fifteen seconds.

Can I deploy to many machines with a script?

Yes. Install the client with your script, then run it with --assign and an API token that has device write access. That registers the device and can set its owner, group and strategy on first run, with no console work afterwards. A strategy then pushes the rest of the settings. For a branded installer with your server built in, link an rdgen instance in Settings. See Automation API.

Why are a device's name or logs empty?

The device itself must have API Server set to the console. A device reports its own name and hardware, and the device being controlled is the one that reports the connection, so a controller pointed at the console is not enough.

Why can't a user see some devices?

Admins see every device. Everyone else sees the devices they own and those in device groups granted to them or their user group. Give access by putting the device in a device group and granting that group to the user or to a user group they belong to. If the approval gate is on, new devices wait in Pending until someone approves them.

How do I remove a device?

Delete moves it to the recycle bin. A device there is ignored when it checks in, so it stays gone while it keeps running. Permanently delete removes it for good, and if it still points at the console it registers again as new. To free its ID on the ID server for a reinstalled machine, use Release ID on the device page.


What the common ones mean

Error messages

"Key mismatch"

The client's Key does not match the server's. Copy it from Settings → Server and paste it with no spaces or line breaks around it.

"Failed to connect to relay server"

The client cannot reach the relay on TCP 21117. Check the port is published and open. The relay address defaults to the host in APP_URL; if that name goes through a proxy that only passes web traffic, such as a CDN, set CORTENDESK_RELAY_SERVER and CORTENDESK_ID_SERVER to a name that reaches the server directly.

Connections fail only when the client is signed in

You are on the stock RustDesk server. A signed-in client from 1.4.1 on waits for the ID server to sign its key, which the open-source server never does. The bundled CortenDesk Server does; see CortenDesk Server.


The browser client

When should I use it?

Whenever it suits you. The web client is a full RustDesk client in Chrome or Edge, with nothing to install. Click Connect on a device and you are in, from your own desk or from a machine you can't install software on.

The desktop client still has a few things the browser doesn't, such as TCP tunnels. Use whichever fits the moment; the devices and their rules are the same.

What can it do?

Remote control with every monitor, a two-pane file manager, a terminal on Windows, macOS and Linux, audio, voice calls, chat and the clipboard both ways. It is our own implementation of the RustDesk protocol, not a viewer. See the features page.

How fast is it?

It decodes video in hardware and connects straight to RustDesk 1.5 devices over WebRTC, falling back to the relay. Over HTTPS the browser can decode VP8, VP9, H.264, H.265 and AV1; over plain HTTP, H.264 only. Best in Chrome or Edge.

Is it a security hole?

It follows the same rules as any other client. Access scoping applies, it asks for the device's password or takes it from your address book, it asks for 2FA when the device does, and strategies still apply: what a device forbids, the browser can't do.

Can I turn it off?

Yes. Set CORTENDESK_NATIVE_WEBCLIENT=false and it disappears from the console entirely.


Still stuck?

The wiki covers installation, every setting, the command-line tools and troubleshooting by symptom. If that doesn't answer it, open an issue on GitHub with your version, how you installed it and what you see.