Strapi comes with a full featured Command Line Interface (CLI) which lets you scaffold and manage your project in seconds.
Start your Strapi application with autoReload enabled. Learn more
npm run develop
# or
yarn develop
Start Strapi against your own .env database, exactly like develop, after
checking the giis-web-server content API token. If that token exists, its
permissions are reset to the allowlist in
doc/server-to-server-data-access.md; if it does not exist, the command says so
and starts Strapi without creating or changing any token. Unlike seed:start,
this never creates a database and never touches your data.
npm run dev:localSkip only the token check with:
npm run dev:local -- --skip-token-syncStart your Strapi application with autoReload disabled. Learn more
npm run start
# or
yarn start
Build your admin panel. Learn more
npm run build
# or
yarn build
The /api/auth/passwordless/request and /api/auth/passwordless/verify routes
send OTP email through the Strapi email plugin. Development talks to Mailpit
over local SMTP with @strapi/provider-email-nodemailer, configured in
config/plugins.ts. Every deployed environment sends through Brevo's HTTP API
instead, via the provider in src/utils/email/ that src/index.ts installs at
bootstrap. That provider wraps Brevo's official @getbrevo/brevo client, which
supplies the per-request timeout and retry budget in
src/utils/email/constants.ts.
The split exists because Railway blocks outbound SMTP on every port (25, 465, 587, 2525) below its Pro plan, so a relay connection never completes and sends fail as a ten-second connect timeout rather than an authentication error. HTTPS works on every plan and reports per-message delivery status in the response.
In development, email is sent to Mailpit at localhost:1025 without
authentication. Start Mailpit as a Homebrew service:
brew services start mailpitRun Strapi with npm run develop, then view captured messages at
http://localhost:8025. Set MAILPIT_HOST or MAILPIT_PORT only if your local
installation uses different values.
Staging and production share one code path and differ only by the BREVO_API_KEY
and EMAIL_DEFAULT_* values documented in .env.example. Before the first
deployment, the Brevo account needs:
- A verified sender. Add the
EMAIL_DEFAULT_FROMaddress under Senders and confirm the six-digit code Brevo emails to it. Sending fails outright if the address is not a verified sender. - A REST API key from the "API keys" tab of the SMTP & API page, set as
BREVO_API_KEY. Brevo issues SMTP keys and API keys separately; they are not interchangeable, and an SMTP key here is rejected with a 401. Strapi refuses to boot outside development without this variable.
The sign-in code email can be edited in Brevo instead of in this repository. Set
BREVO_OTP_TEMPLATE_ID to the numeric id of a Brevo template and deployed
environments render that template; leave it unset and they send the inline body
from src/api/passwordless-otp/utils/build-otp-email.ts. Changing the design
afterwards is a Brevo edit, not a deployment.
To add one:
- In Brevo, go to Campaigns → Templates → New template, and set it to Transactional.
- Write the subject and body, referencing the code as
{{ params.code }}and the validity window as{{ params.expiryMinutes }}. A placeholder that does not match a key inbuildOtpEmailrenders empty, so the two change together. - Activate the template — Brevo refuses to send a draft.
- Copy the id from the template list and set
BREVO_OTP_TEMPLATE_ID.
The template supplies the subject and body. The sender still comes from
EMAIL_DEFAULT_FROM, so staging and production can point one template at
different verified senders. A malformed id fails the boot rather than silently
falling back to the inline body.
Development never uses the template: Mailpit has no Brevo behind it, so the nodemailer provider drops the template fields and sends the inline body. A local sign-in code stays readable in Mailpit no matter what the template holds.
Unlike SES there is no sandbox to escape, so a new account can send to any recipient immediately. The free tier is capped at 300 emails a day, shared across every environment pointed at the same account.
Until the sending domain is authenticated, Brevo rewrites the domain part of
the sender to <account-id>.brevosend.com on delivery. That is deliverable and
fine for staging, but it reads as untrustworthy on a sign-in code, so
authenticate the domain (Brevo code, DKIM, DMARC) before real users arrive.
Deliverability observed before that point says nothing about deliverability
after it.
Bounces and spam complaints appear in the Brevo dashboard by default, so a bounced sign-in code is visible without extra configuration. This is what the SES configuration set previously provided.
Strapi gives you many possible deployment options for your project including Strapi Cloud. Browse the deployment section of the documentation to find the best solution for your use case.
yarn strapi deploy
- Resource center - Strapi resource center.
- Strapi documentation - Official Strapi documentation.
- Strapi tutorials - List of tutorials made by the core team and the community.
- Strapi blog - Official Strapi blog containing articles made by the Strapi team and the community.
- Changelog - Find out about the Strapi product updates, new features and general improvements.
Feel free to check out the Strapi GitHub repository. Your feedback and contributions are welcome!
- Discord - Come chat with the Strapi community including the core team.
- Forum - Place to discuss, ask questions and find answers, show your Strapi project and get feedback or just talk with other Community members.
- Awesome Strapi - A curated list of awesome things related to Strapi.
🤫 Psst! Strapi is hiring.