In this tutorial, we'll learn how to install phpIPAM Network Inventory on Ubuntu 24.04.
Managing IP addresses in growing networks becomes overwhelming without a proper system. That's where phpIPAM, an open-source IP Address Management (IPAM) tool, comes in. It helps us automate subnet management, monitor IP usage, and build a centralized network inventory.
In this step-by-step guide, we’ll walk through installing and configuring phpIPAM on Ubuntu 24.04, using the latest packages and best practices. This tutorial is crafted for IT teams, system admins, and network engineers looking to build scalable and reliable IP address management infrastructure.
Prerequisites
Before we begin, let’s ensure our environment meets the following requirements:
- A Ubuntu 24.04 installed dedicated server or KVM VPS.
- A non-root user with sudo privileges.
- Basic knowledge of using the terminal.
- A domain name pointing to server IP.
How to Install phpIPAM on Ubuntu 24.04 (Step-by-Step IP Address Management Guide)
Step 1: Update Ubuntu System
We begin by ensuring our server is up-to-date:
sudo apt update && sudo apt upgrade -y
This keeps our system secure and ensures compatibility with recent software dependencies.
Step 2: Install Apache, PHP, and Required Modules
phpIPAM runs on a LAMP stack. First, install Apache and PHP 8.3 (Ubuntu 24.04 includes PHP 8.3 by default):
sudo apt install apache2 php php-cli php-mysqli php-gmp php-mbstring php-gd php-xml php-intl php-curl php-zip php-bcmath libapache2-mod-php php-pear -y
These PHP modules are required for proper functionality of phpIPAM.
Enable the Apache rewrite module:
sudo a2enmod rewrite
Restart Apache:
sudo systemctl restart apache2
Step 3: Install and Configure MariaDB Server
phpIPAM uses a database to store all network data. We'll use MariaDB, the drop-in replacement for MySQL.
sudo apt install mariadb-server -y
Secure the installation:
sudo mysql_secure_installation
Follow the prompts:
- Set a root password
- Remove anonymous users
- Disallow remote root login
- Remove test database
- Reload privilege tables
Step 4: Create Database for phpIPAM
Login to MariaDB shell:
sudo mysql -u root -p
Create a database and user for phpIPAM:
CREATE DATABASE phpipam;
CREATE USER 'phpipamuser'@'localhost' IDENTIFIED BY 'strong_password_here';
GRANT ALL PRIVILEGES ON phpipam.* TO 'phpipamuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
Make sure to replace 'strong_password_here
' with a secure password.
Step 5: Download phpIPAM from GitHub
Navigate to the web directory and clone the latest phpIPAM version:
cd /var/www/html
sudo git clone https://github.com/phpipam/phpipam.git
Set the proper permissions:
sudo chown -R www-data:www-data /var/www/html/phpipam
Step 6: Configure Apache Virtual Host
We configure Apache to serve phpIPAM properly.
Create a new virtual host file:
sudo nano /etc/apache2/sites-available/phpipam.conf
Add the following configuration:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/phpipam
ServerName example.com
<Directory /var/www/html/phpipam>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/phpipam_error.log
CustomLog ${APACHE_LOG_DIR}/phpipam_access.log combined
</VirtualHost>
Enable the site and reload Apache:
sudo a2ensite phpipam.conf
sudo systemctl reload apache2
Step 7: Import Database Schema
phpIPAM comes with a ready-to-use SQL schema.
cd /var/www/html/phpipam
mysql -u phpipamuser -p phpipam < db/SCHEMA.sql
Enter the password you set earlier when prompted.
Step 8: Configure phpIPAM
Copy the sample configuration:
cd /var/www/html/phpipam
cp config.dist.php config.php
Edit the config file:
sudo nano config.php
Update database connection settings:
$disable_installer = true;
$db['host'] = 'localhost';
$db['user'] = 'phpipamuser';
$db['pass'] = 'strong_password_here';
$db['name'] = 'phpipam';
Save and close the file.
Step 9: Secure phpIPAM with HTTPS (Optional but Recommended)
To enable HTTPS with Let’s Encrypt:
sudo apt install certbot python3-certbot-apache -y
sudo certbot --apache -d example.com
Step 10: Finalize Installation via Web Interface
Now open your browser and visit:
https://example.com
You will get the login page. Default Admin Login Credentials
Username: admin
Password: ipamadmin
Once done, you’ll enter the dashboard where you can start creating sections, subnets, VLANs, and manage IP resources.
Follow the prompts to secure the site. If you're on a local machine, you may need to set up a valid DNS name and use a self-signed certificate instead.
Summary
By following this guide, we've built a fully functioning IP address management system on Ubuntu 24.04 using phpIPAM. It helps us keep track of subnets, discover active hosts, manage VLANs, automate scans, and much more — all through a user-friendly web interface.
Whether we’re managing internal infrastructure or building networks for clients, phpIPAM offers the reliability and scalability we need for professional IP address organization.
Let’s continue simplifying our network operations with the right open-source tools.