If you prefer using containers or have problems with configuring PostgreSQL, Redis and Elasticsearch, try Using Docker for Development instructions.
Before you are ready to run Saleor you will need additional software installed on your computer.
Saleor requires Python 3.6 or later. A compatible version comes preinstalled with most current Linux systems. If that is not the case consult your distribution for instructions on how to install Python 3.6 or 3.7.
Version 10 or later is required. See the installation instructions.
Saleor needs PostgreSQL version 9.4 or above to work. Use the PostgreSQL download page to get instructions for your distribution.
Some features like PDF creation require that additional system libraries are present.
Debian / Ubuntu
Debian 9.0 Stretch or newer, Ubuntu 16.04 Xenial or newer:
sudo apt-get install build-essential python3-dev python3-pip python3-cffi libcairo2 libpango-1.0-0 libpangocairo-1.0-0 libgdk-pixbuf2.0-0 libffi-dev shared-mime-info
sudo yum install redhat-rpm-config python-devel python-pip python-cffi libffi-devel cairo pango gdk-pixbuf2
sudo pacman -S python-pip cairo pango gdk-pixbuf2 libffi pkg-config
emerge pip cairo pango gdk-pixbuf cffi
1. Clone the repository (or use your own fork)
git clone https://github.com/mirumee/saleor.git
2. Enter the directory
3. Install all dependencies
We strongly recommend creating a virtual environment before installing any Python packages.
pip install -r requirements.txt
SECRET_KEY environment variable
We try to provide usable default values for all of the settings. We’ve decided not to provide a default for
SECRET_KEY as we fear someone would inevitably ship a project with the default value left in code.
Secret key should be a unique string only your team knows. Running code with a known
SECRET_KEYdefeats many of Django’s security protections, and can lead to privilege escalation and remote code execution vulnerabilities. Consult Django’s documentation for details.
5. Create a PostgreSQL user
See PostgreSQL’s createuser command for details.
You need to create the user to use within your project. Username and password are extracted from the
DATABASE_URLenvironmental variable. If absent they both default to
While creating the database Django will need to create some PostgreSQL extensions if not already present in the database. This requires a superuser privilege.
For local development you can grant your database user the
SUPERUSERprivilege. For publicly available systems we recommend using a separate privileged user to perform database migrations.
6. Create a PostgreSQL database
See PostgreSQL’s createdb command for details.
Database name is extracted from the
DATABASE_URLenvironment variable. If absent it defaults to
7. Prepare the database
python manage.py migrate
This command will need to be able to create database extensions. If you get an error related to the CREATE EXTENSION command please review the notes from the user creation step.
8. Install front-end dependencies
If this step fails go back and make sure you’re using new enough version of Node.js.
9. Prepare front-end assets
npm run build-assets
10. Compile e-mails
npm run build-emails
11. Start the development server
python manage.py runserver