Jump to content

Error "Failed to bind to localhost/" during starting up local server

Recommended Posts

I already installed the Squarespace-server on my desktop (iMac Pro 2017) with this doc. 

Squarespace-server  --version 1.8.2

But when running squarespace-server https://yourdomain.squarespace.com or squarespace-server https://yourdomain.squarespace.com --auth, I got some errors like "Failed to bind to localhost/"

Right now, I fixed this issue with Squarespace Support team's help.

If anyone has some issues on Squarespace, please don't hesitate to ask support team. They are very kind.


Link to comment

Actually, I think the error has to do with the Port you are using. Based on the logs you've provided, the local development server is unable to start because there's a process already bound to port 9000. To address this, you'll either need to identify and kill this existing process or use a different port. The first option is mostly outside the scope of our support, but the steps looks more or less like the following:

lsof -i :9000
kill -9 pid_returned_by_lsof

The second option requires appending the --port flag when starting the local development server. For example:

squarespace-server https://cyan-tarantula-6j7n.squarespace.com --auth --port=9001

I just hope this forum to help someone that encounter this problem like me.

Link to comment
  • 4 months later...

If you are getting this error in 2022, I solved it on MacOS by doing the following:

Essentially, what has happened is the PID is already in use. I found its caused when it isn't closed properly. In this case, open Activity Monitor on MacOS. Then go to your terminal/Visual Code Studio and run: 

lsof -i tcp:PORT

e.g lsof -i tcp:9000 

(this would be if port 9000 is already in use). 

This will tell you what PID is already in use, e.g it should give you some headings in the output terminal something like: 


java.                 XXXXX


Where the XXXXX number under heading PID will give you the PID. Then you just need to go to Activity Monitor (if you are using MacOS), find the PID in the column and it should show the process that is already in use. Click "Stop" icon at the top of the window. That should work, then simply run 

squarespace-server YOURSITEURL --auth 

(always include --auth as usually users have a trial site and end up with unable to get access if they just run without it) 


Then you should be good to go ! 

Edited by HHale123
adding further info, accidentally clicked save
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

  • Create New...

Squarespace Webinars

Free online sessions where you’ll learn the basics and refine your Squarespace skills.

Hire a Designer

Stand out online with the help of an experienced designer or developer.