Headscale Migration from CentOS 7 to Ubuntu 24

This guide covers the process of migrating a Headscale setup from a CentOS 7 system to Ubuntu 24, including steps for exporting configurations, database, and Docker images, as well as importing them on the new system.

1. Export Data and Image on CentOS 7

Export Configuration and Database

To begin, export the configuration and database files from the headscale container:

docker cp headscale:/etc/headscale/config.yaml ./config.yaml
docker cp headscale:/etc/headscale/db.sqlite ./db.sqlite

Export Docker Image

Use docker save to export the headscale Docker image:

docker save -o headscale_image_backup.tar headscale/headscale:0.23.0-beta1

2. Transfer Files to Ubuntu 24

Transfer the configuration, database, and image files to the Ubuntu 24 system using scp, rsync, or another file transfer tool:

scp config.yaml db.sqlite headscale_image_backup.tar user@ubuntu-server:/path/to/backup/

3. Import Data on Ubuntu 24

Load Docker Image

On the Ubuntu system, use docker load to import the Docker image:

docker load -i /path/to/backup/headscale_image_backup.tar

Create Headscale Container

Move the configuration and database files to /etc/headscale/ and create the container:

Read more →

Server setup process using Headscale with Docker.

Server setup process using Headscale with Docker.

记录采用headscale & docker 异地组网过程

需求背景

曾经我尝试使用ZeroTier,最初的体验非常不错。然而,随着时间的推移,我发现连接速度变得缓慢和卡顿, 有时甚至需要借助特殊的网络加速技术来提高性能。后来,在X社区中,我看到有人分享了Tailscale的好评, 这促使我安装了Tailscale的官方客户端。相较于ZeroTierTailscale在速度上有显著的提升, 尽管偶尔也会遇到一些延迟。Tailscale依赖于其官方服务器,但它支持用户自建服务器, 这一点非常吸引我。通过结合使用Tailscale客户端和官网,我们可以实现异地组网。 为了达到更理想的连接速度,我决定自建异地组网系统。这样不仅能控制家中的群晖设备,还能优化PT下载等功能。

Read more →