How to install and Configure Nip.io : Public Domain for Local Development

O V
2 min readApr 7, 2023

--

Image by Freepik

Nip.io is a DNS service that simplifies local testing of applications by providing a way to create domain names that map to specific IP addresses. It was created to help developers streamline the process of testing their applications on local machines, making it easier to work on projects without having to go through the hassle of setting up local DNS servers or modifying hosts files.

Install & Configure Instruction

Using Nip.io is easy and straightforward. Follow these steps to install and configure Nip.io:

Open your terminal and run the following command to download and install the Nip.io CLI tool:

curl -L https://nip.io/nip.io -o /usr/local/bin/nip && chmod +x /usr/local/bin/nip

This command downloads the Nip.io CLI tool and installs it in the /usr/local/bin directory.

Once the installation is complete, you can start using Nip.io. To create a domain name that maps to a specific IP address, simply enter the IP address followed by .nip.io into your browser’s address bar. For example, if your web application is running on 192.168.1.10, you can access it by entering http://192.168.1.10.nip.io into your browser’s address bar.

To configure Nip.io, you can use environment variables to set the default IP address for your local machine. To do this, add the following line to your .bashrc or .bash_profile file:

export NIP_IO_DEFAULT_IP=192.168.1.10

Replace 192.168.1.10 with the IP address of your local machine. This will set the default IP address for Nip.io to use when creating domain names.

You can also specify the IP address for a specific domain name by appending it to the domain name separated by a colon (:). For example, to create a domain name that maps to the IP address 192.168.1.20, you can enter http://example.com:192.168.1.20.nip.io into your browser’s address bar.

--

--

O V

I'm a Senior Software engineer from India. Loves coding and sharing work. Follow for insights on tech, travel, and more.