Skip to content

Commands ​

Replora's server is run with Laravel's php artisan. This page lists every command Replora adds, with its options, what runs on a schedule, and the scripts of the source repository for building, checking and releasing.

ReferenceAdministrators, DevOps, developersSingle user · SaaS

Run artisan commands in the application folder, as the user the web server runs as (so files it creates stay writable), e.g. sudo -u www-data php artisan replora:health.

Installation and accounts ​

replora:install ​

Installs Replora from the command line (VPS, Docker, CI): checks the server, the purchase code (and downloads the modules it brings), writes .env, creates the tables and the first administrator. Asks for anything not given as an option; with --no-interaction every value must be passed. Refuses to run on an installed site.

OptionWhat it does
--url=Site address, e.g. https://analytics.example.com, or http://127.0.0.1:8000 for php artisan serve. The license is attached to this domain.
--db-host=Database host (default 127.0.0.1).
--db-port=, --db-database=, --db-username=, --db-password=PostgreSQL connection.
--admin-name=, --admin-email=, --admin-password=The first administrator (password: 10+ characters).
--mode=single (self-hosted) or saas (sign-up, plans, billing; needs the saas/ folder). Change later with REPLORA_MODE.
--purchase-code=Your Replora purchase code.
--skip-licenseGo on without a code: only builds that allow it (REPLORA_LICENSE_REQUIRED=false, every module bundled).
sh
php artisan replora:install --no-interaction \
  --url=https://replora.example.com --mode=single --purchase-code=XXXX-XXXX \
  --db-database=replora --db-username=replora --db-password=secret \
  --admin-name="Ada Lovelace" [email protected] --admin-password='a-long-password'

replora:admin ​

Creates an administrator with their own account (organization): the owner of a Single user installation, or the first operator of a SaaS installation. Asks for missing values unless --no-interaction.

OptionWhat it does
--name=Full name
--email=Sign-in email
--password=Password (asked when missing)
--organization=Account name

serve ​

php artisan serve behaves as usual on an installed site. While Replora isn't installed yet it never restarts itself when the installer writes .env (Laravel's restart would cut the installer's database step short); every request still reads .env afresh.

Updates and modules ​

CommandOptionsWhat it does
replora:update--check only looks for a new release · --yes installs without asking · --rollback puts the files of the previous version backChecks the release feed and installs a new version: downloads the signed release, checks it, keeps the current files as a backup, then runs replora:upgrade in a fresh process.
replora:upgrade--no-maintenance keeps the site open while the update finishesFinishes an update after new files are in place (uploaded by hand or installed by replora:update): new migrations, upgrade steps, fresh caches, restarted workers, behind the maintenance page.
replora:core--purchase-code= (default: the one saved at installation) · --force downloads and installs again even when the modules are currentDownloads and installs this version's modules (every module except Installer) with the purchase code: repairs a site whose module folders were deleted or not copied, or moves an installation to a new purchase code.

See Updating & rolling back.

Checks and maintenance ​

CommandOptionsWhat it does
replora:doctor--single-server only checks what a single-server installation needsChecks the configuration for production and for several servers behind a load balancer: sessions, cache and rate limits not on one machine, recordings storage, ingest through a queue, WebSockets shared across servers, edition and module problems. Exits with 1 when something must be fixed, so a deploy pipeline can stop on it.
replora:health—Runs the service checks (database, queue, email, website…) and emails the administrators when a check starts failing or recovers (once per change). Scheduled every five minutes.
replora:recaptcha offstate: offSwitches reCAPTCHA off (keeps the keys), for when a wrong key keeps everyone from signing in.
replora:geoip—Downloads the visitor-location databases that are switched on (MaxMind GeoLite2 City, DB-IP City Lite). Scheduled weekly.
recordings:prune—Deletes recordings older than each site's retention (the site's choice capped by the plan; the public demo's after REPLORA_DEMO_RETENTION_DAYS): files first, then rows. Scheduled nightly.

Scheduled commands ​

These run from Laravel's scheduler: add one cron line, * * * * * cd /path/to/replora && php artisan schedule:run >> /dev/null 2>&1. See Scheduler (cron).

CommandWhenModuleWhat it does
(heartbeat)Every minuteCoreNotes that the scheduler runs (the "Scheduled tasks" check reads it)
alerts:digestEvery minuteAlertsSends the matches an alert's quiet time held back, once it is over
replora:healthEvery 5 minutesCoreService checks, emails on changes
tickets:remindEvery 5 minutesTickets (SaaS)Reminds the support team of tickets about to miss their response time, alerts once one did
summaries:digestsHourlySummariesWrites the AI site summaries that are due
tickets:auto-closeHourlyTickets (SaaS)Closes answered tickets the customer didn't come back to
replora:update --checkTwice a dayCoreLooks for a new release, so the dashboard can say one is waiting
recordings:pruneDaily 03:00RecordingsDeletes expired recordings
funnels:regressionsDaily 07:00FunnelsEmails account managers about funnel steps that convert worse than the week before (at most once a week per funnel)
plans:trial-remindersDaily 09:00Plans (SaaS)Tells account managers their free trial ends soon (once per trial)
replora:geoipTuesdays 04:00RecordingsRefreshes the location databases
affiliates:payouts-due1st of the month 09:00Affiliates (SaaS)Emails administrators the affiliates ready to be paid

Each scheduled command runs without overlapping; the modules' commands run on one server only when several servers share a cache. All of them can also be run by hand.

Laravel commands you will use ​

CommandWhen
php artisan queue:workThe background worker that processes recordings, email, alerts and AI jobs. Keep it running with Supervisor or systemd. See Background worker.
php artisan queue:work --queue=ingestA worker for recording batches only, with RECORDINGS_INGEST_QUEUE=ingest.
php artisan queue:restartAfter an update or a .env change (the upgrade does it for you).
php artisan schedule:runCalled by cron every minute.
php artisan reverb:startThe WebSocket server, with REPLORA_REALTIME=websocket.
php artisan migrate --forceNew tables after adding a module by hand.
php artisan config:cache, route:cache, optimize:clearCache configuration and routes; clear them after editing .env or modules.
php artisan down / upLaravel's maintenance mode (the dashboard has its own maintenance switch on the System page).

Repository scripts (source) ​

At the repository root (see Building from source):

ScriptWhat it does
pnpm buildOffline player, tracker (t.js), npm packages and the dashboard
pnpm build:trackerOnly the tracker
pnpm build:packagesOnly @replora/browser and @replora/react
pnpm devVite dev server for the dashboard
pnpm testVitest: UI kit, tracker, npm packages, dashboard logic
pnpm test:coverageThe same with coverage; fails below 100 %
pnpm typecheckTypeScript checks
pnpm i18n / pnpm i18n:writeCheck translations / add missing keys and remove unused ones
pnpm releaseA signed release zip and update manifest (--edition=single|saas, --bundle, --url=, --notes=)
pnpm release:keygenCreates the release signing key
pnpm release:coreBuilds the signed module pack on its own
pnpm release:core-keygenCreates the module-pack signing key

In apps/standalone:

ScriptWhat it does
composer checktools/check-imports.php, tools/check-docs.php, tools/check-modules.php, Pint, PHPUnit with coverage, tools/check-coverage.php (100 %)
composer testClears the config cache and runs php artisan test
composer setupInstalls dependencies, creates .env and the app key, migrates and builds

The tools/ scripts can also run directly:

ScriptWhat it does
node tools/release.mjsSame as pnpm release
node tools/release-core.mjsSame as pnpm release:core
node tools/release-keygen.mjs, node tools/core-keygen.mjsThe key generators
node tools/check-i18n.mjs [--write]The translation check
node tools/i18n-pending.mjs export <dir> / import <dir>Hand untranslated texts to translators and take them back
node tools/i18n-reuse.mjs <other repo>Fill empty translations from another product's catalogs
node tools/offline-player.mjsBuilds the offline player for recording downloads
php tools/check-modules.php (in apps/standalone)Modules don't depend on each other; shared code never on saas/
php tools/check-imports.php, php tools/check-docs.php, php tools/check-coverage.php [clover.xml] [min %]The other PHP checks

Replora: see what your visitors see.