Migrating, moving, rustdesk to another dockerhost makes already setup devices not work. #1414

Closed
opened 2026-02-20 23:26:06 -05:00 by deekerman · 5 comments
Owner

Originally created by @DoTheEvo on GitHub (Feb 21, 2023).

Bug Description

Using S6-overlay image. Rustdesk works very well for few months now.
Before we even started to actually use it, I tested migration to another docker host and it just worked. I just down-ed the container. Copy the directory to another docker host, run it. Changed DNS A-record of rust.example.com to point to a new public IP and set up port forwarding.

It just worked as far as I remember.

But now when we actually do real migration and theres like 30 machines setup with this rustdesk server... and I do the steps above.. and when I run linux client or windows client and try to connect to the PCs in the recent connection section I get notice that that the remote desktop is offline.
The green dot down in status panel is green on all clients(I still have other ways to connect to many of them to check this) so clients are actually able to connect to the server I guess.
Adding new PC works just fine, and after some time even one of the machines started to connect, but one is just not enough and it was hours. Surely heartbeat or something does not take like several hours?

Initially I was sure that issue is on my side, because the new setup where I am migrating it is behind bit complicated opnsense setup... but with that suspicion I tried to move it to another 2 different locations with public ports and setup correctly port forwarding and DNS A record pointing to that public IP and its the same results.

The notice of offline is immediate, there is nothing in rustdesk docker logs, in firewall(mentioned opnsense) I do see traffic happening on port 21115 and 21116.

btw, most clients are installed using the long windows name with host and key set

The moment I up the original container on the old docker host and change port forwarding and or also DNS records(depending where I was testing new deployment) everything works straight away. All machines are instant connected nicely.

Any help on how to investigate this issue further? Deeper logging set somewhere?

Also I noticed that db_v2.sqlite3 being constantly at 4k, while db_v2.sqlite3-wal grows in size... shouldnt the stuff from WAL get committed to the database at some point? When I opened the databse to check out whats inside in sqlitebrowser it automatically put them all together. But that did not play role when I tried to re-create container with this database.

Thnx.

docker-compose.yml
services:
  rustdesk:
    image: rustdesk/rustdesk-server-s6:1.1.6-1
    container_name: rustdesk
    hostname: rustdesk
    restart: unless-stopped
    env_file: .env
    ports:
      - 21115:21115
      - 21116:21116
      - 21116:21116/udp
      - 21117:21117
      - 21118:21118
      - 21119:21119
    volumes:
      - ./data:/data
.env
# GENERAL
TZ=Europe/Bratislava

# RUSTDESK
RELAY=rust.example.com:21117
ENCRYPTED_ONLY=1

How to Reproduce

try move rustdesk to a different docker host and see if everything works as it should

Expected Behavior

for rustdesk to work after move

Operating system(s) on local side and remote side

dockerhost - archlinux, clients - windows10; 8.1; archlinux desktop

RustDesk Version(s) on local side and remote side

1.1.9

Screenshots

https://i.imgur.com/ZZtfCZS.png

Additional Context

No response

Originally created by @DoTheEvo on GitHub (Feb 21, 2023). ### Bug Description Using [S6-overlay image](https://github.com/rustdesk/rustdesk-server#s6-overlay-based-images). Rustdesk works very well for few months now. Before we even started to actually use it, I tested migration to another docker host and it just worked. I just down-ed the container. Copy the directory to another docker host, run it. Changed DNS A-record of rust.example.com to point to a new public IP and set up port forwarding. It just worked as far as I remember. But now when we actually do real migration and theres like 30 machines setup with this rustdesk server... and I do the steps above.. and when I run linux client or windows client and try to connect to the PCs in the recent connection section I get notice that that [the remote desktop is offline.](https://i.imgur.com/ZZtfCZS.png) The green dot down in status panel is green on all clients(I still have other ways to connect to many of them to check this) so clients are actually able to connect to the server I guess. Adding new PC works just fine, and after some time even one of the machines started to connect, but one is just not enough and it was hours. Surely heartbeat or something does not take like several hours? Initially I was sure that issue is on my side, because the new setup where I am migrating it is behind bit complicated opnsense setup... but with that suspicion I tried to move it to another 2 different locations with public ports and setup correctly port forwarding and DNS A record pointing to that public IP and its the same results. The notice of offline is immediate, there is nothing in rustdesk docker logs, in firewall(mentioned opnsense) I do see [traffic happening](https://i.imgur.com/w5eGKEe.png) on port 21115 and 21116. btw, most clients are installed using the long windows name with [host and key set](https://i.imgur.com/SpewAGs.png) The moment I up the original container on the old docker host and change port forwarding and or also DNS records(depending where I was testing new deployment) everything works straight away. All machines are instant connected nicely. Any help on how to investigate this issue further? Deeper logging set somewhere? Also I noticed that `db_v2.sqlite3` being constantly at 4k, while `db_v2.sqlite3-wal` grows in size... shouldnt the stuff from WAL get committed to the database at some point? When I opened the databse to check out whats inside in sqlitebrowser it automatically put them all together. But that did not play role when I tried to re-create container with this database. Thnx. <details> <summary>docker-compose.yml</summary> ```yml services: rustdesk: image: rustdesk/rustdesk-server-s6:1.1.6-1 container_name: rustdesk hostname: rustdesk restart: unless-stopped env_file: .env ports: - 21115:21115 - 21116:21116 - 21116:21116/udp - 21117:21117 - 21118:21118 - 21119:21119 volumes: - ./data:/data ``` </details> <details> <summary>.env</summary> ```php # GENERAL TZ=Europe/Bratislava # RUSTDESK RELAY=rust.example.com:21117 ENCRYPTED_ONLY=1 ``` </details> ### How to Reproduce try move rustdesk to a different docker host and see if everything works as it should ### Expected Behavior for rustdesk to work after move ### Operating system(s) on local side and remote side dockerhost - archlinux, clients - windows10; 8.1; archlinux desktop ### RustDesk Version(s) on local side and remote side 1.1.9 ### Screenshots ![https://i.imgur.com/ZZtfCZS.png](https://i.imgur.com/ZZtfCZS.png) ### Additional Context _No response_
Author
Owner

@rustdesk commented on GitHub (Feb 21, 2023):

#763

@rustdesk commented on GitHub (Feb 21, 2023): #763
Author
Owner

@rustdesk commented on GitHub (Feb 21, 2023):

Try restart on controlled side, maybe dns cache not updated there, etc. Appologies, we can not dive in for you, we are busy coding. Let us know please when you figure it out.

@rustdesk commented on GitHub (Feb 21, 2023): Try restart on controlled side, maybe dns cache not updated there, etc. Appologies, we can not dive in for you, we are busy coding. Let us know please when you figure it out.
Author
Owner

@shayaknyc commented on GitHub (May 21, 2023):

having the exact same issue as OP. did you figure out a solution?

@shayaknyc commented on GitHub (May 21, 2023): having the exact same issue as OP. did you figure out a solution?
Author
Owner

@DoTheEvo commented on GitHub (May 21, 2023):

nope, I setup rust2.extemple.com as a new url and uninstall / install clients again, now set to use rust2.example.com

@DoTheEvo commented on GitHub (May 21, 2023): nope, I setup rust2.extemple.com as a new url and uninstall / install clients again, now set to use rust2.example.com
Author
Owner

@thejohnha commented on GitHub (Jan 10, 2024):

I'm also having this issue. I created a new rustdesk self-hosted server, copied the old id_ed25519 and id_ed25519.pub keys to the new server, but I cannot connect to any of my endpoints. I saw someone here with the same question: https://www.reddit.com/r/rustdesk/comments/zu55rq/moving_selfhost_to_different_server_how_to_do/

@thejohnha commented on GitHub (Jan 10, 2024): I'm also having this issue. I created a new rustdesk self-hosted server, copied the old id_ed25519 and id_ed25519.pub keys to the new server, but I cannot connect to any of my endpoints. I saw someone here with the same question: [https://www.reddit.com/r/rustdesk/comments/zu55rq/moving_selfhost_to_different_server_how_to_do/](url)
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/rustdesk-rustdesk#1414
No description provided.