π Feature Summary
Manage remote ZeroTier planet root servers directly from the ZTNET admin UI β provision them over SSH, generate/distribute a custom planet, monitor health, and (separately) edit the local controller's local.conf from the panel.
π Detailed Description
This adds an end-to-end workflow for running your own planet roots on remote machines, plus local controller configuration. Implemented across a new Prisma schema, a dedicated tRPC router (remoteRootRouter), a set of focused services, a periodic health cron, and an admin UI under Admin β Controller.
Data model (new Prisma models/enums)
RemoteRootNode β a managed remote root: SSH connection (host, sshPort, sshUser), ZeroTier state (zerotierInstalled, zerotierVersion, serviceStatus, startupStatus), aggregate status (UNKNOWN/HEALTHY/DEGRADED/OFFLINE/ERROR), local.conf-derived fields (primaryPort, secondaryPort, allowSecondaryPort, portMappingEnabled, interfacePrefixBlacklist, bindAddresses, allowManagementFrom, defaultBondingPolicy, multithreaded, linuxKernelMode), endpoint resolution (endpointSource = MANUAL_IP/DOMAIN, domainName, selectedIps, resolvedIps, endpointCandidates), and planet tracking (remotePlanetHash, remoteOfficialPlanetHash, planetStatus).
RemoteRootCredential β per-node managed SSH key. Private key stored encrypted at rest (encryptedPrivateKey), with publicKey exposed so the operator can authorize it on the target.
RemoteRootTask β async task records (type, status, logs, timestamps) for the long-running operations below.
- Enums:
RemoteRootTaskType (CHECK, INSTALL_ZEROTIER, UPGRADE_ZEROTIER, READ_CONFIG, GENERATE_PLANET_ENTRY, RESTART_ZEROTIER, CHANGE_PORT, SAVE_CONFIG, DISTRIBUTE_PLANET, RESTORE_OFFICIAL_PLANET), RemoteRootTaskStatus, RemoteRootStatus, RemoteRootEndpointSource, RemoteRootCredentialAuthType.
API (remoteRootRouter, all admin-only)
- CRUD:
list, getById, create, update, delete
- Connectivity:
resolveDomain, testSsh
- Provisioning over SSH:
installZerotier, upgradeZerotier, restartZerotier, changeZerotierPort
- Config:
readRemoteConfig, saveRemoteConfig
- Planet:
buildPlanetRootEntry, buildPlanetRootEntries, distributePlanet, restoreOfficialPlanet
- Health:
checkHealth
Services (separated by concern, each unit-tested)
remoteRootSshService β SSH transport (managed-key auth).
remoteRootCredentialService β generate/encrypt/decrypt the managed SSH key pair.
remoteRootProvisioningService β install/upgrade/restart ZeroTier, change port on the remote host.
remoteRootConfigGuardService β validate/guard local.conf edits.
remoteRootDnsService β resolve a domain to candidate endpoint IPs.
remoteRootPlanetService / remoteRootPlanetStatusService β build planet root entries, distribute the custom planet, and compare remote planet hashes vs official.
remoteRootHealthService / remoteRootHealthTaskService β multi-dimension health (SSH / service / startup / panel) and task logging.
remoteRootTaskLogService + remoteRootTaskLogFormatter β structured task logs surfaced in the UI.
Background health monitoring
- A cron job (
CheckRemoteRoots, every 5 minutes) refreshes each enabled node's health and status so the panel reflects live state without manual checks.
Admin UI (Admin β Controller)
remoteRoots.tsx β manage remote roots: add/edit/delete, run SSH test, install/upgrade ZeroTier, edit config, change port, generate & distribute the planet, restore the official planet, and view per-task logs and health badges.
localZerotierConfig.tsx β edit the local controller's local.conf (ports, bindings, management allow-list, bonding, etc.) directly from the panel, backed by localZerotierConfigService and new adminRoute procedures.
- Planet generation hooks (
api/mkworld/config.ts, api/planet.ts) updated to incorporate remote roots, with a planetDownloadAuthMode option (GlobalOptions).
i18n β full translations added for all 11 shipped locales (en, de, es, fr, no, pl, ru, ua, zh, zh-tw).
Tests β component tests (remoteRoots, rootForm, controllerLayout, localZerotierConfig), service tests for every service above, translation-completeness tests, and API tests for planet generation.
π― Use Case
ZTNET can already create a custom planet, but the planet roots themselves still have to be installed, configured, and kept healthy by hand on each server. Operators running a self-hosted ZeroTier network (e.g. across multiple regions/clouds) want to:
- Bring up a new root server without manually SSHing in to install ZeroTier and edit
local.conf.
- Generate the planet entry from a root's real identity/endpoints and distribute the resulting planet to all roots consistently.
- See at a glance whether each root is reachable, running, and serving the expected planet β and be alerted (status badges) when one drifts (
DEGRADED/OFFLINE).
- Roll back to the official planet if a custom setup needs to be abandoned.
- Adjust the local controller's
local.conf from the same panel instead of editing files on the host.
This turns multi-root planet operations into a UI-driven workflow.
π‘ Willing to Contribute
Yes β this is already implemented and I'm preparing a PR against main.
π Feature Summary
Manage remote ZeroTier planet root servers directly from the ZTNET admin UI β provision them over SSH, generate/distribute a custom planet, monitor health, and (separately) edit the local controller's
local.conffrom the panel.π Detailed Description
This adds an end-to-end workflow for running your own planet roots on remote machines, plus local controller configuration. Implemented across a new Prisma schema, a dedicated tRPC router (
remoteRootRouter), a set of focused services, a periodic health cron, and an admin UI under Admin β Controller.Data model (new Prisma models/enums)
RemoteRootNodeβ a managed remote root: SSH connection (host,sshPort,sshUser), ZeroTier state (zerotierInstalled,zerotierVersion,serviceStatus,startupStatus), aggregatestatus(UNKNOWN/HEALTHY/DEGRADED/OFFLINE/ERROR),local.conf-derived fields (primaryPort,secondaryPort,allowSecondaryPort,portMappingEnabled,interfacePrefixBlacklist,bindAddresses,allowManagementFrom,defaultBondingPolicy,multithreaded,linuxKernelMode), endpoint resolution (endpointSource=MANUAL_IP/DOMAIN,domainName,selectedIps,resolvedIps,endpointCandidates), and planet tracking (remotePlanetHash,remoteOfficialPlanetHash,planetStatus).RemoteRootCredentialβ per-node managed SSH key. Private key stored encrypted at rest (encryptedPrivateKey), withpublicKeyexposed so the operator can authorize it on the target.RemoteRootTaskβ async task records (type,status,logs, timestamps) for the long-running operations below.RemoteRootTaskType(CHECK,INSTALL_ZEROTIER,UPGRADE_ZEROTIER,READ_CONFIG,GENERATE_PLANET_ENTRY,RESTART_ZEROTIER,CHANGE_PORT,SAVE_CONFIG,DISTRIBUTE_PLANET,RESTORE_OFFICIAL_PLANET),RemoteRootTaskStatus,RemoteRootStatus,RemoteRootEndpointSource,RemoteRootCredentialAuthType.API (
remoteRootRouter, all admin-only)list,getById,create,update,deleteresolveDomain,testSshinstallZerotier,upgradeZerotier,restartZerotier,changeZerotierPortreadRemoteConfig,saveRemoteConfigbuildPlanetRootEntry,buildPlanetRootEntries,distributePlanet,restoreOfficialPlanetcheckHealthServices (separated by concern, each unit-tested)
remoteRootSshServiceβ SSH transport (managed-key auth).remoteRootCredentialServiceβ generate/encrypt/decrypt the managed SSH key pair.remoteRootProvisioningServiceβ install/upgrade/restart ZeroTier, change port on the remote host.remoteRootConfigGuardServiceβ validate/guardlocal.confedits.remoteRootDnsServiceβ resolve a domain to candidate endpoint IPs.remoteRootPlanetService/remoteRootPlanetStatusServiceβ build planet root entries, distribute the custom planet, and compare remote planet hashes vs official.remoteRootHealthService/remoteRootHealthTaskServiceβ multi-dimension health (SSH / service / startup / panel) and task logging.remoteRootTaskLogService+remoteRootTaskLogFormatterβ structured task logs surfaced in the UI.Background health monitoring
CheckRemoteRoots, every 5 minutes) refreshes each enabled node's health and status so the panel reflects live state without manual checks.Admin UI (Admin β Controller)
remoteRoots.tsxβ manage remote roots: add/edit/delete, run SSH test, install/upgrade ZeroTier, edit config, change port, generate & distribute the planet, restore the official planet, and view per-task logs and health badges.localZerotierConfig.tsxβ edit the local controller'slocal.conf(ports, bindings, management allow-list, bonding, etc.) directly from the panel, backed bylocalZerotierConfigServiceand newadminRouteprocedures.api/mkworld/config.ts,api/planet.ts) updated to incorporate remote roots, with aplanetDownloadAuthModeoption (GlobalOptions).i18n β full translations added for all 11 shipped locales (en, de, es, fr, no, pl, ru, ua, zh, zh-tw).
Tests β component tests (remoteRoots, rootForm, controllerLayout, localZerotierConfig), service tests for every service above, translation-completeness tests, and API tests for planet generation.
π― Use Case
ZTNET can already create a custom planet, but the planet roots themselves still have to be installed, configured, and kept healthy by hand on each server. Operators running a self-hosted ZeroTier network (e.g. across multiple regions/clouds) want to:
local.conf.DEGRADED/OFFLINE).local.conffrom the same panel instead of editing files on the host.This turns multi-root planet operations into a UI-driven workflow.
π‘ Willing to Contribute
Yes β this is already implemented and I'm preparing a PR against
main.