How to Install Hubleys on Manjaro

Hubleys is an open-source dashboard that allows you to monitor various aspects of your server, website or application. In this markdown tutorial, we will guide you through the installation process of Hubleys on Manjaro.

Prerequisites

Before installing Hubleys, make sure that your Manjaro system is up to date by running the following commands:

# update package database
sudo pacman -Syy

# upgrade packages
sudo pacman -Syu

Also, ensure that you have Git installed on your system.

# Install Git
sudo pacman -S git

Install Dependencies

Hubleys depends on several packages and libraries, some of which may not be installed by default on Manjaro. To install the required packages, run the following command in the terminal:

sudo pacman -S python-pip python-virtualenv python-wheel libpqxx

Clone the Repository

The next step is to clone the Hubleys repository from GitHub. To do this, open your terminal and type:

git clone https://github.com/knrdl/hubleys-dashboard.git

This will create a new directory called hubleys-dashboard that contains all the necessary files.

Create a Virtual Environment

It is a good practice to create a virtual environment to isolate the dependencies of different projects. Here, we will create a new virtual environment for Hubleys.

# Change into the hubleys-dashboard directory
cd hubleys-dashboard

# Create a new virtual environment 
virtualenv env

Activate the Virtual Environment

After creating the virtual environment, it needs to be activated before installing the required packages.

# Activate the virtual environment
source env/bin/activate

Install Required Packages

Now, we will install the required packages for Hubleys

pip install -r requirements.txt

Configure the Database

Hubleys requires a database to store its configuration and data. Here we will use PostgreSQL as our database. Run the following command to install PostgreSQL:

sudo pacman -S postgresql

After installing PostgresSQL, create a new database and a user by running the following commands:

sudo -u postgres createdb hubleysdb
sudo -u postgres createuser hubleysuser

Next, we will grant permissions to the new user on the database:

sudo -u postgres psql
ALTER USER hubleysuser WITH ENCRYPTED PASSWORD 'password';
GRANT ALL PRIVILEGES ON DATABASE hubleysdb TO hubleysuser;
\q

Replace 'password' with a secure, unique password.

Setup Hubleys Configuration

The next step is to create a configuration file for Hubleys. Copy the sample configuration file and edit it to match your environment:

cp config.sample.cfg config.cfg

Next, open the config.cfg file in your favorite text editor and add the following information:

DEBUG=True
SECRET_KEY=<secret_key>
SQLALCHEMY_TRACK_MODIFICATIONS=False
SQLALCHEMY_DATABASE_URI='postgresql://hubleysuser:password@localhost/hubleysdb'

Replace <secret_key> with a long, random string of characters.

Create Database Tables

After configuring Hubleys, it is time to create the necessary tables in the database:

# Activate the virtual environment
source env/bin/activate

# Create database tables
python manage.py create_db

Start Hubleys

The final step is to start the Hubleys server:

# Start Hubleys server
python manage.py runserver

You can now access the Hubleys dashboard by visiting http://localhost:5000 in your web browser.

Congratulations! You have successfully installed Hubleys on Manjaro.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!