Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

Development Tools

How do I change forwarding ports and fix port collisions (error occurs when I try to "Vagrant Up")?

In the "Installing the Treehouse VM on Windows" tutorial, I'm on the step where I've inputted "vagrant up" into CMDER. It's giving me an error saying: "Vagrant cannot forward the specified ports on this VM, since they would collide with some other application that is already listening on these ports. The forwarded port to 3000 is already in use on the host machine. To fix this, modify your current projects Vagrantfile to use another port. Example, where '1234' would be replaced by a unique host port:

config.vm.network :forwarded_port, guest: 3000, host:1234

Sometimes, Vagrant will attempt to auto-correct this for you. In this case, Vagrant was unable to. This is usually because the guest machine is in a state which doesn't allow modifying port forwarding."

So I'm in my Vagrantfile right now...my question is...what should my guest and host numbers be? In other words, how do I find which guest and host ports are available to use? If I change those numbers in the "Vagrantfile", I'd also have to change the "localhost:[insert which ever guest port number I end up choosing]", correct?