-
Notifications
You must be signed in to change notification settings - Fork 4
Command Line Reference
Run these with php artisan from the application directory. In Docker, prefix
with docker compose exec cortendesk.
Several of these are the way back in when the console itself will not let you sign in, so it is worth knowing they exist before you need them.
php artisan cortendesk:2fa-reset <username>Disables TOTP on that account so they can sign in with their password and re-enrol. This is the answer to "the administrator lost their phone" and it does not require console access.
php artisan cortendesk:email-verification off
php artisan cortendesk:email-verification on
php artisan cortendesk:email-verification # report current stateUse off when mail has broken while emailed sign-in codes are required —
otherwise nobody can complete a sign-in. Run with no argument to report the
current state and relay health.
Not an artisan command — an environment variable:
CORTENDESK_OIDC_DISABLED=true
Forces SSO off regardless of stored settings and restores the password form. Needed when password sign-in has been disabled and the identity provider is unreachable; see Single sign-on.
php artisan cortendesk:prune-logs
php artisan cortendesk:prune-logs --days=90 # override the configured windowDeletes rows older than the retention window across connections, file transfers,
logins, alarms and the console audit trail. Deletes in chunks so it does not lock
tables on a large install. Does nothing when retention is 0 (keep forever).
Runs nightly on the scheduler.
php artisan cortendesk:prune-invitationsRemoves expired invitations, long-accepted ones, and expired trusted-device records. Hygiene only — expiry is enforced at redemption regardless.
php artisan cortendesk:close-stale-sessionsCloses sessions belonging to devices that have stopped heartbeating — a machine that was rebooted, unplugged or had its service stopped never reports its session closed, so without this it would show as active indefinitely.
Runs every five minutes on the scheduler.
php artisan cortendesk:import-lejianwen <path-to-sqlite-db>Imports users (with passwords intact), devices, address books and audit history. See Importing from rustdesk-api.
Everything above marked "runs on the scheduler" needs Laravel's scheduler running.
- Docker — already running inside the container. Nothing to do.
- Manual install — add the cron entry, or none of the scheduled jobs ever run:
* * * * * cd /path/to/cortendesk && php artisan schedule:run >> /dev/null 2>&1
Without it, logs grow forever and sessions from powered-off machines pile up as permanently active.