Eles

Eles

Nothing is true

Build your own Zerotier to make use of idle servers

Why am I doing this:#

  1. I like to use vscode remote ssh to connect to cloud services for development servers.
  2. My cloud service configuration is low (2C2G), and when doing front-end development, the high disk IO can cause the cloud server to crash.
  3. I have a relatively high-spec idle laptop (I5 12400 18G).
  4. The company can access the external network and has uninterrupted power supply.

How to do it:#

  1. Install your favorite Linux distribution on the laptop (I installed Ubuntu 22.04, remember to choose minimal installation, do not select updates, enable lvm, skip Ubuntu Pro), and place it in the company.
  2. Self-build Zerotier on the cloud server.
  3. All devices join the Zerotier network as Leaf nodes.

What it looks like#

image
image
All devices are interconnected to achieve remote access to high-performance workstations.

How to set up#

Refer to this repository:
https://github.com/xubiaolin/docker-zerotier-planet

Enable Ubuntu ssh#

apt install openssh-server
vi /etc/ssh/sshd_config
# Modify the port and PermitRootLogin yes
sudo systemctl restart sshd
sudo systemctl enable sshd

Prevent the laptop from sleeping when the lid is closed:#

vi /etc/systemd/logind.conf
HandleLidSwitch=ignore
service systemd-logind restart

Operations and Maintenance#

https://docs.zerotier.com/config
By default, the ZeroTier API can only be accessed locally. You need to configure local.conf to allow access from other locations. Simply create a new file in the container:
image
I have created a simple node offline email notification using the API:
https://github.com/Etuloser/ZeroTier-Monitor

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.