<@U04UQ68083H> can I build my own docker image bas...
# ory-copilot
r
@chilly-king-10285 can I build my own docker image based on the
master
branch
b
A message from kapa.ai
Yes, you can technically build your own Docker image based on the master branch for Ory projects like Kratos or Keto. However, this approach is generally not recommended for production use. The maintainers note that the make docker command is primarily intended for maintainers and contributors, and building your own image from master may result in issues or missing version/tag information. For production, it is strongly recommended to use officially released and tagged Docker images to ensure stability and compatibility. If you do build from master, be aware that you may encounter hiccups and the resulting image may only be tagged as master, not with a specific version number [Local docker image doesn't contains tag/version information, only points to master](https://github.com/ory/keto/discussions/1744) [Docker images](https://www.ory.sh/docs/kratos/guides/docker). If you still wish to proceed, you can clone the repository, check out the master branch, and use the provided Dockerfiles to build your image. But again, this is best suited for development or experimentation, not for production deployments.
r
@chilly-king-10285 I keep getting this error when I try to run the Dockerfile-build in kratos
Copy code
unrecognized import path "code.dny.dev/ssrf": https fetch: Get "<https://code.dny.dev/ssrf?go-get=1>": tls: failed to verify certificate: x509: certificate signed by unknown authority
b
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not contain information about the specific error related to the import path code.dny.dev/ssrf or the TLS certificate verification issue you are encountering when running the Dockerfile-build in Kratos. The available documentation covers general Docker build instructions, troubleshooting for building from master, and some common build errors, but does not address this particular certificate or import path problem [Error Running
make docker
](https://github.com/ory/kratos/issues/4448) [Docker images](https://www.ory.sh/docs/kratos/guides/docker). If this is a third-party dependency, you may need to ensure that your build environment trusts the certificate authority used by code.dny.dev, or you may need to contact the maintainers of that dependency for further assistance.
r
@chilly-king-10285 the
make docker
command is missing VERSION arg, which is required during dockerbuild. what is the expected VERSION to be passed in?
b
A message from kapa.ai
The knowledge sources do not explicitly document what value should be passed for the VERSION argument when running make docker for Ory Kratos. However, based on standard practices and the available documentation, the VERSION argument is typically set to the version tag you want the resulting Docker image to represent (for example, v1.3.1 or another release tag). If you are building from the master branch, it may be set to master or a specific commit hash. If you are unsure which VERSION to use, it is recommended to use an official release tag rather than master for stability, as noted in the Docker image usage documentation [Docker images](https://www.ory.sh/docs/kratos/guides/docker). If you are contributing or developing, you may use master or the current commit hash. If the makefile or Dockerfile does not provide guidance, and you are building for production, always prefer a released version tag. If you need further clarification, you may want to check the repository’s README or open an issue for guidance from the maintainers.
r
@chilly-king-10285 I’m getting this error when trying to run
make docker
Copy code
0.397 # <http://github.com/ory/kratos/embedx|github.com/ory/kratos/embedx>
0.397 embedx/embedx.go:99:17: undefined: configx.AddSchemaResources
b
A message from kapa.ai
I'm sorry, but the knowledge sources provided do not contain information about the specific error:
Copy code
embedx/embedx.go:99:17: undefined: configx.AddSchemaResources
when running
make docker
for Ory Kratos. The available sources discuss some common build issues (such as missing build contexts or problems with the
make docker
process), but do not mention this particular undefined symbol or function [Error Running
make docker
](https://github.com/ory/kratos/issues/4448). This error may be related to a mismatch between code and dependencies, or a recent change in the codebase. If you continue to encounter this issue, consider checking for open issues or discussions in the Ory Kratos repository, or reaching out to the maintainers for further assistance.
r
@chilly-king-10285 I’m able to build a local version of the image, how can I run to proof it is working?
b
A message from kapa.ai
To run your locally built Ory Kratos Docker image and verify it is working, you can use the following approach, as described in the official documentation: 1. Run the container with your configuration file Make sure to supply the location of your configuration file using the
--config
flag. For example:
Copy code
docker run -it -e DSN="memory" \      --mount type=bind,source="$(pwd)"/contrib/quickstart/kratos/email-password,target=/home/ory \      <your-local-image-name>:<tag> serve --config /home/ory/kratos.yml
Replace
<your-local-image-name>:<tag>
with the name and tag of your locally built image. This example uses the quickstart configuration and runs Kratos with an in-memory database, which is suitable for local testing [Docker images](https://www.ory.sh/docs/kratos/guides/docker). 2. Check the logs for startup messages A healthy system will show log messages similar to:
Copy code
Starting the admin httpd on: 0.0.0.0:4434    Starting the public httpd on: 0.0.0.0:4433
This indicates that Kratos is running and listening on the expected ports [Clone Ory Kratos and run it in Docker](https://www.ory.sh/docs/kratos/quickstart#clone-ory-kratos-and-run-it-in-docker). 3. Verify the service is accessible You can test the public endpoint with a simple curl command:
Copy code
curl -I <http://127.0.0.1:4433/health/ready>
You should receive a response indicating the service is ready. If you encounter issues, double-check your configuration file and ensure required ports are available and not blocked by other services.
r
@chilly-king-10285 it keep return
identity.schema.json: no such file or directory
b
A message from kapa.ai
The error
identity.schema.json: no such file or directory
means that Ory Kratos cannot find the identity schema file at the path specified in your configuration. According to the official documentation, you need to ensure that: 1. The file exists at the correct path inside the container. For example, if your
kratos.yml
configuration specifies:
Copy code
yaml    identity:      default_schema_id: default      schemas:        - id: default          url: file:///opt/kratos/config/identity.schema.json
then the file must be available at
/opt/kratos/config/identity.schema.json
inside the container. 2. You mount the directory containing
identity.schema.json
into the container at the correct location.
For local testing, you can use a bind mount. For example:
Copy code
sh    docker run -it -e DSN="memory" \      --mount type=bind,source="$(pwd)"/contrib/quickstart/kratos/email-password,target=/opt/kratos/config \      <your-local-image-name>:<tag> serve --config /opt/kratos/config/kratos.yml
This command assumes both
kratos.yml
and
identity.schema.json
are in your local
contrib/quickstart/kratos/email-password
directory and that your config references the schema at
/opt/kratos/config/identity.schema.json
 [Install Ory Kratos](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#install-ory-kratos). 3. The path in your configuration matches the mount point. Double-check that the
url:
field in your config matches where the file will be inside the container. If you still see the error, verify the file exists in the mounted directory and that the mount is working as expected. You can also use
docker exec
to open a shell in the running container and check the file path directly. If you follow these steps and ensure the file is present at the expected location, Kratos should be able to find and load your identity schema file.
r
@chilly-king-10285 how can I stop a binary kratos
b
A message from kapa.ai
The knowledge sources do not explicitly describe how to stop a running Ory Kratos binary. However, since Ory Kratos runs as a standard process when started with the
kratos serve
command, you can typically stop it by sending an interrupt signal (such as pressing
Ctrl+C
in the terminal where it is running) or by terminating the process using standard operating system commands (e.g.,
kill
on Linux/macOS or Task Manager on Windows) [kratos serve](https://www.ory.sh/docs/kratos/cli/kratos-serve). If you are running Kratos as a systemd service, you can stop it with:
Copy code
systemctl stop kratos.service
as described in the systemd setup guide [Run Ory Kratos using systemd](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#run-ory-kratos-using-systemd). If you need more specific instructions for your environment, please provide additional details.
r
@chilly-king-10285 kratos is returning 400 eventhough it saying sending out registration email with code
b
A message from kapa.ai
Ory Kratos currently returns a
400 Bad Request
status code even when a registration or login request is valid and an email (such as a registration or login code) is being sent. This behavior has been widely discussed and is recognized as confusing by many developers, as a
400
status code typically indicates a client error, not a successful operation like sending an email code. The reason for this is that, in the current flow model (v1), Kratos only returns a
200 OK
when the flow is fully completed (e.g., the user is registered or logged in). For intermediate steps—such as when a code is sent for email verification or passwordless login—a non-success code like
400
is returned, even though the request was processed and the email was sent. This is acknowledged as a point of frustration and confusion, and the maintainers have indicated that a more granular and appropriate use of status codes (such as
202 Accepted
for these cases) is planned for a future major version (v2), but not in the current version due to backward compatibility concerns [Requesting a login code returns HTTP 400](https://github.com/ory/kratos/issues/4052). In summary, the
400
response in this context does not mean the request failed; it is a known quirk of the current implementation. You should check the response body for further details, as the email is still being sent even when a
400
is returned. This behavior is expected to improve in future releases.
r
@chilly-king-10285 I can see
Sending out registration email with code.
, however I’m not receiving the code in my phone. is there any layer I can check what message body has been sent out?
b
A message from kapa.ai
Yes, you can check what message body has been sent out by reviewing the logs and the monitoring features provided by Ory. For emails, you can use the Email Delivery page in the Ory Console under Monitoring → Email Delivery. This dashboard shows all emails sent by your project, along with their delivery state and content. However, for SMS messages, the documentation does not mention a similar dashboard for SMS content. For SMS, you can review your Kratos logs. When an SMS is sent, the logs will include details about the HTTP request made to your SMS provider, including the endpoint and sometimes the message template type (e.g.,
registration_code_valid
). For example, you might see log entries like:
Copy code
msg=Courier sent out mailer. ... message_template_type=registration_code_valid message_type=sms ...
This confirms that a message was sent, but the actual message body may not be shown in the logs for security reasons. If you need to see the exact message body, you may need to check your SMS provider's dashboard or logs, as Kratos sends the message body to the provider via HTTP API [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). If you are using a custom SMS provider integration, you can also temporarily enable more verbose logging or inspect the outgoing HTTP requests to see the message content. In summary: - For emails: Use the Ory Console's Email Delivery dashboard. - For SMS: Check your Kratos logs for dispatch confirmation and your SMS provider for the actual message content. The message body itself is not directly shown in the Ory Console for SMS [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms) [Use a custom server to send Ory Identity messages to users](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#troubleshooting).
r
@chilly-king-10285 how can I achieve this temporarily enable more verbose logging or inspect the outgoing HTTP requests to see the message content
b
A message from kapa.ai
To temporarily enable more verbose logging in Ory Kratos, you can set the log level to
debug
or
trace
. This can be done by setting the
LOG_LEVEL
environment variable or by configuring it in your configuration file: Using environment variable:
Copy code
sh export LOG_LEVEL=debug
or for even more detail:
Copy code
sh export LOG_LEVEL=trace
Using configuration file (
kratos.yml
):
Copy code
yaml log:   level: debug   format: text   leak_sensitive_values: false
After setting the log level to
debug
or
trace
, restart your Kratos service. The logs will now include more detailed information about internal operations, including outgoing HTTP requests to your SMS provider. For example, you may see log entries like:
Copy code
msg=Courier sent out mailer. ... message_template_type=registration_code_valid message_type=sms ...
and
Copy code
[DEBUG] POST <https://gate.smsaero.ru/v2/sms/send> ...
These entries confirm that a request was made to your SMS provider and may include additional context about the request [Logs and audit trails](https://www.ory.sh/docs/self-hosted/operations/logging#log-fields). Note: For security, the actual message body and sensitive values are redacted by default. If you need to see sensitive values (such as the message body), you can set:
Copy code
sh export LOG_LEAK_SENSITIVE_VALUES=true
or in your config:
Copy code
yaml log:   leak_sensitive_values: true
Warning: Only enable leaking sensitive values in a secure, development environment, as this will expose personally identifiable information and secrets in your logs [Logs and audit trails](https://www.ory.sh/docs/self-hosted/operations/logging). This approach will help you inspect the outgoing HTTP requests and, if needed, the message content being sent to your SMS provider.
r
@chilly-king-10285 I can see the registration email log, but my http endpoint is not seeing kratos invoking the endpoint
b
A message from kapa.ai
If you can see the registration email log in Kratos, but your HTTP endpoint is not receiving any requests from Kratos, there are a few things to check based on the knowledge sources: 1. Configuration Verification Ensure that your Kratos configuration is correctly set to use the HTTP delivery strategy and that the
url
for your HTTP endpoint is correct. The configuration should look similar to:
Copy code
yaml    courier:      delivery_strategy: http      http:        request_config:          url: <https://your-endpoint.example.com>          method: POST          body: <file://path/to/body.jsonnet>          headers:            Content-Type: application/json          auth:            type: basic_auth # or api_key, if needed            config:              user: your-username              password: your-password
Double-check that the
url
is reachable from the Kratos container or host and that there are no typos or network issues [HTTP based email delivery](https://www.ory.sh/docs/kratos/self-hosted/email-http#configuration). 2. Log Level and Debugging Increase the log level to
debug
or
trace
to see if Kratos is attempting to send the HTTP request. This can help you determine if the request is being made or if there is a configuration or runtime error preventing it [Logs and audit trails](https://www.ory.sh/docs/self-hosted/operations/logging#log-fields). 3. Error Handling If Kratos cannot reach your HTTP endpoint or encounters an error, it should log an error message. Check the logs for any errors related to HTTP delivery. If the logs only show the email being "sent" but no HTTP request, it may indicate a misconfiguration or that the delivery strategy is not set to HTTP. 4. Default Behavior If you see logs indicating "sending out registration email with code" but do not see HTTP requests, Kratos may still be using the default SMTP delivery strategy. Make sure you have updated the configuration and restarted Kratos with the correct settings [Send emails using an HTTP server](https://www.ory.sh/docs/kratos/emails-sms/sending-emails-smtp#send-emails-using-an-http-server). 5. Testing the Endpoint You can test your HTTP endpoint independently (e.g., with curl or Postman) to ensure it is reachable and accepting requests as expected. If after these checks your endpoint still does not receive requests, review the Kratos logs for any clues. If there are no errors and the configuration is correct, but the HTTP endpoint is not invoked, the knowledge sources do not provide further troubleshooting steps for this specific scenario. In that case, you may need to seek additional support from the Ory community.
r
@chilly-king-10285 the goal is to send sms instead
b
A message from kapa.ai
To send SMS instead of email for registration codes in Ory Kratos, you need to: 1. Configure your identity schema to use a phone number trait for code delivery via SMS. For example:
Copy code
json    {      "traits": {        "phone": {          "type": "string",          "format": "tel",          "<http://ory.sh/kratos|ory.sh/kratos>": {            "credentials": {              "code": {                "identifier": true,                "via": "sms"              }            },            "recovery": {              "via": "sms"            },            "verification": {              "via": "sms"            }          }        }      }    }
This ensures Kratos knows to send codes via SMS for registration, recovery, and verification flows [Phone number and password](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#phone-number-and-password). 2. Configure the SMS delivery channel in your Kratos config. For example:
Copy code
yaml    courier:      channels:        - id: sms          type: http          request_config:            url: <https://api.twilio.com/2010-04-01/Accounts/AXXXXXXXXXXXXXX/Messages.json>            method: POST            body: <base64://ZnVuY3Rpb24oY3R4KSB7CiAgVG86IGN0eC5yZWNpcGllbnQsCiAgQm9keTogY3R4LmJvZHksCn0>=            headers:              Content-Type: application/x-www-form-urlencoded            auth:              type: basic_auth              config:                user: AXXXXXXX                password: XXXX
Adjust the URL, credentials, and body template for your SMS provider [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). 3. Restart Kratos after updating the configuration. 4. Test the registration flow using a phone number. Kratos should now send the registration code via SMS to the provided phone number. If you do not see SMS requests hitting your endpoint, double-check that: - The identity schema is correctly set up for SMS. - The courier channel for SMS is configured and enabled. - The phone number is provided in the registration flow. If you follow these steps, Kratos will send registration codes via SMS instead of email [Enable SMS one-time-code (OTP)](https://www.ory.sh/docs/kratos/passwordless/one-time-code#enable-sms-one-time-code-otp).
r
@chilly-king-10285 log still seeing sending out registration email with code evnthough I want sms “msg”:“Sending out registration email with code.“,”registration_code”:“656433”
b
A message from kapa.ai
If your logs show
Sending out registration email with code
even though you want SMS, it strongly suggests that your identity schema and/or Kratos configuration is still set up to send registration codes via email, not SMS. Key things to check: 1. Identity Schema Configuration Your identity schema must specify that the registration code should be sent via SMS. The relevant trait (e.g.,
phone
or
phone_number
) should have the following structure:
Copy code
json    "phone": {      "type": "string",      "format": "tel",      "<http://ory.sh/kratos|ory.sh/kratos>": {        "credentials": {          "code": {            "identifier": true,            "via": "sms"          }        }      }    }
If the
via
is set to
"email"
, Kratos will send the code via email. If it is set to
"sms"
, it will use SMS [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema) [Phone number and password](https://www.ory.sh/docs/kratos/manage-identities/customize-identity-schema#phone-number-and-password). 2. Registration Flow When registering, ensure you are using the phone number as the identifier, not the email. If you register with an email, Kratos will send the code to the email address. 3. Courier Channel Configuration Make sure the SMS channel is properly configured in your Kratos config, as described in the documentation [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). Summary: If you see "registration email" in the logs, Kratos is using the email trait for code delivery. Double-check your identity schema and registration flow to ensure the code is set to be delivered via SMS and that you are registering with a phone number. If you still see email logs after these changes, the knowledge sources do not provide further troubleshooting steps for this specific scenario.
r
@chilly-king-10285 this is my schema json
Copy code
{
  "$id": "<https://github.com/ory/kratos/.schema/versions.config.schema.json>",
  "$schema": "<http://json-schema.org/draft-07/schema#>",
  "type": "object",
  "properties": {
    "traits": {
      "type": "object",
      "properties": {
        "email": {
          "title": "E-Mail",
          "type": "string",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            },
            "verification": {
              "via": "email"
            },
            "recovery": {
              "via": "email"
            }
          }
        },
        "username": {
          "type": "string",
          "minLength": 4,
          "title": "Username",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "password": {
                "identifier": true
              }
            }
          }
        },
        "name": {
          "type": "object",
          "properties": {
            "first": {
              "title": "First name",
              "type": "string"
            },
            "last": {
              "title": "Last name",
              "type": "string"
            }
          }
        },
        "phone": {
          "title": "Phone number",
          "type": "string",
          "format": "tel",
          "<http://ory.sh/kratos|ory.sh/kratos>": {
            "credentials": {
              "code": {
                "identifier": true,
                "via": "sms"
              }
            },
            "verification": {
              "via": "sms"
            }
          }
        }
      },
      "additionalProperties": false
    }
  }
}
b
A message from kapa.ai
Your schema is almost correct for enabling SMS-based code delivery for the
phone
trait, but there are a few things to clarify based on the knowledge sources: 1. Trait Key for Ory Extension The key for the Ory extension should be
"<http://ory.sh/kratos|ory.sh/kratos>"
(not
<http://ory.sh/kratos|ory.sh/kratos>
). Using the wrong key will cause Kratos to ignore the configuration for that trait. 2. Schema Example Here is a corrected example based on the official documentation [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema):
Copy code
json    {      "$id": "<https://schemas.ory.sh/presets/kratos/identity.phone.schema.json>",      "$schema": "<http://json-schema.org/draft-07/schema#>",      "type": "object",      "properties": {        "traits": {          "type": "object",          "properties": {            "email": {              "title": "E-Mail",              "type": "string",              "<http://ory.sh/kratos|ory.sh/kratos>": {                "credentials": {                  "password": {                    "identifier": true                  }                },                "verification": {                  "via": "email"                },                "recovery": {                  "via": "email"                }              }            },            "username": {              "type": "string",              "minLength": 4,              "title": "Username",              "<http://ory.sh/kratos|ory.sh/kratos>": {                "credentials": {                  "password": {                    "identifier": true                  }                }              }            },            "name": {              "type": "object",              "properties": {                "first": {                  "title": "First name",                  "type": "string"                },                "last": {                  "title": "Last name",                  "type": "string"                }              }            },            "phone": {              "title": "Phone number",              "type": "string",              "format": "tel",              "<http://ory.sh/kratos|ory.sh/kratos>": {                "credentials": {                  "code": {                    "identifier": true,                    "via": "sms"                  }                },                "verification": {                  "via": "sms"                }              }            }          },          "additionalProperties": false        }      }    }
3. What this does: - When a user registers with a phone number, Kratos will send a code via SMS (if your courier is configured for SMS). - If you register with an email, Kratos will send a code via email. 4. Next Steps: - Update your schema to use
"<http://ory.sh/kratos|ory.sh/kratos>"
as the key. - Ensure your courier configuration is set up for SMS delivery as described in the documentation [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). - Register using the phone number to trigger SMS code delivery. If you still see "Sending out registration email with code" in your logs after these changes, double-check that you are registering with the phone number and not the email, and that your courier SMS channel is correctly configured. References: - [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema) - [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms)
r
@chilly-king-10285 updated, but still getting the same logs, which is sending the registation email
b
A message from kapa.ai
If you have updated your identity schema to use
"<http://ory.sh/kratos|ory.sh/kratos>"
as the key and set the
phone
trait to deliver codes via SMS, but Kratos is still logging "Sending out registration email with code," there are a few things to consider based on the knowledge sources: 1. Registration Flow Input Kratos determines the delivery method based on the identifier used during registration. If you register with an email, it will send the code via email. If you register with a phone number, it should send the code via SMS, provided your schema and courier configuration are correct [Custom identity schema](https://www.ory.sh/docs/kratos/passwordless/one-time-code#custom-identity-schema). 2. Schema and Courier Configuration Double-check that: - The schema is loaded and active in your Kratos instance. - The courier SMS channel is configured and enabled as described in the documentation [Send SMS to your users](https://www.ory.sh/docs/kratos/emails-sms/sending-sms). 3. Trait Used as Identifier The logs will show "registration email" if the registration flow is using the email trait as the identifier, even if the schema supports SMS for the phone trait. Make sure your registration request is using the phone number as the identifier. 4. No Further Troubleshooting in Knowledge Sources If you have confirmed all of the above and are still seeing email logs, the knowledge sources do not provide further troubleshooting steps for this specific scenario. There may be an issue with how the registration flow is being triggered or with the active schema in your Kratos deployment. Summary: - Ensure you are registering with the phone number, not the email. - Confirm your schema and courier SMS configuration are active and correct. - If the issue persists, the knowledge sources do not contain enough information to provide a definitive solution for this scenario.
r
@chilly-king-10285 do i need to run the sidecar courier in order the sms to work on my local?
b
A message from kapa.ai
For local development, you do need to run the mail courier for Ory Kratos to process and dispatch messages, including SMS. In a single-instance setup, you can run the courier as a background task by adding the
--watch-courier
flag to your
kratos serve
command. This will ensure that the message queue is processed and SMS (or email) messages are sent out as expected [Mail courier in self-hosted Ory Kratos](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted). Example:
Copy code
sh kratos serve --config /path/to/kratos.yml --watch-courier
If you do not run the courier (either as a sidecar or with
--watch-courier
), messages will remain in the queue and will not be delivered, so SMS will not work. In multi-instance setups, the courier should be run as a separate singleton process, but for local development, the
--watch-courier
flag is sufficient [kratos serve](https://www.ory.sh/docs/kratos/cli/kratos-serve).
r
@chilly-king-10285 how about if I build my custom image on top of it, do I need to run the sidecar too?
b
A message from kapa.ai
If you build your own custom Docker image for Ory Kratos, you still need to ensure that the mail courier is running for SMS (and email) delivery to work. For local or single-instance setups, you can run the courier as a background process by starting Kratos with the
--watch-courier
flag:
Copy code
sh kratos serve --config /path/to/kratos.yml --watch-courier
This is true regardless of whether you use the official image or a custom one. If you do not run the courier (either as a sidecar or with
--watch-courier
), messages—including SMS—will not be sent out [Mail courier in self-hosted Ory Kratos](https://www.ory.sh/docs/kratos/self-hosted/mail-courier-selfhosted). In multi-instance or production setups, you should run the courier as a separate singleton process (sidecar or job). For local development and most custom images, using
--watch-courier
is sufficient [kratos serve](https://www.ory.sh/docs/kratos/cli/kratos-serve).