Migrating a WordPress Blog from Ubuntu to FreeBSD Jails on Hetzner
Evaluate FreeBSD Jails for your hosting stack.
Evaluate FreeBSD Jails for your hosting stack.
Summary
The author migrated a long‑running WordPress blog from an Ubuntu 16.04 VPS in New York to a Hetzner virtual machine running FreeBSD 14.3, citing cost savings and better performance. Ubuntu 16.04 had reached end‑of‑life, leaving the server without security updates and exposing it to potential vulnerabilities. The new Hetzner VM offered double the memory and CPU for less than half the price, and the author also chose to move the entire stack to FreeBSD to experiment with its Jails virtualization. FreeBSD Jails provide kernel‑level isolation, allowing each site to run in its own sandbox with its own services, such as Caddy for reverse proxy. The author used Bastille, a jail management tool, to simplify jail creation, console access, and listing, and configured PF firewall rules to route traffic to the Caddy jail. A virtual network interface named bastille0 was set up to isolate jail traffic from the host, and NAT rules forwarded HTTP/HTTPS traffic to the internal IP of the Caddy server.
Key changes
- Migrated from Ubuntu 16.04 to FreeBSD 14.3 on Hetzner
- Used Bastille for jail management and simplified setup
- Configured PF firewall rules for traffic routing
- Set up virtual network interface bastille0 for isolation
- Ran Caddy in a jail as reverse proxy for all sites