The objective of this guide is to help you Install and Configure phpIPAM on Ubuntu 20.04/18.04 & Debian 10 Linux distribution. phpIPAM is an open-source php-based web IP address management application (IPAM). Its goal is to provide light, modern and useful IP address management. phpIPAM uses MySQL database backend and jQuery libraries, Ajax and HTML5/CSS3 features.

phpIPAM has the following features:

  •  IPv4/IPv6 IP address management
  •  Section / Subnet management
  •  Automatic free space display for subnets
  •  Visual subnet display
  •  Automatic subnet scanning / IP status checks
  •  PowerDNS integration
  •  NAT support
  • VLAN management
  • VRF management
  • IPv4 / IPv6 calculator
  • IP database search
  • E-mail notifications
  • Custom fields support
  • Translations
  • Changelogs
  •  RACK management
  • Domain authentication (AD, LDAP, Radius)
  • Per-group section/subnet permissions
  • Device/device types management
  • RIPE subnets import
  • XLS / CVS subnets import
  • IP request module
  • Locations module

Install phpIPAM on Ubuntu 20.04/18.04 / Debian 10 Linux

phpIPAM has a number of dependencies that we need to install before we can install and configure phpIPAM. These are:

  1. MySQL / MariaDB server
  2. php / php-fpm for nginx
  3. php modules
  4. Apache / nginx web server

Step 1: Install MariaDB  Server

Use the following guide to install MariaDB server:

Install MariaDB on Ubuntu 18.04 and CentOS 7

Install MariaDB on Debian 10

How To Install MariaDB Server on Ubuntu 20.04 (Focal Fossa)

Once the database installation and setup is complete, create a database for phpipam user:

$ sudo mysql -u root -p

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

Step 2: Install PHP and required modules

Next phase is the installation of php and required modules. Run the following commands:

sudo apt update 
sudo apt -y install php php-{mysql,curl,gd,intl,pear,imap,memcache,pspell,tidy,xmlrpc,mbstring,gmp,json,xml,fpm}

Step 3: Install phpIPAM on Debian 10 / Ubuntu 20.04/18.04 LTS

We’ll download phpIPAM from Github. Install git first:

sudo apt -y install git

Clone phpIPAM code from github

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

Change to clone directory.

cd /var/www/html/phpipam

You can also download phpipam from official Sourceforge repository and extract it to your web server directory.

Step 4: Configure phpIPAM on Ubuntu 20.04/18.04 / Debian 10

Change your working directory to /var/www/html/phpipam and copy config.dist.php to config.php, then edit it.

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

Edit the file to configure database credentials as added on Step 1:

$ sudo vim config.php
* database connection details
$db['host'] = 'localhost';
$db['user'] = 'phpipam';
$db['pass'] = 'StrongDBPassword';
$db['name'] = 'phpipam';
$db['port'] = 3306;

Option 1: Using Nginx Web server

Install nginx using the command:

sudo systemctl stop apache2 && sudo systemctl disable apache2
sudo apt -y install nginx

Configure nginx:

sudo vim /etc/nginx/conf.d/phpipam.conf

Add content:

Ubuntu 20.04:

server {
    # root directory
    root   /var/www/html;

    # phpipam
    location /phpipam/ {
        try_files $uri $uri/ /phpipam/index.php;
        index index.php;
    # phpipam - api
    location /phpipam/api/ {
        try_files $uri $uri/ /phpipam/api/index.php;

    # php-fpm
    location ~ \.php$ {
        fastcgi_pass   unix:/run/php/php7.4-fpm.sock;
        fastcgi_index  index.php;
        try_files      $uri $uri/ index.php = 404;
        include        fastcgi_params;

Ubuntu 18.04:

server {
    # root directory
    root   /var/www/html;

    # phpipam
    location /phpipam/ {
        try_files $uri $uri/ /phpipam/index.php;
        index index.php;
    # phpipam - api
    location /phpipam/api/ {
        try_files $uri $uri/ /phpipam/api/index.php;

    # php-fpm
    location ~ \.php$ {
        fastcgi_pass   unix:/run/php/php7.2-fpm.sock;
        fastcgi_index  index.php;
        try_files      $uri $uri/ index.php = 404;
        include        fastcgi_params;

Debian 10:

server {
    # root directory
    root   /var/www/html;

    # phpipam
    location /phpipam/ {
        try_files $uri $uri/ /phpipam/index.php;
        index index.php;
    # phpipam - api
    location /phpipam/api/ {
        try_files $uri $uri/ /phpipam/api/index.php;

    # php-fpm
    location ~ \.php$ {
        fastcgi_pass   unix:/run/php/php7.3-fpm.sock;
        fastcgi_index  index.php;
        try_files      $uri $uri/ index.php = 404;
        include        fastcgi_params;

Change ownership of the /var/www/ directory to www-data user and group.

sudo chown -R www-data:www-data /var/www/html
sudo systemctl restart nginx

Option 2: Using Apache Web Server

If you would like to use Apache web server, first install it using:

sudo systemctl stop nginx && sudo systemctl disable nginx
sudo apt -y install apache2
sudo a2enmod rewrite
sudo systemctl restart apache2

Install apache php module:

sudo apt -y install libapache2-mod-php php-curl php-xmlrpc php-intl php-gd

Add Apache phpipam configuration:

sudo vim /etc/apache2/sites-available/phpipam.conf

Here are the contents:

<VirtualHost *:80>
    ServerAdmin [email protected]
    DocumentRoot "/var/www/html/phpipam"
    <Directory "/var/www/html/phpipam">
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted
    ErrorLog "/var/log/apache2/phpipam-error_log"
    CustomLog "/var/log/apache2/phpipam-access_log" combined

Enable site:

sudo  a2ensite phpipam

Restart Apache server for changes to be made.

sudo systemctl restart apache2

Step 5: Finish phpIPAM Installation on Ubuntu 20.04/18.04 / Debian 10

Start the installation process by visiting, replace with your valid domain name. The URL could also be or IP Address instead of DNS name depending on your configuration.

On the first page, Select “New phpipam installation

phpipam install 01

Since we had created a database, we’ll go with “MySQL import instructions“.

phpipam install 02

This will output the command to import the SQL file.

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

For Automatic database installation, set like below.

phpipam install 05
phpipam install 07

On successful installation, you should get the admin login page, log in with credentials set above.

phpipam install 08

The default Login credentials are:

Username: admin
Password: ipamadmin

You’re prompted to change the admin password on the first login.

install phpfpm centos rhel 8 change password

You have successfully installed phpIPAM on Debian 10 / Ubuntu 18.04 Linux system.

phpipam install 09

Similar guides:

How to Install NetBox on Ubuntu 18.04 LTS

How To Install phpIPAM on CentOS 8 / RHEL 8

How to install RackTables on Ubuntu 18.04 / Ubuntu 16.04 LTS

How to Install Wiki.js on Ubuntu 18.04 / CentOS 7

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


  1. Hey Josphat,

    thank you for the guide.
    I just miss the path of the folder where I have to create the Apache phpipam configuration file?


    • Hey Manual

      vim /etc/apache2/sites-available/phpipam.conf
      a2ensite phpipam
      systemctl restart apache2

      greetings from Germany 🙂


Please enter your comment!
Please enter your name here