Skip to content

Importing from rustdesk api

Marc Pope edited this page Jul 26, 2026 · 1 revision

Importing from lejianwen/rustdesk-api

One command migrates an existing lejianwen/rustdesk-api install: users, devices, address books and audit history.

php artisan cortendesk:import-lejianwen /path/to/rustdeskapi.db

The argument is the path to that project's SQLite database file.

Always dry-run first

php artisan cortendesk:import-lejianwen /path/to/rustdeskapi.db --dry-run

Runs the entire import inside a transaction and rolls it back at the end. You get the full per-table report — imported, updated, skipped — with nothing written. Do this before the real run, every time.

Options

Option Effect
--dry-run Import inside a transaction, then roll back. Changes nothing.
--wipe Truncate the target tables before importing.

--wipe destroys existing CortenDesk data in the tables it touches. It is for re-running an import into a console that has nothing worth keeping. Take a database backup first — this is not undoable.

Passwords

Users are imported with their password hashes intact where the source hash is bcrypt, so people sign in with the credentials they already had.

Any account whose source hash is not bcrypt cannot be carried over. Those are imported with a random password and listed at the end of the run. Those users need a password reset or a new password set by an administrator — they will not be able to sign in until then. Read that list; do not skip past it.

After importing

  1. Check the per-table counts against what you expected.
  2. Set passwords for any account named in the non-bcrypt list.
  3. Confirm device groups and ownership look right — see Users and access scoping.
  4. Point your clients' API Server at CortenDesk.

Devices re-register themselves on their next heartbeat, so presence fills in on its own within a minute or so of clients being repointed.

Related

Clone this wiki locally