curl -sL https://deb.nodesource.com/setup_16.x | sudo -E bash -
sudo apt install nodejs
sudo apt install npm
Note
Make sure to change newtoken
to something else
sudo npm i pm2 -g
pm2 start "./wago -admintoken newtoken"
sudo ufw enable
sudo ufw status
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo apt install nginx
sudo nano /etc/nginx/sites-available/default
Add the following to the location part of the server block
Note
Make sure to change ENTER_YOUR_IP_OR_DOMAIN_HERE
to your IP or Domain
server_name ENTER_YOUR_IP_OR_DOMAIN_HERE;
location / {
proxy_pass http://localhost:1337;
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;
}
# Check NGINX config
sudo nginx -t
# Restart NGINX
sudo service nginx restart