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 the options below to skip some questions:
# All these options are optional
--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
--oc Add official connectors after installation
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