If you prefer using containers or have problems with configuring PostgreSQL, Redis, and Elasticsearch, see our Using Docker instructions.
Before you are ready to run Saleor, you will need additional software installed on your computer.
Saleor requires Python version 3.6 or later. A compatible version comes pre-installed with most current Linux systems. If not, consult your Linux distributor 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 (for example, 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
- Arch Linux
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 the settings. We have 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.
The secret key should be a unique string that only your team knows. Running the code with a known
SECRET_KEYdefeats many of Django’s security protections; it can also 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.
Unless configured otherwise, the store will use
saleor as both the username and password. Remember to assign your user the
SUPERUSER privilege. This will allow you to create databases and database extensions.
While creating the database, Django will need to create some PostgreSQL extensions if they are not already present. This requires superuser privileges.
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.
The database name is extracted from the
DATABASE_URLenvironment variable. If absent, it defaults to
7. Prepare the database
python manage.py migrate
This command creates database extensions. If you get an error related to the
CREATE EXTENSIONcommand, please return to the instructions in the PostgreSQL user creation step.
8. Install front-end dependencies
If this step fails, make sure you are using a recent 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