Installation Guide
Spryker Commerce OS is delivered as a VM (virtual machine).
All service installations such as database, Redis, Elastic Search, and PHP modules are already included in the VM.
To install the Spryker Commerce OS for development:

To prepare Vagrant, install the following:
- Git
- VirtualBox 5.2.2+
- Vagrant 2.0.0+
- vagrant-vbguest and vagrant-hostmanager plugins:
vagrant plugin install vagrant-vbguest
vagrant plugin install vagrant-hostmanager

1. Create the folder in which you want the source code to be placed:
mkdir devvm
cd devvm
2. Initialize the Vagrant environment:
vagrant init devvm2.0.0 https://github.com/spryker/devvm/releases/download/v2.0.0/spryker-devvm.box
Update the Vagrantfile and add the hostmanager configuration at the end (for Mac OS X/ Unix/ Linux):
mv Vagrantfile Vagrantfile.bak
awk '/^end/{print " config.hostmanager.enabled = true\n config.hostmanager.manage_host = true"}1' Vagrantfile.bak > Vagrantfile
3. Build the virtual machine:
vagrant up
Your local code installation will be mounted as a network share inside the VM to /data/shop/development/current. Now you can log into the VM using the following command in order to continue with the setup:
vagrant ssh

To speed up the composer update process, use this composer tool. After running composer global require hirak/prestissimo, the next composer update or composer install command should be way faster for both local development and server deployment.
The next step is to install the application. Run the following commands:
composer install
vendor/bin/install
Executing these steps will install all required dependencies and run the installation process. It also installs the demodata and exports it to Redis and Elasticsearch.
After that the application is installed and ready to use.
Now you can access the Demoshop front-end at http://www.de.demoshop.local and the back-end at http://zed.de.demoshop.local using these credentials: user admin@spryker.com and password change123.
Next Steps and Additional Info:

If you want to commit from within the VM, it is recommended to set the right Git preferences:
git config --global user.email "your.email@domain.tld"
git config --global user.name "Your Name"
git config --global push.default simple
git config --global pull.rebase true

If you like to change the default configuration of the virtual machine, you can do this by following the example below.
export VM_CPUS=2
export VM_MEMORY=4192
export VM_NAME="My custom name"
export VM_IP_PREFIX="10.10.0."

For non-standard setups you have the option to disable shared folder with Spryker code.
If you decide not to use shared folders feature, it’s your responsibility to get Spryker code into /data/shop/development/current directory inside your VM.
export VM_SKIP_SF=1

In case you already have your SSH keys set up on your host system, it can be more convenient to directly use them for downloading the demoshop repository:
export SPRYKER_REPOSITORY="git@github.com:spryker/demoshop.git"
Before proceeding with the installation, please make sure you have your SSH public key in github.
In order to generate your SSH key, follow the steps presented in the following article: Generating SSH keys.

A common Spryker Project is like a typical web project. There is the project level code and the Spryker Commerce OS code. Spryker Commerce OS code is installed into the vendor folder. As you are running both Yves and Zed inside the VM, you will actually see the source code for both. They share a similar directory layout, but specific folders are indicated by the name of the application. So, a folder named Zed naturally belongs to Zed. A Shared folder belongs to Yves and Zed.
Path | Usage |
---|---|
config | config various configuration files |
data | logfiles and caches |
src | your project code |
static | static assets and the public document roots for Yves and Zed |
vendor | packages installed via composer. In particular vendor/spryker contains Yves and Zed bundles. |

Service | Port | Comments |
---|---|---|
MySQL Server | 3306 | Username is development, password is mate20mg |
PostgreSQL Server | 5432 | Username is development, password is mate20mg |
Redis | 10009 | You can explore Redis with e.g. Redis Desktop Manager |
Mailcatcher |
1080 |
Catches all the mails that are sent during development in the Dev VM |
Management UI |
15672 |
See Default Queue Engine for more information |

To optimize the performance of the system, you can enable the Opcache. This is not recommend for development, because you may get strange results. To activate the Opcache, just put the following lines at the end of the php.ini
and restart php.
This configuration is not optimized for production environments!
sudo nano /etc/php7.1/fpm/php.ini
[Cache]
; configuration for php ZendOpcache module
; priority=05
zend_extension=opcache.so
; Determines if Zend OPCache is enabled
opcache.enable=1
; Determines if Zend OPCache is enabled for the CLI version of PHP
>opcache.enable_cli=1
; The OPcache shared memory storage size.
opcache.memory_consumption=64
; The amount of memory for interned strings in Mbytes.
opcache.interned_strings_buffer=8
; The maximum number of keys (scripts) in the OPcache hash table.
; Only numbers between 200 and 100000 are allowed.
opcache.max_accelerated_files=8000
; The maximum percentage of "wasted" memory until a restart is scheduled.
opcache.max_wasted_percentage=5
; When disabled, you must reset the OPcache manually or restart the
; webserver for changes to the filesystem to take effect.
opcache.validate_timestamps=1
; How often (in seconds) to check file timestamps for changes to the shared
; memory storage allocation. ("1" means validate once per second, but only
; once per request. "0" means always validate)
opcache.revalidate_freq=1
; If enabled, a fast shutdown sequence is used for the accelerated code
opcache.fast_shutdown=1
sudo -i
service php7.1-fpm restart
exit

It is advised to label your VM (especially when you have more than a single one):
set-vm-name my-project
This will display vagrant@my-project in your console starting with the next login.

To check for newer released versions, we recommend that you follow the steps described here Checking for newer versions.
See also:
Last review date: Mar. 9th, 2018