Appearance
Command-line install
php artisan replora:install does everything the web installer does, in one command: server check, purchase code and modules, .env, tables and the first administrator. Use it on a VPS, in a Docker image or in a deployment script.
Interactive
Run it in the application folder as the web server user and answer the questions:
bash
cd /var/www/replora
sudo -u www-data php artisan replora:installIt asks, in this order: Site address (suggested http://127.0.0.1:8000, what php artisan serve uses, unless APP_URL is already set), Purchase code, Database host (127.0.0.1), Database port (5432), Database name, Database user, Database password, Admin name, Admin email, Admin password (10+ characters) and, with the SaaS package, the Edition.
Every option
| Option | Default | What it does |
|---|---|---|
--url= | asked | The address people open the dashboard with, e.g. https://analytics.example.com (or http://127.0.0.1:8000 for php artisan serve). Saved as APP_URL; sign-in is set up for that host and port (SANCTUM_STATEFUL_DOMAINS), and the license is attached to its domain |
--purchase-code= | asked | Your purchase code. See Your purchase code |
--skip-license | off | Go on without a code. Only builds that allow it (every module bundled); otherwise This copy needs a purchase code: use --purchase-code=… |
--db-host= | 127.0.0.1 | PostgreSQL host name or IP address |
--db-port= | asked (5432) | PostgreSQL port, 1–65535 |
--db-database= | asked | Database name: letters, numbers, _, $ and -, at most 63 characters |
--db-username= | asked | Database user (one line, at most 80 characters) |
--db-password= | asked | Database password (may be empty: pass --db-password=) |
--admin-name= | asked | The first administrator's name |
--admin-email= | asked | Their sign-in email |
--admin-password= | asked | Their password, at least 10 characters |
--mode= | asked with the SaaS package, else single | single or saas (saas needs the saas/ folder). Saved as REPLORA_MODE |
--no-interaction / -n | off | Never ask: every value must be given as an option |
Unattended install
For scripts, CI and container entrypoints pass every value and --no-interaction:
bash
php artisan replora:install --no-interaction \
--url=https://analytics.example.com \
--purchase-code="$REPLORA_PURCHASE_CODE" \
--db-host=db --db-port=5432 --db-database=replora --db-username=replora --db-password="$DB_PASSWORD" \
--admin-name="Alex Morgan" [email protected] --admin-password="$ADMIN_PASSWORD" \
--mode=singleOn an installed site the command refuses to run (Replora is already installed., exit code 1), so an entrypoint can call it on every start: check the exit code, or test for storage/app/replora-installed.json first.
Keep secrets out of your shell history
Options typed on the command line end up in ~/.bash_history and in the process list. In scripts, read them from environment variables as above, or leave the passwords out and type them when asked.
What it does
- Refuses on an installed site.
- Checks the server like the installer's first step and stops with every failed item and its fix (
✗ PHP extension: zip — Enable the zip extension…). - Prepares
.env: copies.env.examplewhen there is no.envand creates a freshAPP_KEY. - Purchase code: asks the license server, installs the modules it sends (Downloading the modules… Checking the download… Installing the modules…), then prints Purchase code verified. Because this process started without the modules, the installation continues in a fresh process with the same options; you don't need to do anything.
- Validates the answers (address, host, port, names, email, password length, edition) and stops with the reasons.
- Database: tests the connection (Connecting to the database and creating tables…), writes the database,
APP_URL,APP_ENV=production,APP_DEBUG=false,SESSION_DRIVER=file,CACHE_STORE=file,QUEUE_CONNECTION=databaseandSANCTUM_STATEFUL_DOMAINSto.env, and runs every migration. - Administrator: creates the first user (an administrator with their own account) and refuses if any user exists (An account exists already. Sign in instead.).
- Finishes: writes
REPLORA_MODEand the installed marker that closes the web installer, then prints Replora is installed. Sign in at https://…/login as ….
If .env can't be written at the end, the command prints a warning such as Add REPLORA_MODE=saas to .env (it could not be written).
More commands for a new installation
| Command | When |
|---|---|
php artisan replora:admin --name= --email= --password= --organization= | Create another administrator (asks for anything left out). Useful when you are locked out |
php artisan replora:core [--purchase-code=] [--force] | Download the modules again (deleted or not copied modules/ folders) |
php artisan replora:doctor [--single-server] | Check the configuration for production and scaling |
php artisan replora:health | Run the service checks of the System page |
php artisan replora:recaptcha off | Switch reCAPTCHA off when a wrong key keeps everyone from signing in |
Every command is listed in Commands.
