โRunning LP node (deprecated)
Instructions for setting up and running an atomiq LP node
Pre-requisites
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)
Installation
bitcoind
Download latest version from here or build from source
Create a file
~/.bitcoin/bitcoin.conf
with the following content:
server=1
whitelist=127.0.0.1
txindex=1
irc=1
upnp=0
rpcallowip=127.0.0.1
rpcbind=127.0.0.1
rpcport=8332
rpcuser=<rpc username>
rpcpassword=<rpc password>
zmqpubrawtx=tcp://127.0.0.1:39332
zmqpubrawblock=tcp://127.0.0.1:39331
zmqpubhashblock=tcp://127.0.0.1:39332
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
lnd
Download latest version from here or build from source
Create a file ~/.lnd/lnd.conf with the following content:
[Application Options]
tlsextraip=127.0.0.1
minchansize=25000
sync-freelist=1
# Avoid high startup overhead
stagger-initial-reconnect=1
healthcheck.chainbackend.attempts=0
wallet-unlock-password-file=~/lnd-pass.txt
[bolt]
db.bolt.auto-compact=true
[protocol]
# Enable large channels support
protocol.wumbo-channels=1
[routing]
# Remove channels from graph that have one side that hasn't made announcements
routing.strictgraphpruning=1
[Bitcoin]
bitcoin.active=1
bitcoin.node=bitcoind
bitcoin.testnet=1
[Bitcoind]
bitcoind.rpchost=127.0.0.1:8332
bitcoind.rpcuser=<username from bitcoin.conf>
bitcoind.rpcpass=<password from bitcoin.conf>
bitcoind.zmqpubrawblock=tcp://127.0.0.1:39331
bitcoind.zmqpubrawtx=tcp://127.0.0.1:39332
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
BTCRelay & Watchtower
Clone the BTCRelay repository from github:
git clone
https://github.com/adambor/BtcRelay-Sol-TS
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:
BTC_RPC_USERNAME="<username from bitcoin.conf>"
BTC_RPC_PASSWORD="<password from bitcoin.conf>"
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
DNS Setup
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:

Getting SSL certificates
SSL certificates are required for secure communication between swap clients and your node.
Install certbot,
sudo apt update
andsudo 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:
0 0 1 * * certbot renew
atomiq node
Clone the atomiq node repository from github:
git clone
https://github.com/adambor/SolLightning-Intermediary-TS
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:
BTC_RPC_USERNAME="<username from bitcoin.conf>"
BTC_RPC_PASSWORD="<password from bitcoin.conf>"
Get the lnd certificate by
base64 --wrap=0 ~/.lnd/tls.cert
and copy the output to LN_CERT field in.env
file:
LN_CERT="<output of the above command>"
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:
LN_MACAROON="<output of the above command>"
Setup SSL key and certificate for the atomiq node by editting the
.env
file:
SSL_KEY="/etc/letsencrypt/live/<your domain name>/privkey.pem"
SSL_CERT="/etc/letsencrypt/live/<your domain name>/fullchain.pem"
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
Depositing assets
Bitcoin
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
Solana
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
Opening Lightning network channels
COMING SOON!
Adding LP node to public registry
For the LP node to be choosen the clients need to know about this, for this purpose we maintain a registry of LP nodes on github.
To add your LP node to this public registry please open an issue 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.
Last updated