githubEdit

Node Deployment

Server Configuration

It is recommended to use Ubuntu 20 and above or CentOS 8 and above, and ensure a stable public IPv4 connection.

  • CPU: 2 Cores

  • Memory: 4 GB

  • Storage: 40 GB

Quick Deployment

# Log in to the remote server
ssh [email protected]
# See below for environment variable configuration requirements
export NEXUS_CONFIG_HOST=http://<Your-Server-IP>:28610
export NEXUS_CONFIG_BTC_ADDRESS=tb1qmlp2ghv2xfv6h2ypmg9gt58uhmegse6c3tyhzq
export NEXUS_CONFIG_BTC_PRIVATE_KEY=853ac0c5ba7f629c20a8df8a86ae98e18a47c1262502e8a6ad0d074f3c2cf1af
export NEXUS_CONFIG_ETH_ADDRESS=0xfcee6a01ab86479aa18ed2c46dd0da8a16863a2c
export NEXUS_CONFIG_ETH_PRIVATE_KEY=18324232f8f131fac4025d79d8c458baacada677d2737462d47c6367e2ad93e4

curl -fsSL https://get.docker.com | bash -s docker
curl -fsSL https://images.hodlfi.app/hodlfi_dex/docker-compose-publictest.yml | docker compose -p hodlfi-dex -f - up --wait --force-recreate
circle-info

Remember to use your own address/private key/mnemonics

Manual Deployment

Docker Installation

The recommended way to deploy Hodlfi Nexus is using Docker. To install Docker, please refer to Docker's Installation Guidearrow-up-right. For questions regarding Docker installation, please refer to Docker's Troubleshooting Guidearrow-up-right.

Get Deployment Script

Download the publictest configuration file docker-compose.yml from HODLFIarrow-up-right.

Environment Variable Configuration

Before running Nexus, you need to modify the following environment variables in docker-compose.yml:

  • NEXUS_CONFIG_HOST: The host or public endpoint where the Nexus service runs.

  • NEXUS_CONFIG_BTC_ADDRESS: The Bitcoin address used for sending and receiving BTC transactions.

  • NEXUS_CONFIG_BTC_PRIVATE_KEY: The private key corresponding to the Bitcoin address, used for withdraw BTC in the Nexus service.

  • NEXUS_CONFIG_ETH_ADDRESS: The Ethereum address used for sending and receiving ETH Transaction.

  • NEXUS_CONFIG_ETH_PRIVATE_KEY: The private key corresponding to the Ethereum address, used for signing ETH transactions.

Configuration Example

Pay attention to the indentation level of the YAML configuration to ensure it is correct. If the value of a configuration item is a multi-line string, use | or > correctly to maintain the format and follow YAML's indentation rules.

Start Service

Check the docker-compose version; it needs to be greater than 1.21.0.

Execute the following command in the terminal to start Hodlfi Nexus:

Access Service

After successful startup, you can access it via http://:28610arrow-up-right.

Security Operations

Security Hardening

After you have confirmed that your node is deployed and running stably, you must perform the following critical step:

  • Remove SSH Access Rule: Return to your firewall settings and delete or disable the rule allowing SSH (port 22) access that you created in Stage 1.

  • How to manage the server after closing SSH? You will no longer connect via public SSH. Instead, you should rely exclusively on the secure, in-browser management tools provided by your cloud provider (e.g., AWS Session Manager, Linode Lish Console), which is the industry-recommended best practice.

triangle-exclamation

Last updated