# download homestead repo
cd ~/code
git clone https://github.com/laravel/homestead.git homestead
cd homestead
# move to a release (see latest: https://github.com/laravel/homestead/releases)
git checkout v7.3.0
# add custom virtualbox settings which prevent the machine from hanging sometimes
wget -qO- https://gist.githubusercontent.com/dgoguerra/aabc3122d2079b05af4d0201c2e4f9c7/raw/Vagrantfile.diff | git apply
# initialize and edit Homestead.yaml
bash init.sh
nano Homestead.yaml # edit as needed
# start the machine. may take some time to download laravel/homestead box
vagrant up
To run any Vagrant command on your Homestead machine from any directory, add to your Bash profile (~/.bash_profile
on OSX, ~/.bashrc
on Linux) the following function (or homestead-custom.sh
to add some helpers to the homestead
command):
function homestead() {
( cd ~/code/homestead && vagrant $* )
}
If you want to start downloading the Homestead box before configuring anything and running vagrant up
, run:
vagrant box add laravel/homestead --provider virtualbox
- See Homestead image versions at: https://atlas.hashicorp.com/laravel/boxes/homestead
- See Laravel 5.4 Homestead instructions at: https://laravel.com/docs/5.4/homestead#introduction