Setup Lisk SDK Proxy - liskcenterutrecht/lisk.bike GitHub Wiki
install nginx
sudo apt update
sudo apt install nginx
setup ufw
sudo ufw app list
sudo ufw allow 'Nginx Full'
sudo ufw allow OpenSSH
sudo ufw enable
sudo ufw status
curl -4 icanhazip.com -> external ip
-> check that http welcome page is working
setup certificate
sudo apt-get install python-certbot-nginx
sudo certbot --nginx -d brainz.lisk.bike
-> check that https welcome page is working
setup server block
-> remote proxy instellen for lisk blockchain
sudo nano /etc/nginx/sites-available/default
server_name brainz.lisk.bike; # managed by Certbot
location / {
# First attempt to serve request as file, then
# as directory, then fall back to displaying a 404.
# try_files $uri $uri/ =404;
proxy_pass http://localhost:4000;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection 'upgrade';
proxy_set_header Host $host;
proxy_cache_bypass $http_upgrade;
}
sudo nginx -t
sudo systemctl restart nginx
run blockchain at start
cd lisk.bike/blockchain
pm2 delete blockchain
pm2 --name blockchain start index.js
pm2 save
pm2 logs blockchain
reboot & test