2013-09-03 18:08:28 +00:00
---
2016-01-19 18:08:53 +00:00
layout: "docs"
2013-09-06 16:50:43 +00:00
page_title: "Boxes"
2013-09-03 18:08:28 +00:00
sidebar_current: "boxes"
2016-01-19 18:08:53 +00:00
description: |-
Boxes are the package format for Vagrant environments. A box can be used by
anyone on any platform that Vagrant supports to bring up an identical
working environment.
2013-09-03 18:08:28 +00:00
---
# Boxes
2014-01-25 20:18:41 +00:00
Boxes are the package format for Vagrant environments. A box can be used by
anyone on any platform that Vagrant supports to bring up an identical
working environment.
2013-09-03 18:08:28 +00:00
The `vagrant box` utility provides all the functionality for managing
2016-01-19 18:08:53 +00:00
boxes. You can read the documentation on the [vagrant box ](/docs/cli/box.html )
2014-01-25 20:18:41 +00:00
command for more information.
2013-09-03 18:08:28 +00:00
2014-01-25 20:18:41 +00:00
The easiest way to use a box is to add a box from the
2017-05-22 16:42:31 +00:00
[publicly available catalog of Vagrant boxes ](https://vagrantcloud.com/boxes/search ).
2014-01-25 20:18:41 +00:00
You can also add and share your own customized boxes on this website.
2013-09-03 18:08:28 +00:00
2014-01-25 20:18:41 +00:00
Boxes also support versioning so that members of your team using Vagrant
can update the underlying box easily, and the people who create boxes
can push fixes and communicate these fixes efficiently.
2013-09-03 18:08:28 +00:00
2014-01-25 20:18:41 +00:00
You can learn all about boxes by reading this page as well as the
sub-pages in the navigation to the left.
2013-09-03 18:08:28 +00:00
2014-01-25 20:18:41 +00:00
## Discovering Boxes
2013-09-03 18:08:28 +00:00
2014-01-25 20:18:41 +00:00
The easiest way to find boxes is to look on the
2017-05-22 16:42:31 +00:00
[public Vagrant box catalog ](https://vagrantcloud.com/boxes/search )
2014-01-25 20:18:41 +00:00
for a box matching your use case. The catalog contains most major operating
systems as bases, as well as specialized boxes to get you up and running
quickly with LAMP stacks, Ruby, Python, etc.
2013-09-03 18:08:28 +00:00
2014-01-25 20:18:41 +00:00
The boxes on the public catalog work with many different
2016-01-19 18:08:53 +00:00
[providers ](/docs/providers/ ). Whether you are using Vagrant with
2014-01-25 20:18:41 +00:00
VirtualBox, VMware, AWS, etc. you should be able to find a box you need.
2013-09-03 18:08:28 +00:00
2014-01-25 20:18:41 +00:00
Adding a box from the catalog is very easy. Each box shows you instructions
with how to add it, but they all follow the same format:
2013-09-03 18:08:28 +00:00
```
2014-01-25 20:18:41 +00:00
$ vagrant box add USER/BOX
2013-09-03 18:08:28 +00:00
```
2019-08-14 17:48:33 +00:00
For example: `vagrant box add hashicorp/bionic64` . You can also quickly
initialize a Vagrant environment with `vagrant init hashicorp/bionic64` .
2016-01-19 18:08:53 +00:00
~> **Namespaces do not guarantee canonical boxes!** A common misconception is
that a namespace like "ubuntu" represents the canonical space for Ubuntu boxes.
2017-05-22 16:42:31 +00:00
This is untrue. Namespaces on Vagrant Cloud behave very similarly to namespaces on
2016-01-19 18:08:53 +00:00
GitHub, for example. Just as GitHub's support team is unable to assist with
issues in someone's repository, HashiCorp's support team is unable to assist
with third-party published boxes.
2016-06-20 12:20:53 +00:00
## Official Boxes
2019-08-14 17:48:33 +00:00
HashiCorp (the makers of Vagrant) publish a basic Ubuntu 18.04 64-bit box that is available for minimal use cases. It is highly optimized, small in size, and includes support for Virtualbox, Hyper-V, and VMware. You can use it like this:
2016-06-20 12:20:53 +00:00
```shell
2019-08-14 17:48:33 +00:00
$ vagrant init hashicorp/bionic64
2016-06-20 12:20:53 +00:00
```
or you can update your `Vagrantfile` as follows:
```ruby
2017-05-18 06:20:31 +00:00
Vagrant.configure("2") do |config|
2019-08-14 17:48:33 +00:00
config.vm.box = "hashicorp/bionic64"
2016-06-20 12:20:53 +00:00
end
```
2017-05-22 16:42:31 +00:00
For other users, we recommend the [Bento boxes ](https://vagrantcloud.com/bento ). The Bento boxes are [open source ](https://github.com/chef/bento ) and built for a number of providers including VMware, Virtualbox, and Parallels. There are a variety of operating systems and versions available.
2016-06-20 12:20:53 +00:00
These are the only two officially-recommended box sets.
2019-08-16 16:24:10 +00:00
Special thanks to the Bento project for providing a solid base template for the `hashicorp/bionic64` box.
2017-05-22 16:42:31 +00:00
~> **It is often a point of confusion** , but Canonical (the company that makes the Ubuntu operating system) publishes boxes under the "ubuntu" namespace on Vagrant Cloud. These boxes only support Virtualbox and do not provide an ideal experience for most users. If you encounter issues with these boxes, please try the Bento boxes instead.