With this repository you can easily install your own node as an alternative to using opago's node as a service. Tested with a minimal Debian 11 install. The intended use is for running this in clearnet hybrid mode, with a domain and apropriate subdomains available. This is a work in progresss, so use with care.
sudo apt update
sudo apt install -y ufw curl nano git fail2ban
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw allow 9735
sudo ufw enable
change IPV6=yes to IPV6=no
sudo nano /etc/default/ufw
curl -fsSL https://get.docker.com | sh
sudo usermod -aG docker $USER
newgrp docker
docker run hello-world
sudo curl -L "https://github.com/docker/compose/releases/download/v2.0.1/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose
sudo chmod +x /usr/local/bin/docker-compose
git clone https://github.com/Opago-Pay/OpagoNode/
cd OpagoNode
change domains in docker-compose to your own domain, make sure that the subdomains are created and pointed to your node's host ip
nano docker-compose.yml
change domains, tor password etc in lnd.conf
nano ./lnd/lnd.conf
nano ./lnd/password.txt
Hash your tor password, replace "password" with your password from the lnd.conf Be carefull, certain special characters can lead to a failure of the command, "" will be included in the hash, so you'd need to add them to the tor password in lnd.conf as well.
docker-compose up -d
docker exec -it tor tor --hash-password password
Copy the hash the above command returns and add it to your torrc.default
nano ./tor/torrc.default
docker restart tor
It's really important that you set the same password here as in the password.txt and that you store the 24 words returned by the command. Without these you cannot recover your wallet if anything goes wrong.
docker exec -it lnd lncli create
docker-compose up -d
docker logs -f btc
docker-compose down
If you don't want to use our docker containers, you can build them yourself. To do so cd into each build directory and run the docker build command with your desired tag, example below
docker build -t opago/bitcoin:latest .
docker push opago/bitcoin:latest
Then change the images in docker-compose.yml to your image tag. P.S. If you are not logged into the docker repo that you are trying to build for, the push command will give you an error. You can solve this by running.
docker login
If your node is storage constrained, just use it without BTC. To do so, just replace the docker-compose.yml. Do this before first starting the node.
mv docker-compose-no-btc.yml docker-compose.yml