Node on Hetzner server

A guide for installing your Swingby node on Hetzner dedicated servers.

Getting Started guide to deploy Swingby Nodes in the Hetzner server

  1. Create your Hetzner account and Order an AX-61-NVMe server

  2. Setup your telegram BOT with the following this readme: => https://github.com/SwingbyProtocol/node-installer

  3. Install your telegram BOT to your AX-61-NVMe server.

  4. Bonding your Swingby Tokens on the DAO portal: => https://dao.swingby.network

Why did we choose the Hetzner server? The Hetzner Cloud is one of the most cost-effective servers for running swingby nodes in your local infrastructure package. I have a root user who has RSA key authentication as a bootstrap. Disk mounts are basically mounted at / (root). Basically, telegram BOT uses root to connect to the server, so this choice is much easier than other cloud services.

Step 1. Generate your SSH private key [on local machine]

$ git clone https://github.com/SwingbyProtocol/node-installer && cd node-installer
$ ssh-keygen -t rsa -b 4096 -f ./data/ssh_key   
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): <- (should be empty)

There are 2 files generated on your local machine.

  • ./data/ssh_key <- (this is an SSH Private key, it should be backed up)

  • ./data/ssh_key.pub <- (this is an SSH Pubkey for access to your server)

Also, you have to grant permissions with this command.

$ chmod 600 ./data/ssh_key   

Step 2. Order your Hetzner account and Order an AX-61-NVMe server

AX-61 NVMe has a 1.92TB disk (RAID1), The Swingby node requires 1.3TB for the BTC-ETH bridge, 1.4TB for the BTC-BSC bridge (full installation using your local_infura ) local_infura means your node will be connected to self-hosting Geth (BSC) and 2 block-books containers, therefore, your server has to total of 6 containers running. (Bitcoind, geth/BSC, block-book-BTC, block-book-eth/BSC, swingby node)

Step 3. Setup your Server with your generated SSH public key

  • You can put ./data/ssh_key.pub file texts into the server setup interface.

Step 4. Make a new directory on your server [on your server]

  • you have to make a new directory

    • /var/swingby

$ ssh -i ./data/ssh_key root@<YOUR_SERVER_IP> "mkdir /var/swingby" 

Step 5. Setup your telegram BOT [on local machine]

  • (Prerequisite: you have to create a telegram BOT via the @Botfather and obtain a BOT_TOKEN. Here's a tutorial)

  • COPY and PASTE to your command line like this

$ export BOT_TOKEN=1716737416:ACEoPHFFlCAGiD2xGQl3Zk_wCoOD9P3Igk0

Step 6. Install Docker to your local machine

Install Docker from https://docker.io to your local machine.

Step 7. Run your telegram BOT on your [on local machine]

$ chmod +x scripts/install.sh && scripts/install.sh

Step 8. Talk to your telegram BOT with /start

Step 9. Set your IP address and login username

  • Hetzner cloud always uses root to log in via SSH session. then, your can going forward with type 'none'

Step 10. Install your telegram BOT to your server

  • /setup_your_bot

    • This command will start the process of moving out your telegram BOT to your server

Finally, you are ready to install on the Swingby node!!

Step 11. Setup your node with /setup_node

  • you can set up your node with the telegram chat command /setup_node

You have to obtain node P2PKey to stake your ERC20 SWINGBY (you can get the latest p2pkey with /show_p2pkey command after setup your node

Example: fdb87518cfcf762f4a43596c0fd9d28858f68e73e30cf7414fb2a3d9e8fb346c

it will be used on this:

Step 12. Install your local_infura with /deploy_infura

  • you can set up your local_infura with the telegram chat command /deploy_infura

  • it will take 1-2 days to be synced up your all local_infura.

Step 13. Deploy your node with /deploy_node

  • After you have installed local_infura, you can check the current status with /check_status

  • with 100% synced. you are able to deploy your node with /deploy_node

Last updated