Atlantic.Net Blog

How to Install phpIPAM on Arch Linux

phpIPAM is a free, open-source, lightweight, and modern IP address monitoring tool for system and network administrators. It uses MySQL as a database system and is written in PHP, jQuery libraries, Ajax, and HTML5/CSS3. phpIPAM gives you a real-time inventory of both used and unassigned IP addresses with other details like subnets, status, hostname, and more.

In this post, we will show you how to install phpIPAM with Nginx on Arch Linux.


  • A fresh Arch Linux server on the Atlantic.Net Cloud Platform
  • A root password configured on your server

Step 1 – Create Atlantic.Net Cloud Server

First, log in to your Atlantic.Net Cloud Server. Create a new server, choosing Arch Linux as the operating system with at least 2GB RAM. Connect to your Cloud Server via SSH and log in using the credentials highlighted at the top of the page.

Step 2 – Configure Repository

By default, the default repository is outdated in Arch Linux, so you will need to modify the default mirror list. You can do it by editing the mirror list configuration file:

nano  /etc/pacman.d/mirrorlist

Remove all lines and add the following lines:

## Score: 0.7, United States
Server =$repo/os/$arch
## Score: 0.8, United States
Server =$repo/os/$arch
Server =$repo/os/$arch
## Score: 0.9, United Kingdom
Server =$repo/os/$arch
## Score: 1.5, United Kingdom
Server =$repo/os/$arch
Server =$repo/os/$arch
## Score: 6.6, United States
Server =$repo/os/$arch
## Score: 6.7, United States
Server =$repo/os/$arch
## Score: 6.8, United States
Server =$repo/os/$arch
## Score: 7.1, India
Server =$repo/os/$arch
## Score: 10.1, United States
Server =$repo/os/$arch

Save and close the file, then update all the package indexes with the following command:

pacman -Syu

Step 3 – Install Nginx

By default, the Nginx package is included in the Arch Linux default repository. You can install it with the following command.

pacman -S nginx-mainline

After installing Nginx, start and enable the Nginx service using the following command.

systemctl start nginx
systemctl enable nginx

Step 4 – Install and Configure PHP

phpIPAM is a PHP-based application, so you will also need to install PHP and other extensions to your server. You can install all of them using the following command.

pacman -S php php-fpm php-gd unzip

Next, you will also need to install the Pear PHP extension to your system. You can download and install it with the following command.

php go-pear.phar

Next, edit the PHP configuration file and enable all the required PHP extensions.

nano /etc/php.ini

Add/modify the following lines.


Save and close the file, then start the PHP-FPM service and enable it to start at system reboot.

systemctl start php-fpm
systemctl enable php-fpm

Step 5 – Install and Configure MariaDB Database

Next, you will need to install the MariaDB database on your system. You can install it with the following command.

pacman -S mariadb

Once the MariaDB server is installed, initialize the MariaDB database with the following command.

mysql_install_db --user=mysql --basedir=/usr --datadir=/var/lib/mysql

Next, start and enable the MariaDB service using the following command.

systemctl start mysqld
systemctl enable mysqld

Next, connect to the MariaDB shell:


Next, create a database and user for phpIPAM using the following command.

GRANT ALL ON phpipam.* TO [email protected] IDENTIFIED BY 'password';

Next, exit from the MariaDB with the following command.


Step 6 – Install phpIPAM

First, download the latest version of phpIPAM to the Nginx root directory.

mkdir /var/www/html
git clone --recursive /var/www/html/phpipam

Next, navigate to the phpipam directory and copy the sample configuration file.

cd /var/www/html/phpipam
cp config.dist.php config.php

Next, edit the configuration file.

nano config.php

Add the following line:


Define your database settings:

* database connection details
$db['host'] = 'localhost';
$db['user'] = 'phpipam';
$db['pass'] = 'password';
$db['name'] = 'phpipam';
$db['port'] = 3306;

Save and close the file, then import the phpIPAM database.

cd /var/www/html/phpipam
mysql -u root -p phpipam < db/SCHEMA.sql

Next, change the ownership of the phpipam directory.

chown -R http:http /var/www/html/phpipam

Step 7 – Configure Nginx for phpIPAM

Next, you will need to create an Nginx virtual host configuration file to serve phpIPAM.

First, create a directory to store the Nginx virtual host.

mkdir /etc/nginx/sites-enabled

Next, create an Nginx configuration file for phpIPAM.

nano /etc/nginx/sites-enabled/phpipam.conf

Add the following configuration.

server {
    listen       80;
    # root directory
    index        index.php;
    root   /var/www/html/phpipam;

    location / {
            try_files $uri $uri/ /index.php$is_args$args;

    location ~ \.php$ {
            try_files $uri =404;
            fastcgi_split_path_info ^(.+\.php)(/.+)$;
             fastcgi_pass   unix:/run/php-fpm/php-fpm.sock;
            fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
            fastcgi_index index.php;
            include fastcgi_params;


Save the file, then edit the Nginx main configuration file.

nano /etc/nginx/nginx.conf

Add the following lines after http{:

server_names_hash_bucket_size 64;
include sites-enabled/*;

Save the file when you are done. Then, verify the Nginx configuration.

nginx -t

You will see the following output.

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Next, restart the Nginx service to implement the changes.

systemctl restart nginx

Step 8 – Access phpIPAM Web UI

Now, open your web browser and access the phpIPAM web interface using the URL You should see the phpIPAM welcome screen.

Click on the New phpipam installation. You should see the following screen.

Click on the MySQL/MariaDB import instructions. You should see the following screen.

Provide your phpIPAM database details and click on the install phpipam database. You should see the following screen.

Click on the Login. You should see your phpIPAM login screen.

Provide phpIPAM admin username admin and password as ipamadmin, then click on the Login button. You should see the change password screen.

Change your default password and click on the Save password. Then, click on the Dashboard button. You should see the following screen.


Congratulations! You have successfully installed the phpIPAM password management tool on Arch Linux. You can now easily install phpIPAM on your personal server and test it. You can also try to deploy phpIPAM on dedicated server hosting from Atlantic.Net!

Get started with 12 months of free cloud VPS hosting

Free Tier includes:
G3.2GB Cloud VPS Server Free to Use for One Year
50 GB of Block Storage Free to Use for One Year
50 GB of Snapshots Free to Use for One Year