Vagrant configuration to run Magento 2

This Vagrant configuration sets up required environment and installs latest available Magento 2 running on Ubuntu 14.04.3 LTS (Trusty Tahr). Brought to you by aheadWorks.

Box contents

  • Ubuntu 14.04.3 LTS (Trusty Tahr)
  • Apache 2.4 with mods enabled
  • Mysql 5.6
  • PHP 5.5.9 with all extensions required by Magento2
  • Composer
  • Git

Preparing your installation

  1. Install VirtualBox
  2. Install Vagrant
  3. Install vagrant-puppet-install plugin by executing vagrant plugin install vagrant-puppet-install
  4. Download/clone this repository and cd to it's root


Configure varables inside Vagrantfile like: port, hostname, docroot, etc. This step is optional.

Since Nov 2015 Magento requires key-based authentication to be installed.

Obtain GitHub token and put it in Vagrantfile's github_token variable.

Generate public and private keys with Magento Connect and put it in magento_pubkey and magento_privkey variables inside Vagrantfile

Push the temple

  1. Run vagrant up and give it some time to install all the stuff for you. This will automatically download and configure box and install all required software
  2. Edit your hosts file(/etc/hosts on OSX/Linux, Windows\System32\Drivers\etc\hosts on Windows) and add line If you changed hostname at Vagrantfile be sure to replace with it
  3. When Vagrant will complete the installation, open in your browser


  • Report of any issues if something goes wrong during installation
  • Run vagrant provision if you change something in Vagrant/Puppet configuration
  • Run vagrant reload to reboot your box
  • Run vagrant destroy to remove box completely
  • Run vagrant ssh to start SSH session
  • If vagrant plugin install vagrant-puppet-install fails to run, just re-run it one more time, it is a known issue for some Vagrant plugins.