Running LP node (deprecated)
Instructions for setting up and running an atomiq LP node
Last updated
Instructions for setting up and running an atomiq LP node
Last updated
Linux based machine (such as Ubuntu), with public IP address
NodeJS (requires v18 or higher)
npm
Domain name (needed for obtaining SSL certificate for HTTPS)
Download latest version from or
Create a file ~/.bitcoin/bitcoin.conf
with the following content:
Run the bitcoind: bitcoind
Wait till bitcoind finishes with IBD (initial block download), your bitcoin node is downloading the whole bitcoin blockchain - this might take a while.
Create a new wallet in bitcoind: bitcoin-cli createwallet test true false "" false false true false
Create a file ~/.lnd/lnd.conf with the following content:
Run the lnd: lnd
Wait for the lnd to startup. It should then ask you to create a wallet.
Create a new wallet with: lncli create
Save password you used to create a wallet to ~/lnd-pass.txt
, this will be used to automatically open the wallet when lnd starts
Go into the newly created directory: cd BtcRelay-Sol-TS
Install npm packages: npm install
Install typescript: npm install -g typescript
Compile to javascript: tsc
Rename _MAINNET.env
to .env
: mv _MAINNET.env .env
Add the rpc username and password you used in bitcoin.conf
to the .env
file:
Generate new Solana wallet: npm run genKey
Deposit some SOL to the displayed wallet address, so relayer can cover Solana transaction fees (0.5 SOL should be enough for a year of operation).
Run the btcrelay node with: npm start
Setup your DNS so that your domain points to your server (with A record), you can get the IP address of your server with ifconfig
. Example from google domains:
SSL certificates are required for secure communication between swap clients and your node.
Install certbot, sudo apt update
and sudo apt install certbot
Make sure that the HTTP port is open in your firewall, on Ubuntu you can do this with: sudo ufw allow 80
Run certbot to obtain an SSL certificate for you: certbot certonly --standalone -d <your domain name>
(e.g.: certbot certonly --standalone -d node3.gethopa.com
)
Setup a cron job to automatically renew the certificates for you by editting your crontab crontab -e
and add the following line:
Go into the newly created directory: cd SolLightning-Intermediary-TS
Install necessary npm packages: npm install
Compile to javascript: tsc
Rename _MAINNET.env
to .env
: mv _MAINNET.env .env
Add the rpc username and password you used in bitcoin.conf
to the .env
file:
Get the lnd certificate by base64 --wrap=0 ~/.lnd/tls.cert
and copy the output to LN_CERT field in .env
file:
Get the admin macaroon by base64 --wrap=0 ~/.lnd/data/chain/bitcoin/testnet/admin.macaroon
and copy the output to LN_MACAROON field in .env
file:
Setup SSL key and certificate for the atomiq node by editting the .env
file:
Generate a new solana keypair: npm run genKey
Deposit some SOL to the displayed wallet address so your LP node can cover Solana transaction fees (0.5 SOL should be enough).
Be sure to open port 4000 in your firewall so it can be accessed from the outside, on ubuntu you can do this with: sudo ufw allow 4000
Run the atomiq node with: npm start
Generate a new bitcoin address lncli newaddress p2wkh
Send your BTC to the returned bitcoin wallet address
You can monitor your bitcoin balance with lncli walletbalance
Go to the atomiq node's directory (SolLightning-Intermediary-TS
)
Get your node's Solana address npm run getAddress
Send Solana assets to the returned Solana address (USDC, USDT & SOL is supported)
You can check current balance of assets in the Solana wallet address with: npm run getBalance
Deposit your Solana assets to the LP vault (do this for all of your Solana assets): npm run deposit <SOL/USDC/USDT> <amount to deposit>
You can check your deposited assets in the LP vault with: npm run getVaultBalance
COMING SOON!
Download latest version from or
Clone the BTCRelay repository from github: git clone
Clone the atomiq node repository from github: git clone
For the LP node to be choosen the clients need to know about this, for this purpose we maintain a .
To add your LP node to this public registry please in the repo - make sure to specify your node's domain name. atomiq.exchange team will then check if your node works as expected and will add it to the public registry ASAP.