Post

Built My Own Dashboard Almost By Accident

Welcome to this comprehensive guide where well share our journey of building a custom dashboard for infrastructure management. This project started as an ini....

# Built My Own Dashboard Almost By Accident

Welcome to this comprehensive guide where we’ll share our journey of building a custom dashboard for infrastructure management. This project started as an initiative to create an always-on computer for file access and backup purposes, but it evolved into something much more—a self-hosted dashboard tailored to meet specific needs.

In this post, you will learn how to set up, configure, and operate your custom dashboard focusing on monitoring, automation, and reporting. This guide is essential for anyone with a homelab or self-hosted environments who wishes to streamline their system administration tasks. Let’s dive in!

Prerequisites

To get started, you will need the following:

  • Operating System: Ubuntu Server 20.04 LTS (Focal Fossa) or CentOS 8 Stream
  • Hardware: Minimum of 4GB RAM and 64-bit architecture
  • Network Requirements: Static IP address, port forwarding for remote access
  • Firewall Configuration: Open ports required by the software you will install (e.g., SSH, HTTP/HTTPS)
  • User Permissions: SuDoer user with appropriate access levels

Installation & Setup

1. Install Nginx web server:

1
sudo apt update && sudo apt install nginx -y

2. Install Node.js and npm:

1
2
curl -sL https://deb.nodesource.com/setup_14.x | bash -
sudo apt install nodejs npm -y

Configuration

Configure the Nginx server block for your dashboard application by creating a new file at /etc/nginx/sites-available/dashboard. Here’s an example:

1
2
3
4
5
6
7
8
9
10
11
12
server {
    listen 80;
    server_name <your_domain>;
    location / {
        proxy_pass http://localhost:3000;
        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;
    }
}

Don’t forget to enable and start the Nginx configuration:

1
2
sudo ln -s /etc/nginx/sites-available/dashboard /etc/nginx/sites-enabled/
sudo systemctl restart nginx

Usage & Operations

To create a simple dashboard using Node.js and Express.js, follow the tutorial from the official Express.js documentation. After that, deploy your application by running npm start in the project directory.

Conclusion

By following this guide, you’ve built a custom dashboard for infrastructure management, transforming an initial file access and backup computer into a powerful monitoring and automation tool. Keep exploring advanced topics such as integrating third-party plugins or building custom dashboards using Grafana and InfluxDB to take your dashboard experience to the next level!

For further learning resources, check out these links:

  1. Nginx Documentation
  2. Node.js & Express.js Documentation
  3. Grafana & InfluxDB Integration Guide
This post is licensed under CC BY 4.0 by the author.