In this section · 9 articles

Install Laramin from the command line

Install Laramin with one command, php artisan app:install. It checks your environment, builds the database, seeds starter data and records versions.

Applies to
Core 12.0 and later
Who can do this
Platform owner, Developer
Where
Command line, in the application folder
On this page

The command-line installer suits developers, CI pipelines and servers you can reach over SSH. It uses the same install steps as the web installer.

Before you start

  • Have shell access to the server.
  • Install PHP 8.3 or later with the required extensions, Composer 2.x, and Node.js 18 or later with npm.
  • Create an empty MySQL 5.7 or 8.x database.

Steps

  1. Copy the example environment file:

    Bash
    cp .env.example .env
  2. Open .env and set DB_CONNECTION, DB_HOST, DB_PORT, DB_DATABASE, DB_USERNAME and DB_PASSWORD. Set APP_URL to your site's address.

  3. Install the PHP dependencies:

    Bash
    composer install
  4. Build the front-end assets:

    Bash
    npm ci && npm run build
  5. Run the installer:

    Bash
    php artisan app:install
  6. Wait for Installation complete. The command also tells you where it wrote the install log.

Tip: The wrapper scripts run steps 1 to 5 for you: ./install.sh on Linux or macOS, and .\install.ps1 in Windows PowerShell. Pass --fresh (or -Fresh in PowerShell) to rebuild an existing database.

Options

OptionWhat it does
--freshDrops all tables and rebuilds the database. This deletes everything in it.
--no-seedSkips database seeding.
--no-modulesSkips the module seeders. Core seeders still run.
--no-keyDoesn't generate a new APP_KEY.

Without --fresh, the installer refuses to run against a database that already has tables.

Danger: --fresh drops every table in the database before it rebuilds. Never run it against a database that holds data you want to keep.

What happens next

The installer seeds a default super admin: admin@admin.com with the password 12345678.

Careful: Sign in and change that password straight away. See Change your password. If you ran the installer with --no-seed, no account is created, so there is nobody to sign in as.

Then add the scheduler to your crontab so that scheduled jobs run once a minute:

Plain text
* * * * * cd /path/to/laramin && php artisan schedule:run >> /dev/null 2>&1

Replace the highlighted values with your own.

Next, sign in for the first time.