NEWNova versão do Erupt DM—Motor multithread 40% mais rápidoVer novidades
Servidor de sincronização auto-hospedado

Guia do Sync Hub auto-hospedado

Implante seu próprio relé de sincronização em um PC ou servidor na nuvem — controle total do caminho dos dados; o Hub vê apenas texto cifrado.

When do you need a self-hosted Hub?

By default, two devices always prefer LAN / WAN direct connections (end-to-end encrypted, no server in between). Only when a direct connection is unreachable does traffic fall back to the official relay or your self-hosted Hub.

  • Strict networks: relay via your own server when the official relay is unreachable or slow
  • Full control: the relay server is deployed and operated by you
  • Heavy users: many devices, large files, frequent syncs — no shared-relay bandwidth limits

The Hub only forwards end-to-end encrypted data (the server sees ciphertext only) and verifies official device credentials to prevent bandwidth abuse.

Windows setup (one-liner or double-click)

Option 1 (recommended): run one command in an elevated PowerShell — it downloads the binary, installs it as a system service with auto-start, and prints the admin console URL and password:

irm https://eruptdm.com/hub/install.ps1 | iex

Option 2 (manual): download edm-hub.exe into a fixed folder (e.g. D:\edm-hub\) and double-click it — on first launch it automatically creates edm-hub.toml (with a random admin password) and the database; the console banner shows the admin URL, device endpoint and initial password.

Download (v0.2.0): dl.eruptdownloadmanager.com/hub/0.2.0/win-x64/edm-hub.exe. If Windows SmartScreen warns on first run, click "More info → Run anyway" (the server tool is not store-distributed).

(Optional, manual install only) Run as a Windows service:

:: From an elevated command prompt
edm-hub.exe service install
sc start edm-hub

Installing the service also adds a Windows Firewall rule for TCP 8080 automatically; config and data live next to the executable (one-liner installs to C:\Program Files\edm-hub\).

Linux setup (one command)

Run a single command as root on your server — it downloads the binary, registers a systemd service with auto-start, starts it, and prints an info card (admin URL, admin password, client endpoint) for you to keep:

curl -fsSL https://eruptdm.com/hub/install.sh | sudo bash
  • Locations: binary at /usr/local/bin/edm-hub, config and data at /var/lib/edm-hub/
  • Forgot the password from the info card? cat /var/lib/edm-hub/edm-hub.toml anytime
  • Upgrade: re-run the same command (keeps config and data); uninstall: add -s -- --uninstall

(Optional) Manual deploy: download the binary from dl.eruptdownloadmanager.com/hub/0.2.0/linux-x64/edm-hub (use linux-arm64 on aarch64) and run ./edm-hub serve — first run also auto-creates the config.

Open the port on your cloud server (key step)

The Hub listens on TCP 8080 by default. On cloud servers (Alibaba Cloud / Tencent Cloud / AWS / Azure, etc.) you must allow inbound TCP 8080 in the console's security group / firewall — ping only proves ICMP reachability, not the TCP port.

  • Cloud console: security group → inbound rules → add TCP 8080 (source 0.0.0.0/0 or restricted IPs)
  • Windows Firewall: added automatically by service install; manual command below
  • Linux: ufw allow 8080/tcp or firewall-cmd --add-port=8080/tcp --permanent
:: Windows manual rule (elevated)
netsh advfirewall firewall add rule name="edm-hub" dir=in action=allow protocol=TCP localport=8080

Verify the port from another machine:

Test-NetConnection <hub-ip> -Port 8080   # Windows
nc -vz <hub-ip> 8080                     # macOS / Linux
# or open http://<hub-ip>:8080/health in a browser

Configure the EDM client (two steps)

  1. Step 1: Settings → File Sync → Self-hosted Sync Server (Hub) — enter ws://<hub-ip>:8080 (IP:port is enough; the /hub/ws path is added automatically)
  2. Step 2: click "Fetch credential" (requires signing in). The credential is issued by the official account system, valid 30 days, works with any self-hosted Hub, and is independent of the Hub address

After saving, the device connects to the Hub automatically and appears under "Online devices" in the admin console. LAN / direct connections always take priority; the Hub relays only when direct connections are unreachable.

FAQ

  • Forgot the admin password? Check admin_password in edm-hub.toml, or admin_password.txt next to it; you can also set the EDM_HUB_ADMIN_PASSWORD environment variable
  • Credential public key shows "not ready"? The Hub fetches the official public key automatically once online; on a fully offline machine fill credential_public_key in edm-hub.toml manually (value from GET /api/v1/auth/device-credential/public-key)
  • Client says the credential was rejected? It expired (30 days) or the Hub rotated its key: click "Fetch credential" again in the client
  • Port already in use? Change listen_addr in edm-hub.toml (e.g. 0.0.0.0:18080), restart, and use ws://<ip>:18080 in the client
  • HTTPS / domain name? Put Caddy/nginx in front with TLS; keep the /hub/ws path (or enter a custom full path wss://domain/path in the client)

Ainda com dificuldades?

Nossa comunidade e os mantenedores ficarão felizes em ajudar diretamente.

Fale conosco