Everyone

Installation

Step-by-step guide to installing Opterius Commerce via the web installer or CLI on a fresh Linux server.

Last updated 1776211200
  • Default Admin Credentials
  • Queue Worker (Supervisor)
  • Scheduler (Cron)
  • Post-Install Checklist
  • Installation

    Opterius Commerce can be installed using the web installer (recommended for most users) or the CLI method (recommended for automation and advanced setups).

    [!IMPORTANT] Complete the System Requirements check before proceeding.


    Option A: Web Installer

    1. Clone the repository to /opt/opterius:
      git clone https://github.com/opterius/commerce.git /opt/opterius
      cd /opt/opterius
      composer install --no-dev --optimize-autoloader
      
    2. Point your web server's document root at /opt/opterius/public.
    3. Visit https://yourdomain.com/install in your browser.
    4. Follow the on-screen steps: database credentials → admin account → settings.
    5. The installer writes .env, runs migrations, and seeds defaults automatically.

    Option B: CLI Installation

    1. Clone and install dependencies

    git clone https://github.com/opterius/commerce.git /opt/opterius
    cd /opt/opterius
    composer install --no-dev --optimize-autoloader
    

    2. Configure the environment

    cp .env.example .env
    php artisan key:generate
    

    Edit .env and set at minimum:

    APP_URL=https://yourdomain.com
    DB_HOST=127.0.0.1
    DB_DATABASE=opterius_commerce
    DB_USERNAME=opterius
    DB_PASSWORD=your_secure_password
    REDIS_HOST=127.0.0.1
    MAIL_MAILER=smtp
    MAIL_HOST=smtp.yourprovider.com
    MAIL_PORT=587
    MAIL_USERNAME=you@yourdomain.com
    MAIL_PASSWORD=your_mail_password
    MAIL_FROM_ADDRESS=noreply@yourdomain.com
    

    3. Build frontend assets

    [!TIP] Build assets on your local machine and copy the public/build directory to the server if Node.js is not installed server-side.

    npm ci
    npm run build
    

    4. Run migrations and seed

    php artisan migrate --force
    php artisan db:seed --force
    

    5. Set file permissions

    chown -R www-data:www-data /opt/opterius
    chmod -R 755 /opt/opterius/storage /opt/opterius/bootstrap/cache
    

    Default Admin Credentials

    The seeder creates an initial admin account:

    Field Value
    Email admin@example.com
    Password password

    [!WARNING] Change these credentials immediately after first login at Admin → Staff → your profile. The default password is intentionally obvious — leaving it in place is a critical security risk.


    Queue Worker (Supervisor)

    Commerce uses Laravel queues for invoice generation, email sending, and provisioning. Set up Supervisor to keep the worker running:

    # /etc/supervisor/conf.d/opterius-worker.conf
    [program:opterius-worker]
    command=php /opt/opterius/artisan queue:work redis --sleep=3 --tries=3 --timeout=90
    directory=/opt/opterius
    user=www-data
    autostart=true
    autorestart=true
    redirect_stderr=true
    stdout_logfile=/var/log/opterius-worker.log
    
    supervisorctl reread && supervisorctl update && supervisorctl start opterius-worker
    

    Scheduler (Cron)

    Add this single cron entry to run all scheduled tasks (renewal invoices, suspension checks, etc.):

    * * * * * www-data php /opt/opterius/artisan schedule:run >> /dev/null 2>&1
    

    Post-Install Checklist

    • Change default admin email and password
    • Set company name and address (Admin → Settings → Company)
    • Configure default currency (Admin → Settings → Currencies)
    • Add SMTP credentials and send a test email
    • Add Stripe or PayPal keys if accepting card/PayPal payments
    • Confirm queue worker is running: supervisorctl status opterius-worker
    • Confirm cron is active: check scheduler log in Admin → Activity Log

    Continue with First Login & Setup Wizard.