Install Logto
Interactive
Run the command below to proceed an interactive installation in your terminal:
- CLI
- npm
logto init
npm init @logto@latest
Options and silent installation
Alternatively, you can add any of the options below (all optional) to skip some questions:
| Option | Description |
|---|---|
--db-url | The Postgres URL to Logto database. |
-p, --path | Path to your Logto instance, must be a non-existing path. |
--ss | Skip Logto database seeding. |
--disable-admin-pwned-password-check, --dapc | Seed the admin tenant with the Have I Been Pwned (HIBP) password breach check disabled, for air-gapped or offline deployments. See Seed for air-gapped or offline deployments. |
Run logto init --help for full help info.
Here's an example for performing a silent installation (e.g., in CI):
- CLI
- npm
logto init -p ./logto --db-url postgresql://your-postgres-dsn:5432/logto --oc
npx @logto/cli init -p ./logto --db-url postgresql://your-postgres-dsn:5432/logto --oc
It will do the following things in order:
- Download and extract Logto into
./logto - Try to init and seed database with URL
postgresql://your-postgres-dsn:5432/logto - Add Logto official connectors to
./logto/packages/core/connectors