Local Installation — Windows
Install and run SaleX on your Windows PC. Follow the steps in order — each one explains what you are doing, why, and what success looks like.
On this page
Before you start
You need about 30–45 minutes. Admin rights on the PC (for installing Node.js and PostgreSQL), and the SaleX package you downloaded from Codecanyon.
The installation, step by step
-
Install Node.js
What/why: Node.js runs the application. SaleX needs version 20 or newer.
Go to
https://nodejs.org, download the LTS installer (.msi), and run it. Keep clicking “Next” — the defaults are fine. When asked, leave “Automatically install the necessary tools” unchecked (not required).Verify: open PowerShell (press Win, type “PowerShell”, press Enter) and run:
node -v npm -v✓ Success: version numbers like
v22.11.0and10.9.0. If PowerShell says “not recognized”, close and reopen PowerShell, or restart the PC. -
Install PostgreSQL (skip if using a hosted database)
What/why: PostgreSQL stores all SaleX data.
Download the installer from
https://www.postgresql.org/download/windows/, run it, and when asked for a password for thepostgresuser, write it down — you need it in step 6. Keep the default port 5432. The bundled pgAdmin tool is optional. -
Extract the SaleX package
What/why: The downloaded file is a ZIP archive containing the source code.
Right-click the ZIP → “Extract All…” → choose a simple path without spaces, e.g.
C:\salex.Paths with spaces or non-English characters can break build tools. Use something likeC:\salex, notC:\Users\Me\My Documents\SaleX Copy (1). -
Open the folder in a terminal
What/why: All commands run inside the project folder.
In File Explorer, open
C:\salex, click the address bar, typepowershelland press Enter. A PowerShell window opens already in that folder.✓ Success: the prompt ends with
C:\salex>. -
Install dependencies
What/why: Downloads all libraries SaleX needs into a
node_modulesfolder. One-time step (repeat after updates).npm installThis takes 2–5 minutes and prints progress. Some “deprecation” warnings are normal.
✓ Success: ends with “added … packages” and no error lines. A
node_modulesfolder now exists.If it fails: see the troubleshooting entry “npm install fails” in Troubleshooting — usually fixed by deleting
node_modulesandpackage-lock.jsonand re-running, or by upgrading Node.js to v20+. -
Create the environment file
What/why:
.envholds your private settings (database password, security keys).In PowerShell, still inside
C:\salex:copy .env.example .env notepad .envFill in at least these values (full reference: Environment Configuration):
DATABASE_URL="postgresql://postgres:YOUR_PG_PASSWORD@localhost:5432/salex" DIRECT_URL="postgresql://postgres:YOUR_PG_PASSWORD@localhost:5432/salex" APP_URL="http://localhost:3000" AUTH_SECRET="paste-a-long-random-string-here"Generate a random string for AUTH_SECRET in PowerShell:
-join ((48..57) + (65..90) + (97..122) | Get-Random -Count 48 | % {[char]$_})Save and close Notepad. Replace
YOUR_PG_PASSWORDwith the PostgreSQL password from step 2. -
Create the database and load the schema
What/why: Creates an empty
salexdatabase, then creates all tables.Create the database (enter the postgres password when prompted):
psql -U postgres -c "CREATE DATABASE salex;"If
psqlis “not recognized”, open “SQL Shell (psql)” from the Start menu instead and type the CREATE DATABASE line there, then close it. Then apply the schema:npm run db:deploy✓ Success: Prisma prints the list of applied migrations and “migrations applied”-style output. Errors here almost always mean the DATABASE_URL is wrong — recheck the password.
-
Load starter data (seed)
what/why: Creates your first administrator account, settings, and demo content so the site is not empty.
npm run db:seedThe admin account comes from
.env: setSEED_SUPER_ADMIN_EMAILandSEED_SUPER_ADMIN_PASSWORDbefore running the seed (any plaintext dev password is hashed automatically). Details: First-Time Setup. -
Start the development server
npm run dev✓ Success: the terminal shows “Ready in …s” with a Local:
http://localhost:3000line. Leave this window open — the server stops when you close it. -
Open SaleX in the browser
Visit
http://localhost:3000— the storefront loads. Sign in athttp://localhost:3000/loginwith your seed admin email/password, then openhttp://localhost:3000/admin.Now complete the First-Time Setup checklist: store name, currency, shipping, payments.
After it runs
- Stop the server: click the terminal and press Ctrl+C.
- Start it again later: open the folder in PowerShell and run
npm run dev. The database keeps its data. - Build for production test:
npm run buildthennpm run start(see Server Deployment).
.env file contains passwords and keys. When asking for support, share only the variable names you are unsure about — never its contents, and never your database password.