DEV Community

Oğuzhan KARACABAY
Oğuzhan KARACABAY

Posted on

I built HostShift to migrate Linux servers

Hey everyone,

I change servers more often than I probably should. A discounted VPS or a good coupon is usually enough to convince me, but manually recreating the same web stack every time stopped being fun a long time ago.

That is why I built HostShift, an Apache-2.0 licensed Go CLI for discovering, planning, migrating, and verifying Ubuntu and Debian servers.

The rule I would not compromise on

The source server must remain read-only.

HostShift does not install packages, stop services, enable maintenance mode, create temporary archives, or change configuration on the source. It reads approved facts and streams data directly to the target. Any target mutation requires an explicit CLI apply command.

What it currently covers

  • Docker Compose projects and standalone containers
  • MySQL/MariaDB, PostgreSQL, and Redis
  • Nginx, Apache, Caddy, and systemd services
  • SSH and firewall configuration
  • PHP-FPM, Supervisor, Fail2ban, Certbot, and Logrotate
  • Migration planning, audit journals, status, resume, rollback metadata, and verification checks

The migration engine is deterministic Go code and does not need AI. I also added an optional Codex plugin and a deliberately non-apply MCP interface for discovery, planning, review, and dry runs. Actual changes stay in the human-operated CLI.

Testing real migrations

I did not want to call it tested just because a few unit tests passed. The repository includes Docker migration matrices and real Lima VM matrices covering Ubuntu 22.04, Ubuntu 24.04, Ubuntu 25.10, Debian 12, and Debian 13, including cross-distribution moves. The VM tests also reboot the target and verify persistence while comparing source snapshots before and after the migration.

The project is still new, so I expect real-world edge cases. I am sharing it now because feedback from people who actually move and maintain servers will be more useful than polishing it alone forever.

GitHub: https://github.com/oguzhankrcb/HostShift

Documentation: https://hostshift.karacabay.com

Top comments (0)