Manual Installation on Windows
The following instructions assume a 64-bit installation of Windows 10.
Prerequisites
Before you are ready to run Saleor, you will need additional software installed on your computer.
Python
Saleor requires Python 3.8 or later. Go to the Python download page for your operating system's installer and installation guide. You can also use pyenv to install and manage Python versions.
Make sure “Add Python 3.8 to PATH” is selected.
Node.js
Saleor requires Node.js 10.0 or later. Go to the Node.js downloads page for the installer. We recommend using the .msi
format.
PostgreSQL
You will need PostgreSQL version 12.x. Get the Windows installer from the project’s download page.
Remember the password you chose for the administrator account during the installation process.
GTK+
Download and install the 64-bit Windows installer.
Make sure that “Set up PATH environment variable to include GTK+” is selected.
Compilers
Download and install the latest version of the Build Tools for Visual Studio.
Installation
Once you have installed or updated the pre-requisite software, you are ready to install Saleor. Follow the steps below to start and execute the process:
All commands need to be performed in either a PowerShell terminal or a Windows Command Prompt.
Installing Saleor
Clone the repository:
git clone https://github.com/saleor/saleor.git
cd saleorInstall the dependencies into a new Python virtual environment:
- Command Prompt
- PowerShell
python -m venv saleor-venv
saleor-venv\Scripts\activate.bat
python -m pip install -r requirements.txt
python -m venv saleor-venv
saleor-venv\Scripts\Activate.ps1
python -m pip install -r requirements.txt
Create a database user using the command line tools that came with your PostgreSQL installation:
C:\"Program Files"\PostgreSQL\12\bin\createuser.exe --username=postgres --superuser --pwprompt saleor
Please correct the path if your installation path or PostgreSQL version are different.
When asked to choose a password for the new role, use "saleor" (or see how to configure Saleor to use a different password). When asked for your password, give the one you set during the installation of PostgreSQL.
cautionIf you've decided to substitute your own credentials, make sure you create a "superuser". Otherwise, the user won't be able to install all the necessary database extensions.
Create a database:
C:\"Program Files"\PostgreSQL\12\bin\createdb.exe --username=postgres --owner=saleor saleor
Migrate the database:
python manage.py migrate
cautionThis command creates database extensions. If you get an error related to the
CREATE EXTENSION
command, please return to the user creation step above.Create a super user account for dashboard
python manage.py createsuperuser
Starting the API server
Remember to activate your Python virtual environment if needed (you will need to do this every time you open a new terminal window):
- Command Prompt
- PowerShell
cd saleor
saleor-venv\Scripts\activate.bat
cd saleor
saleor-venv\Scripts\Activate.ps1
Then execute:
python manage.py runserver
Installing the dashboard
Clone the repository:
git clone https://github.com/saleor/saleor-dashboard.git
cd saleor-dashboardInstall the dependencies:
npm install
Running the dashboard
Set the API_URI
environment variable to your local API server's URL:
- Command Prompt
- PowerShell
set API_URI "http://localhost:8000/graphql/"
$Env:API_URI = "http://localhost:8000/graphql/"
From within the saleor-dashboard
directory, run the following command:
npm start
Your local dashboard should be accessible by visiting http://localhost:9000/.
Installing the storefront
Clone the repository:
git clone https://github.com/saleor/react-storefront.git
cd react-storefrontInstall the dependencies:
npm install -g pnpm
pnpm install
Running the storefront
From within the react-storefront
directory, run the following command:
pnpm dev
Your local storefront should be accessible by visiting http://localhost:3001/.