Set up Laravel Homestead Development environment
Install PHP 7 and composer
This article assumes you have PHP 7 and composer installed. If not, you can install PHP7 via brew if you are on Mac and install composer globally by downloading composer.phar
brew update
brew install php@7.2
mv composer.phar /usr/local/bin/composerInstall virtual box and vagrant
You need to install virtual box and vagrant
Add vagrant box
When you add vagrant box, the version is quite important. I have experienced different kinds of errors just because of different version numbers. I have tested laravel/homestead 9.3.0 working ok with PHP 7.2
vagrant box add laravel/homestead --box-version 9.3.0
sudo -H composer self-updatecreate your project
composer create-project --prefer-dist laravel/laravel yourLaravelProject
cd yourLaravelProject/
composer require laravel/homestead --devMake the homestead file
On Windows
vendor\\bin\\homestead makeOn Mac
php vendor/bin/homestead makeIf you have "private key cannot be found" error, make sure you have private key in .ssh/ directory by typing below:
ssh-keygen -t rsa -f ~/.ssh/id_rsaAdd below line to Homestead.yaml
version: 9.3.0
Build vagrant box
vagrant upGet into the box
vagrant ssh
cd code
sudo nano /etc/hosts
# add below line to the file
192.168.10.10 homestead.test Now you can go to homestead.test and see Laravel website is running!
Set up Laravel Homestead Development environment

v1.4.14