Skip to content

Instantly share code, notes, and snippets.

@dev-AshishRanjan
Last active December 6, 2024 05:04
Show Gist options
  • Save dev-AshishRanjan/5f76046badedbad1135cd0af9fd0ee5a to your computer and use it in GitHub Desktop.
Save dev-AshishRanjan/5f76046badedbad1135cd0af9fd0ee5a to your computer and use it in GitHub Desktop.
Netdata setup : Netdata is a monitoring tool for vps
# update packages
sudo apt update
sudo apt upgrade
# install wget
sudo apt install wget
# install netdata
wget -O /tmp/netdata-kickstart.sh https://my-netdata.io/kickstart.sh && sh /tmp/netdata-kickstart.sh --stable-channel --disable-telemetry
# now netdata is running on http://localhost:19999 or on http://<vps_ip_address>:19999
# Install NGINX
sudo apt install nginx -y
# Configure NGINX as a reverse proxy for your application. Create and edit a new configuration file:
sudo nano /etc/nginx/sites-available/netdata.yourappname.com
# NGINX config
server {
listen 80;
server_name netdata.yourappname.com;
location / {
proxy_pass http://localhost:19999;
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 apt install certbot python3-certbot-nginx
sudo certbot --nginx -d netdata.yourappname.com
sudo nginx -t
sudo systemctl reload nginx
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment