I was trying to update my laravel/homestead vagrant box from 6.3.0 to the latest version 6.4.0 since yesterday and every time I run the command ‘vagrant box update’ the process used to fail either because of ‘Network Issues’ or ‘SSL errors’. Also, the process of the download was damn slow that always it showed me 8 to 10 hours to complete.
After Googling, I found out that many are facing similar issues in downloading or updating the boxes and ‘Hashicorp’ has still not fixed this long pending issue.
Since I learned that this is an option to download it manually, I tried the method and thought will put the steps here so that it may help someone else.
First step
download the box manually. You can run the following command and copy the URL from the screen
> vagrant box update
in my case it was
https://vagrantcloud-files-production.s3.amazonaws.com/archivist/boxes/022181e0-ab71-4675-8e36-14dbdae3bf43?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Content-Sha256=UNSIGNED-PAYLOAD&X-Amz-Credential=AKIAIA4WZ7ZDX3WM4HDQ%2F20181128%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20181128T025508Z&X-Amz-Expires=60&X-Amz-SignedHeaders=host&X-Amz-Signature=e8a4c97a07309e5ef28242ba8789362df2305a2f3d52d2f2ac7498259c3c0ff4
Note: URL may change depending on the version or box and provider so please copy the URL and download the box.
Second step
Rename the downloaded file to homestead-6.4.0.box (Remember that .box extension is must so that vagrant can identify the file)
Third step
Add the downloaded box using the command
> vagrant box add laravel/homestead ~/Downloads/homestead-6.4.0.box
above command will add the box
Fourth step
Go to following folder
> cd ~/.vagrant.d/laravel-VAGRANTSLASH-homestead/
Rename the folder 0 ( vagrant will put name as 0 for manually added box) to 6.4.0
> mv 0 6.4.0
Fifth step
destroy current box and launch a new box as usual
> cd ~/Homestead/
> vagrant destroy && vagrant up