Install StatsDactyl
Warning: StatsDactyl has been archived on Sep 16, 2023. Expect no updates will be pushed.
StatsDactyl is a self-hosted statistics for your Pterodactyl. This displays the statistics of your Pterodactyl panel such as Users count, and Nodes count. StatsDactyl also come with a built-in Uptime Monitor which shows if your VPS or Server is online by pinging the host.
Install dependencies
sudo apt install -y python3 python3-pip nginx certbot python3-certbot-nginx
Download files
mkdir /var/www/statsdactyl
cd /var/www/statsdactyl
curl -Lo statsdactyl.tar.gz https://github.com/rhylso/statsdactyl/releases/latest/download/statsdactyl.tar.gz
tar -xzvf statsdactyl.tar.gz
Configure StatsDactyl
Use nano
to edit config.yml
nano config.yml
config.yml
# statsdactyl
title: 'StatsDactyl'
panel_url: 'your_panel_url'
api_key: 'your_api_key'
alert: 'You successfully installed StatsDactyl!'
debug: true
port: 5000
# uptime monitor
monitor:
monitor1:
name: 'monitor1'
hostname: 'google.com'
monitor2:
name: 'monitor2'
hostname: 'cloudflare.com'
Install pip packages
pip install -r requirements.txt
Create a Worker
Create a statsdactyl.service
in /etc/systemd/system
statsdactyl.service
[Unit]
Description=Statsdactyl Service
After=multi-user.target
[Service]
Type=simple
Restart=always
WorkingDirectory=/var/www/statsdactyl
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
ExecStart=/usr/bin/python3 /var/www/statsdactyl/app.py
[Install]
WantedBy=multi-user.target
Run this command after:
sudo systemctl start statsdactyl.service
SSL
Use certbot to create a certificate:
sudo certbot --nginx -d <domain>
Configuring the Webserver
Create a statsdactyl.conf
in /etc/nginx/sites-available
server {
listen 80;
server_name <domain>;
return 301 https://$server_name$request_uri;
}
server {
listen 443 ssl;
server_name <domain>;
ssl_certificate /etc/letsencrypt/live/<domain>/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/<domain>/privkey.pem;
ssl_trusted_certificate /etc/letsencrypt/live/<domain>/chain.pem;
location / {
proxy_set_header X-Forwarded-For $remote_addr;
proxy_set_header Host $http_host;
proxy_pass http://0.0.0.0:5000;
}
}
After that, run this command:
sudo ln -s /etc/nginx/sites-available/statsdactyl.conf /etc/nginx/sites-enabled/
sudo systemctl restart nginx
Congratulations 🥳! You have successfully installed StatsDactyl. You can now access StatsDactyl to the domain you specified.