Error DK0031: Port 80 and 443 is used


The problem
During the initial installation I get the following error:
“Error DK0031: Port 80 and 443 is used”

Screenshot below:

I am only given the opportunity to “Retry”, but cannot do anything else about it.

Computer information:
This is a macOS v11.1. I do have Local by Flywheel also installed, which I suspect may be conflicting with the ports.

Closing notes:
I noticed another post about this:

Thank you.

1 Like

Update: I managed to complete the installation by killing all processes on port 80, however, I have no idea if this is a long-term fix (presumably not).


# find & kill processes which are using port 80
sudo lsof -i tcp:80 | grep LISTEN | awk '{print $2}' | xargs kill -9


# find processes which are using port 80
netstat -ano | findstr :80

# kill process by PID. replace "<PID>" with result from the above command.
taskkill /PID <PID> /F

Support: DevKinsta Error Codes - Kinsta


Thanks again for posting a workaround! :slight_smile:
We’ll have more information on this soon!

Thanks for sharing! Alas I came across and tried this solution but to no avail. There’s something (2 things actually) running on my machine over port 80 that cannot be killed.

I followed the same advise given by the online documentation and still have the same issue whenever I close DevKinsta and re-open it. Everytime I start the app I have to use the terminal to kill all tasks using port 80 before it will run properly. Too bad I was not able to test it as I wanted to.

Hi @jhcruzr . Welcome to DevKinsta and apologies for the trouble you’re having. There’s a feature request to be able to change the ports. We hope to have a fix for this soon. Stay tuned!

failed to work.
I look forward to a solution.
keep up the good work.

To those who have had trouble killing certain tasks, try putting “sudo” in front of xargs - this worked for me

Thanks for the suggestion. I’m not a coder by trade, do you mean:

sudo lsof -i tcp:80 | grep LISTEN | awk ‘{print $2}’ | sudo xargs kill -9

@michael any updates that can be shared getting this basic addressed?

@kadso We’ll have an update on this available shortly. Sorry for the wait!

The source of this error is having apache running.

Use the following command:
sudo apachectl stop

That’s why DevKinsta worked on a different machine with a clean install. Apache wasn’t already running.


Thanks for the quick update.

Nice Work Chris! That did it for me.
Thank you!


Has this update been done yet?

@jhcruzr Not yet I’m afraid. Sorry for the wait!

This did the trick for me:
sudo lsof -i tcp:80 | grep LISTEN | awk '{print $2}' | sudo xargs kill -9

1 Like

Are you installing on a windows machine or apple?

On Mac

For windows there are the following instructions which I am not sure if they solve the issue:

# find processes which are using port 80
netstat -ano | findstr :80

# kill process by PID. replace "<PID>" with result from the above command.
taskkill /PID <PID> /F

Hey @michael, any update on being able to use different ports for nginx?

This is a show stopper for me. I’m trying to create a workflow for migrating client sites from Joomla to WP, so the Joomla sites live in my host’s native web service. I figured using DevKinsta was a quick way to get the new WP sites installed, work on them locally, and pushed back to Kinsta.

I can’t move the main web service ports, as I have a lot of existing infrastructure and development toolchains that expect them to be on the native ports.

This is pretty fundamental stuff. The DevKinsta containers are literally guests. They shouldn’t assume they can just usurp the default service ports on the host.

I’ve tried changing them in the nginx config in the container, but the container just crashes when I try and restart nginx. I’d be happy with that as a solution for now, if you have any suggestions on how to move the ports by hand while we wait for it to be a built in feature.