Port is already in use

The most likely cause for this error is that you are already running another server on your Mac. Quit that server, wait a moment for it to quit fully, then click “retry” in Indigo.

Common applications that may have reserved ports needed by Indigo include:

  • Docker
  • Homebrew
  • Laravel Homestead
  • Laravel Valet
  • MAMP Pro

Port 53 (DNS resolution) is sometimes used by applications using Apple’s Virtualization Framework eg:

  • Tart
  • UTM

Still stuck? Check Activity Monitor

The Activity Monitor application is a good way to check whether processes which commonly use ports required by Indigo are running.

  1. Quit Indigo.

  2. Open the Activity Monitor application.

  3. Under the View menu, tick All processes.

  4. In the activity monitor window, search on the following common process names to see if they are running:

  • dnsmasq (for port 53)
  • httpd (apache)
  • mysql
  • nginx
  • php
  1. If one of the above is running, double click it and see whether the details provide clues as to which application is running the service.

  2. Quit the application which opened the service if you know what it is. Otherwise, use Activity Monitor to stop the process directly, by clicking the Stop icon (a circle with an x).

Getting more advanced: using the command line to find which process is listening on a port

If the above doesn’t resolve the issue, the lsof command line tool may help. It can display the processes which are associated with the port you specify.

  1. Open the Terminal application

  2. Enter the following command. Replace 53 with the port you are interested in.

sudo lsof -i :53
  1. The command needs to run as root, so you will need to enter your Mac user password.

Sample output:

% sudo lsof -i :53
Password:
COMMAND   PID           USER   FD   TYPE             DEVICE SIZE/OFF NODE NAME
dnsmasq 98837 nobody    4u  IPv4 0x8f77b596245a7313      0t0  UDP 192.168.73.1:domain
dnsmasq 98837 nobody    5u  IPv4 0x8f77b5963bc1425b      0t0  TCP 192.168.73.1:domain (LISTEN)

In this example it’s clear that a process called dnsmasq is listening on port 53. Using this knowledge, use the Activity Monitor application to ascertain which application is running this process (see step 5 above). You can then quit the application, or if needed, stop the process directly.