Skip to main content

Command Palette

Search for a command to run...

Thank you, Apple, for hijacking port 5000 😣

Published
β€’2 min read
Thank you, Apple, for hijacking port 5000 😣
C

I'm a full-stack developer from South Africa πŸ‡ΏπŸ‡¦. I love writing about JavaScript, HTML and CSS.

You might have already upgraded to Mac OS Monterey. If not, there might be an unpleasant surprise awaiting you.

For me, it was running the following command.

npm run dev

And getting a message stating port 5000 is already in use...

It took me a good couple of minutes to find out no other application was using this port, and I was baffled at this point.

Surely all I did was upgrade to Monterey...

Re-opening port 5000 on Mac OS Monterey

After doing some research, I did a portscan and noticed "AirPlay Receiver" was using this port.

That didn't sound like anything I made. Did some more research to find out that the AirPlay receiver is on by default.

To re-enable port 5000, you can simply turn off this checkbox.

AirPlay Receiver in macOS Monterey listening on port 5000

You can find this checkbox in Settings > Sharing > AirPlay Receiver.

This is not a new thing though, Apple has been using port 5000 for AirPlay since 2004. The only new part is the introduction to having a Mac listening to AirPlay, which, as mentioned, uses port 5000.

If you wish to use AirPlay on your Mac, I'd suggest switching your development to a different port.

Thank you for reading, and let's connect!

Thank you for reading my blog. Feel free to subscribe to my email newsletter and connect on Facebook or Twitter

A

Wow is this for real? πŸ˜‚

2
C

Yep it is 😬

A

I tested it out yesterday and created a simple express server and yep the port is in use. I never would have known it would have driven me crazy for a while if I did not see this post 🀣

K

Funny kind of, but also surprising something like this could even get across the line 🀯

2
C

Ah guess they had it for a long time, but never bothered anyone

J

I don't know why, but this is so funny to me πŸ˜‚πŸ˜‚

2
C

Haha yeah I can see the humour in it πŸ˜‚

More from this blog

D

Daily Dev Tips

887 posts

Looking to get into development? As a full-stack developer I guide you on this journey and give you bite sized tips every single day πŸ‘Š