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 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 Binance chain) on Staking portal: => https://timelock.swingby.network​

    For more details about "staking", let's see here πŸ‘‡

Why 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 ssh_key
Generating public/private rsa key pair.
Enter passphrase (empty for no passphrase): <- (should be empty)
​

There are 2 files are generated on your local machine.

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

  • ./data/ssh_key.pub <- (this is a 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 with your local_infura ) local_infura means your node will be connected to self-hosting Geth (BSC) and 2 blockbooks containers, therefore, your server has to total 6 containers running. (bitcoind, geth/bsc, blockbook-btc, blockbook-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 [email protected]<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.

Example of Docker for MAC OSX

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 move out your telegram BOT to your server

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