How to Install Saleor on Ubuntu Server Latest

Saleor is an open-source e-commerce platform built on top of Django and GraphQL. It is highly customizable and provides a modern interface along with various features for creating an online store. In this tutorial, we will guide you through the installation process of Saleor on Ubuntu Server Latest.

Prerequisites

Before proceeding with the installation, you will need the following:

Step 1: Update Package Index

Start by updating the package index of the installation system. Open a terminal and run the following command:

sudo apt update

Step 2: Install Required Dependencies

After updating the package index, install the required dependencies:

sudo apt install python3 python3-pip python3-dev build-essential libssl-dev libffi-dev python3-setuptools

Step 3: Install Git

Git is required to download Saleor's source code. If it's not already installed, install it using the following command:

sudo apt install git

Step 4: Clone Saleor Repository

Next, clone the Saleor repository using the following command:

git clone https://github.com/mirumee/saleor.git

Step 5: Create a Virtual Environment

Create a virtual environment for Saleor using the following command:

cd saleor
python3 -m venv env

Step 6: Activate Virtual Environment

Activate the virtual environment using the following command:

source env/bin/activate

Step 7: Install Dependencies

Install Saleor's dependencies using the following command:

pip install -r requirements.txt

Step 8: Database Configuration

First, create a PostgreSQL user and database for Saleor:

sudo su - postgres
createuser saleoruser
psql
ALTER USER saleoruser WITH PASSWORD 'password';
CREATE DATABASE saleordb with OWNER saleoruser;
\q
exit

Now, navigate to the "saleor" directory and rename the "saleor/settings/local.py.example" file:

cd saleor
mv saleor/settings/local.py.example saleor/settings/local.py

Then, open the file for editing:

nano saleor/settings/local.py

Edit the database settings in the file as follows:

DATABASES = {
    'default': {
        'ENGINE': 'django.db.backends.postgresql',
        'NAME': 'saleordb',
        'USER': 'saleoruser',
        'PASSWORD': 'password',
        'HOST': 'localhost',
        'PORT': '5432',
    }
}

Step 9: Running Migrations

Run the following command to apply necessary changes to the database:

python manage.py migrate

Step 10: Create Admin Account

Create a superuser account for the Saleor admin panel:

python manage.py createsuperuser

Follow the prompts to set a username, email, and password.

Step 11: Starting Saleor

Finally, start the Saleor development server using the following command:

python manage.py runserver

You should see the following output:

Watching for file changes with StatReloader
Performing system checks...

System check identified no issues (0 silenced).
Django version 3.1.4, using settings 'saleor.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.

To access the Saleor admin panel, open a web browser and go to http://your_server_IP_address:8000/dashboard/login/. Log in with the superuser account created earlier.

Congratulations! You have successfully installed Saleor on Ubuntu Server Latest. You can now customize and start building your online store.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!