Support the ongoing development of Laravel.io →
posted 10 years ago
Installation

Hello,

When i start my env : vagrant up I have an error :

"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 8000 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: 80, host: 1234

..."

I've tried to redirect with adding this line in the 2 VagrantFile :

C:\Users\xxx\Homestead\VagrantFile

and / or

C:\Users\xxx.vagrant.d\boxes\laravel-VAGRANTSLASH-homestead\0.1.8\virtualbox

and / or

C:\Users\xxx.vagrant.d\boxes\laravel-VAGRANTSLASH-homestead\0.1.9\virtualbox

But i've the same error ... And the port 8000 is occuped by a windows system process. May be a application which call a windows process ... ?

Thanks .

Last updated 2 years ago.
0

Go to " homestead/scripts/homestead.rb "

and set

Configure Port Forwarding To The Box

config.vm.network "forwarded_port", guest: 80, host: 1050

And you done .

Last updated 2 years ago.
0

If you are running any host process in the port 8000 you could kill it and re-run the vagrant up command.

Today I had the same issue and I search the process with the netstat command and searching the PID process I killed it and follow the process.

In my case was a VirtualBox process that I killed and solve my issue.

Hope it helps you.

Last updated 2 years ago.
0

Thanks a lot for your answers !!

Last updated 2 years ago.
0

Really helpfull!! thanks

Last updated 2 years ago.
0

I've done this:

  • Grabbed the PID of the process listening on port 8000: lsof -i tcp:8000
  • kill -9 <PID>
0

I encountered this when running per-project homestead instances.

Looking at the homestead.rb file in the latest v2 version there is a port override, so rather than modifying the Vagrantfile or the homestead.rb file you can just provide the new ports in the Homestead.yaml e.g.

ports:
- guest: 80
  host: 8001

- guest: 443
  host: 44301

- guest: 3306
  host: 33061

- guest: 5432
  host: 54321
Last updated 9 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

SeLoRBIS selorbis Joined 7 Sep 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.