Move your Hub to a new machine
When you change hardware, you can move an entire Hub β installed apps, settings, and app data β by copying its data directory to the new machine.
To back up a single app rather than the whole Hub, use the built-in per-app backup in the dashboard. See Backup & Restore.
Before you start
You need:
- Docker installed on the new machine β see Install Docker
- Companion Hub installed on the new machine, started once and then stopped. This creates the correct directory structure and system integration before you overwrite the data.
- Enough free disk space on the new machine for the data youβre moving
Find your Hub data root (ROOT_FOLDER_HOST) on the old machine β cihub status reports it, and Folder Structure explains whatβs inside.
Stop Hub on the old machine
cihub downConfirm nothing is still running before you archive β a live database will produce a corrupt copy:
docker psYou should see no ci-os-hub, ci-hub-db, or ci-hub-traefik containers.
Archive the data directory
Run this from the parent of your data root, substituting your own path:
tar -czvf hub-data.tar.gz --exclude='*/media' --exclude='*/repos' --exclude='*/backups' "$(basename "$ROOT_FOLDER_HOST")"media, repos, and backups are excluded because theyβre large and reproducible β app store repos re-clone on start, and media is usually better copied separately. If you want your per-app backups to come along, drop that --exclude.
Transfer the archive
Any file transfer works β scp, rsync, an external drive, or magic-wormholeΒ for a one-off send between machines that canβt see each other.
Restore on the new machine
Stop the fresh Hub install, then replace its data directory with the extracted one:
cihub downtar -xzvf hub-data.tar.gz -C /path/to/parent/of/data/rootStart Hub and verify
cihub up prod --detachedcihub statusYour installed apps should be listed. Open the dashboard and confirm a couple of them start.
After the move
- Re-apply host-specific configuration β shared folders, mount points, and firewall rules do not travel in the archive
- Check your network settings β the new machine has a different IP, so any manual DNS entries or port forwards need updating
- Re-pair with your CI Account if you use remote access; tunnel credentials are tied to the old device registration. See Device Pairing.
Donβt run both Hubs against the same CI Account registration at once. Stop the old machine for good, or reset its registration, before pairing the new one.