Download vagrant box file locally from atlas and configuring it

Muhammad Raihan Muhaimin picture Muhammad Raihan Muhaimin · Feb 8, 2015 · Viewed 57.5k times · Source

I want to download a vagrant box file from Atlas for using it later locally with my vagrant file. How can I do this, and how can I configure it?

Answer

Muhammad Raihan Muhaimin picture Muhammad Raihan Muhaimin · Feb 8, 2015

To download a file you have to add version and provider in the URL. For example for downloading trusty64 First you need its URL which is https://app.vagrantup.com/ubuntu/boxes/trusty64/

then you have to add version and provider afterwards, for our example the download URL would be.

https://app.vagrantup.com/ubuntu/boxes/trusty64/versions/20180206.0.0/providers/virtualbox.box

Then you have to add it locally from your vagrant file.

To add it locally to vagrant file use the following command

vagrant box add foo-box /path/to/vagrant-box.box
vagrant init foo-box
vagrant up

This will create the vagrantfile and you can configure the vagrant file.