Prepare Operating System
If you already have an available laptop/self-hosted node with an operating system, you can skip to Install Nodes section.
Once you've decided on a hardware/VPS and have login details. There's a bit of an infrastructure setup that's required to get the server production ready.
Note that there are always many ways to accomplish tasks and each sysadmin can have their own preference for tools, scripts and automation. This guide follows basic principles to help entry-level users.
One of the most important things when running a live production system with funds on it is to keep it secure. By following common principles and best practices you can ensure you're protected from most hack attempts and at least make it difficult for bad actors to infiltrate your systems.
Generate ssh keys so that you can only login to your server with keys and never a clear-text password.
Add your public key to authorized_keys on the server
echo 'public key from previous step' >> ~/.ssh/authorized_keys
Disable password based login on the server and restart sshd
// once configuration is updated restart sshd
systemctl restart sshd
Your server should only have ports open that are crucial to the functioning of your nodes and your bridge.
sudo apt install ufw
Allow ports that are required for Bitcoin/Lightning nodes and client app.
ufw allow ssh
ufw allow 8333
ufw allow 9735
ufw allow 9008
ufw allow 9009
// if your BTC/LND is on linux but lnstxbridge client is on Docker
ufw allow from 220.127.116.11/8 to any port 8332
ufw allow from 18.104.22.168/8 to any port 10009
sudo apt-get update
sudo apt-get install \
curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
"deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] https://download.docker.com/linux/debian \
$(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
sudo apt-get update
sudo apt-get install docker-ce docker-ce-cli containerd.io