Here is a quick way to setup VirtualBox using Vagrant with Heroku-like box on Mac.

  1. Install VirtualBox from

  2. Install Vagrant from

  3. Create Vagrantfile for Heroku-like box (based on that looks something like:

Vagrant.configure("2") do |config| = "heroku"
  config.vm.box_url = ""
  config.vm.synced_folder ".", "/vagrant", :nfs => true :private_network, ip: ""  # required for NFS

Beside telling Vagrant to use Heroku-like box from it also sets up shared dir between host and VM machine. It will mount Vagrantfile dir (.) to /vagrant in VM.

vagrant up will setup the VM and start it up.

Now you can use vagrant ssh to login to VM.

Vagrant Heroku-like box comes with Postgresql, but if you want you can easily setup sqlite:

sudo apt-get install libsqlite3-dev

Bonus tip: when you are working on multiple projects sometimes you can forget which VMs are running. You can list all running VMs using:

VBoxManage list runningvms

Further reading:

Tags: heroku, howto, tutorial, vagrant, virtualbox


comments powered by Disqus