Overview
Theevershop install command runs an interactive setup wizard that guides you through configuring your EverShop store. It creates the database connection, runs migrations, and creates an admin user.
Usage
When to Use
Run the install command when:- Setting up EverShop for the first time
- Installing on a local development machine
- Deploying to a new server
docker-compose.yml file.
Interactive Prompts
The installer will ask for:Database Configuration
Admin User Details
Password Requirements
Admin password must:- Be at least 8 characters long
- Contain at least one letter
- Contain at least one digit
What It Does
1. Check Existing Installation
Verifies if the system is already installed:2. Test Database Connection
Tries to connect with SSL first, falls back to non-SSL:3. Verify PostgreSQL Version
Ensures PostgreSQL 13.0 or higher:4. Create .env File
Writes database credentials to.env:
5. Create Directories
Creates required folders:6. Create Admin User Table
Creates the admin_user table:7. Insert Admin User
Creates the admin account with hashed password:8. Run Migrations
Executes database migrations for all core modules:Installation Progress
Visual progress during installation:After Installation
Next steps:Environment Variables
The installer creates these environment variables in.env:
| Variable | Description | Example |
|---|---|---|
DB_HOST | Database host | localhost |
DB_PORT | Database port | 5432 |
DB_NAME | Database name | evershop |
DB_USER | Database user | postgres |
DB_PASSWORD | Database password | your_password |
DB_SSLMODE | SSL mode | require or disable |
PostgreSQL Requirements
Minimum Version
PostgreSQL 13.0 or higher is required.Required Extensions
EverShop uses:uuid-ossp- UUID generationpg_trgm- Text search
Database Setup
Create Database
Before running install:Database Permissions
The database user needs:CREATE- Create tablesINSERT- Insert dataUPDATE- Update dataDELETE- Delete dataSELECT- Query data
Troubleshooting
Already Installed Error
- Remove
.envfile to reinstall - Or skip install and run
npm run build
Database Connection Failed
-
Verify PostgreSQL is running:
-
Check database exists:
-
Test connection:
PostgreSQL Version Error
SSL Certificate Error
- Disable SSL in PostgreSQL configuration
- Restart PostgreSQL
- Run install again
Password Validation Failed
Permission Denied
Automated Installation
For CI/CD or automated deployments, set environment variables before installation:Docker Installation
For Docker deployments, use environment variables indocker-compose.yml:
evershop install in Docker - the container handles initialization.
Related Commands
evershop build- Build after installationevershop start- Start production serverevershop user:create- Create additional admin users