Skip to content
Minimal LEMP configuration for Vagrant
Shell Nginx HTML
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Type Name Latest commit message Commit time
Failed to load latest commit information.

LEMP Vagrant box

I created this Vagrant box for the following reasons:

  • development with Python or PHP, and MySQL
  • vanilla Ubuntu
  • project agnostic (install project dependencies with pip, composer, bower, ...)
  • no dependencies on a provisioner like Docker, Puppet, Ansible, ...
  • completely unattended provisioning
  • Keep It Small & Simple


All you need to get started is:


git clone
vagrant up

Wait until vagrant finishes and then open or type vagrant ssh.


This box uses ubuntu/wily64 and optionally contains:

  • nginx
  • mysql
  • php (php5-fpm, composer)
  • myadmin (phpmyadmin)
  • py (virtualenv)
  • js (nodejs, npm, bower)
  • cc (valgrind, glib)


  • Select your preferred Ubuntu box bay setting in Vagrantfile.

  • You can enable components by copying their files from vagrant/available to vagrant/enabled

  • You can set your VM name and host name in Vagrantfile. This name is also used as your project name. By default the name is derived from your directory name.

  • Your current directory is mapped to /home/vagrant/public_html

  • The script optionally uses the HostsUpdater plugin to set hostnames and .dev. Otherwise add the following line to your C:\Windows\System32\drivers\etc\hosts or /etc/hosts (depending on your host OS) to be able to use as URL:
  • Useful pages:

  • root password: vagrant

  • MySQL is secured using mysql_secure_installation

Customize provisioning

The provisioning script will execute any script in the Vagrant/enabled folder. These scripts inherit the name space of the provisioning script. In particular, the following variables are available:

  • $INSTALL: the apt-get installation command
  • $PROJECT: the project name
  • $DBNAME: the name of the database
  • $DBUSER: the name of the database user
  • $DBPASS: the password of the database user

Finally, the provisioning script executes vagrant/ as user vagrant.

Example setup scripts are included in vagrant/scripts. You can use these to create your own setup scripts.

You can’t perform that action at this time.