How to Install Observium on nixOS Latest

Step 1: Update the System

Before starting the installation of Observium on nixOS, it is essential to update the system. Use the following command to update your nixOS system:

sudo nixos-rebuild switch

Step 2: Install Required Dependencies

Observium required various dependencies to run successfully on the system. Use the following command to install required dependencies:

sudo nix-env -i apache24 php php-pear php-fpm php-opcache php-gd php-mysql php-curl php-json php-xml snmp fping git composer

Step 3: Download and Install Observium

To install Observium, you first need to download it. Use the following commands for the same:

git clone https://github.com/observium/observium.git /opt/observium
cd /opt/observium

After downloading, use the following command to install Observium:

sudo composer update --no-dev

The above command can take some time to complete. Kindly wait for it to complete the installation.

Step 4: Configure Observium

Once the installation is completed, you need to configure Observium. Use the following command to begin the configuration process:

sudo cp /opt/observium/config.php.default /opt/observium/config.php

Next, edit the config file with the following command:

sudo nano /opt/observium/config.php

Find the database configuration section and enter the details of the database, username, and password for Observium to connect with the database. Once you have made the required changes, save and exit the file.

Step 5: Configure Apache

In this step, we will configure Apache to host the Observium web GUI. Begin by creating a virtual host file for Observium.

sudo nano /etc/apache2/vhosts.d/observium.conf

Add the following configuration to the newly created file:

<VirtualHost *:80>
  DocumentRoot /opt/observium/html/
  ServerName observium.local
  CustomLog /var/log/apache2/access.log combined
  ErrorLog /var/log/apache2/error.log
  AllowEncodedSlashes NoDecode
  <Directory /opt/observium/html/>
    Options FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
  </Directory>
</VirtualHost>

Save and close the file.

Step 6: Start Apache and Observium Services

Use the following command to start the Apache and Observium services:

sudo systemctl start apache2
sudo /opt/observium/discovery.php -u
sudo /opt/observium/discovery.php -h all
sudo systemctl start php-fpm

Step 7: Access Observium from Browser

Observium is now installed and running successfully on your nixOS system. You can access it by opening a web browser and typing the following URL in the address bar:

http://nixos-ip-address/

Replace "nixos-ip-address" with the IP address of your nixOS system.

That's it. You have successfully installed and configured Observium on nixOS Latest. Enjoy monitoring your network with Observium!

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!

Alternatively, for the best virtual desktop, try Shells!