Deploy BTCPayServer with Althash support
2) Deploy NBXplorer
wget https://packages.microsoft.com/config/ubuntu/20.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb
sudo apt-get update; \
sudo apt-get install -y apt-transport-https && \
sudo apt-get update && \
sudo apt-get install -y dotnet-sdk-6.0
screen -t nbxplorer -S nbxplorer
git clone https://github.com/dgarage/NBXplorer
cd NBXplorer/NBXplorer.Client/
dotnet build -c Release
mkdir ~/.nbxplorer
mkdir ~/.nbxplorer/Main
nano ~/.nbxplorer/Main/settings.config
html.rpc.url=http://127.0.0.1:4889/
html.rpc.auth=RPCUSERNAME:RPCPASSWORD
html.node.endpoint=127.0.0.1:4888
html.startheight=1600000
chains=html
verbose=1
bind=127.0.0.1
mainnet=1
cd ..
./build.sh
./run.sh
CTRL-a + CTRL-d to exit screen
3) Deply BTCPayServer with Althash support
screen -t btcpayserver -S btcpayserver
sudo apt install postgresql postgresql-contrib
sudo systemctl start postgresql.service
sudo -u postgres createuser --interactive
sudo -u postgres psql template1
ALTER USER postgres PASSWORD 'myPassword';
ALTER ROLE
ALTER USER myUser PASSWORD 'myPassword';
ALTER ROLE
\q
git clone https://github.com/btcpayserver/btcpayserver
cd btcpayserver
mkdir ~/.btcpayserver
mkdir ~/.btcpayserver/Main/
nano ~/.btcpayserver/Main/settings.config
network=mainnet
chains=html
# !!!NON PRODUCTION!!!
# sqlitefile=sqlite.db
# !!!PRODUCTION!!!
postgres=User ID=myUser;Password=myPassword;Host=localhost;Port=5432;Database=myDatabase;
HTML.explorer.url=http://127.0.0.1:24444/
HTML.explorer.cookiefile=/home/USER/.nbxplorer/Main/.cookie
dotnet build -c Altcoins-Release BTCPayServer/BTCPayServer.csproj
#!!!if MSBuild Error
export MSBUILDDISABLENODEREUSE=1
dotnet run --no-launch-profile --no-build -c Altcoins-Release -p "BTCPayServer/BTCPayServer.csproj"
CTRL a CTRL d to exit screen session
BTCPayServer with Althash support located at http://localhost:23000
Nginx sites-avail config:
root /home/USER/btcpayserver/BTCPayServer/wwwroot;
location / {
proxy_pass http://127.0.0.1:23000;
proxy_bind 127.0.0.1;
proxy_http_version 1.1;
proxy_set_header Connection $http_connection;
proxy_pass_request_headers on;
proxy_cache_bypass $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
}