fierce-potato-20064
05/07/2024, 5:17 PMchilly-king-10285
05/07/2024, 5:17 PMchilly-king-10285
05/07/2024, 5:18 PMdocker system df
. If the volumes are above the 85% threshold, prune old Docker objects before you start. 2. Clone Ory Kratos: Clone the Ory Kratos repository and navigate into it using the following commands: git clone <https://github.com/ory/kratos.git> cd kratos git checkout master
3. Run Ory Kratos in Docker: Run the following command to start Ory Kratos using Docker Compose: docker-compose -f quickstart.yml -f quickstart-standalone.yml up --build --force-recreate
If you have SELinux, run: docker-compose -f quickstart.yml -f quickstart-selinux.yml -f quickstart-standalone.yml up --build --force-recreate
4. Check the logs: Once the output slows down and logs indicate a healthy system, you're ready to go. A healthy system will show something along the lines of: kratos_1 | time="2020-01-20T14:52:13Z" level=info msg="Starting the admin httpd on: 0.0.0.0:4434" kratos_1 | time="2020-01-20T14:52:13Z" level=info msg="Starting the public httpd on: 0.0.0.0:4433"
5. Important considerations: Make sure that ports 4455
, 4433
, 4434
, and 4436
are free. Always use 127.0.0.1
as the hostname; never use localhost
! This is important because browsers treat these two as separate domains and will therefore have issues with setting and using cookies. For more detailed instructions, you can refer to the [official Ory Kratos Quickstart guide](https://www.ory.sh/docs/kratos/quickstart#clone-ory-kratos-and-run-it-in-docker).fierce-potato-20064
05/07/2024, 5:21 PMchilly-king-10285
05/07/2024, 5:21 PMchilly-king-10285
05/07/2024, 5:22 PMdocker system df
. If the volumes are above the 85% threshold, prune old Docker objects before you start. 2. Clone Ory Kratos: Clone the Ory Kratos repository and navigate into it using the following commands: git clone --depth 1 --branch master <https://github.com/ory/kratos.git> cd kratos git checkout master git pull -ff
3. Install PostgreSQL: Install PostgreSQL by running the following commands: sudo apt install postgresql postgresql-contrib -y sudo -i -u postgres
Create the database and a user for Kratos: createdb kratos CREATE USER kratos PASSWORD '<YOUR_PASSWORD_HERE>'; GRANT CONNECT ON DATABASE kratos to kratos;
Change the default password encryption to a stronger one and reload the configuration: psql ALTER SYSTEM SET password_encryption = 'scram-sha-256'; SELECT pg_reload_conf();
Check your credentials against PostgreSQL: psql -U kratos -W -h 127.0.0.1
4. Run Ory Kratos in Docker: Run the following command to start Ory Kratos using Docker Compose: docker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-postgres.yml up --build --force-recreate
5. Python SDK: Unfortunately, as of the current knowledge sources provided, there is no specific Python SDK for Ory Kratos. However, you can interact with the Ory Kratos API using any HTTP client library in Python, such as requests
. For more detailed instructions, you can refer to the [official Ory Kratos Quickstart guide](https://www.ory.sh/docs/kratos/quickstart#clone-ory-kratos-and-run-it-in-docker) and the [PostgreSQL setup guide](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#install-postgresql).fierce-potato-20064
05/08/2024, 5:22 AMchilly-king-10285
05/08/2024, 5:22 AMchilly-king-10285
05/08/2024, 5:22 AMkratos.yml
). In the configuration file, you set the dsn
(Data Source Name) to point to your PostgreSQL database. For example: yaml dsn: <postgres://kratos:[email> protected]:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4
This tells Ory Kratos to use your PostgreSQL database (kratos
) running on localhost
on port 5432
. The username (kratos
) and password (<YOUR_PASSWORD_HERE>
) are also specified in the connection string. Once Ory Kratos is running, it will use this database to store user identities, credentials, and other related data. You can find more details in the [Ory Kratos PostgreSQL setup guide](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#install-postgresql) and the [Ory Kratos installation guide](https://www.ory.sh/docs/kratos/guides/deploy-kratos-example#install-ory-kratos).fierce-potato-20064
05/08/2024, 5:34 AMkratos.yml
I can't find itchilly-king-10285
05/08/2024, 5:34 AMchilly-king-10285
05/08/2024, 5:34 AMkratos.yml
configuration file is located in the Ory Kratos repository that you cloned. Specifically, you can find it in the contrib/quickstart/kratos/email-password/
directory. Here is the direct link to the file on GitHub: [kratos.yml](https://github.com/ory/kratos/blob/master/contrib/quickstart/kratos/email-password/kratos.yml) Remember to replace the placeholders in the configuration file with your actual values, such as the database connection details.fierce-potato-20064
05/08/2024, 5:37 AMdsn: <postgres://kratos>:[email protected]:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4
what is email protected in this?chilly-king-10285
05/08/2024, 5:37 AMchilly-king-10285
05/08/2024, 5:38 AMemail protected
part in the dsn
string is a placeholder for the password of the PostgreSQL user. It's not actually related to email protection. In your case, you should replace it with the password you set for the kratos
user in PostgreSQL. So if your password was mysecretpassword
, the dsn
string would look like this: yaml dsn: <postgres://kratos:mysecretpassword@localhost:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4>
This string tells Ory Kratos to connect to a PostgreSQL database named kratos
on localhost
port 5432
using the username kratos
and the password mysecretpassword
. The sslmode=disable
part disables SSL for the connection, and max_conns=20
and max_idle_conns=4
set the maximum number of total and idle connections to the database, respectively.fierce-potato-20064
05/08/2024, 5:40 AMquickstart-postgres.yml
before sending this command
docker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-postgres.yml up --build --force-recreate
chilly-king-10285
05/08/2024, 5:40 AMchilly-king-10285
05/08/2024, 5:40 AMquickstart-postgres.yml
file. This file is used by Docker Compose to set up the services required for the quickstart, including the PostgreSQL database. The quickstart-postgres.yml
file is designed to work with the default settings in the kratos.yml
configuration file. If you've changed the database connection details in kratos.yml
(for example, if you're using a different database name, user, or password), you'll need to update the quickstart-postgres.yml
file to match. However, if you're using a local PostgreSQL database that you've set up yourself (as it seems from your previous questions), you don't need the quickstart-postgres.yml
file at all. The docker-compose -f quickstart.yml -f quickstart-standalone.yml up --build --force-recreate
command should be enough to start Ory Kratos. Remember to set the dsn
in kratos.yml
to point to your local PostgreSQL database. For example: yaml dsn: <postgres://kratos:mysecretpassword@localhost:5432/kratos?sslmode=disable&max_conns=20&max_idle_conns=4>
Replace mysecretpassword
with the actual password for your kratos
PostgreSQL user.fierce-potato-20064
05/08/2024, 5:44 AMdialing <http://registry-1.docker.io:443|registry-1.docker.io:443> with direct connection: connecting to 2600:1f18:2148:bc02:445d:9ace:d20b:c303:443: dial tcp [2600:1f18:2148:bc02:445d:9ace:d20b:c303]:443: connect: no route to host
chilly-king-10285
05/08/2024, 5:44 AMchilly-king-10285
05/08/2024, 5:44 AM<http://registry-1.docker.io|registry-1.docker.io>
on port 443
. This could be due to a network issue, a DNS resolution problem, or a firewall blocking the connection. Here are a few things you can try to resolve this issue: 1. Check your internet connection: Make sure your internet connection is working properly. You can test this by trying to access <https://registry-1.docker.io>
in a web browser. 2. Check your DNS settings: Docker uses your system's DNS settings by default. If you're having DNS resolution issues, you might need to specify custom DNS servers for Docker. You can do this by editing the Docker daemon configuration file (usually located at /etc/docker/daemon.json
) and adding the following: json { "dns": ["8.8.8.8", "8.8.4.4"] }
This sets Docker to use Google's public DNS servers. 3. Check your firewall settings: If you're using a firewall, make sure it's not blocking connections to <http://registry-1.docker.io|registry-1.docker.io>
on port 443
. The exact steps to do this depend on which firewall software you're using. 4. Restart Docker: Sometimes, simply restarting Docker can resolve connection issues. You can do this by running systemctl restart docker
(on Linux) or by clicking "Restart Docker" in the Docker Desktop menu (on Windows and macOS). If none of these steps resolve the issue, you might want to reach out to your network administrator or internet service provider for further assistance.fierce-potato-20064
05/08/2024, 7:02 AMdocker-compose -f quickstart.yml -f quickstart-standalone.yml -f quickstart-postgres.yml up --build --force-recreate
but when I use signup page, but I am not getting the email for verification codechilly-king-10285
05/08/2024, 7:02 AMchilly-king-10285
05/08/2024, 7:02 AM<http://127.0.0.1:4436>
. Here's how you can retrieve the email: 1. Open your web browser and navigate to <http://127.0.0.1:4436>
. 2. You should see the MailSlurper UI, which will display the emails sent by the system. 3. Look for the verification email and click the verification link. If you don't see the email, try refreshing the page or clicking on the home icon in the menu bar. For more information, refer to the [Ory Kratos Quickstart guide](https://www.ory.sh/docs/kratos/quickstart#email-verification-part-1).fierce-potato-20064
05/08/2024, 7:22 AMchilly-king-10285
05/08/2024, 7:23 AMchilly-king-10285
05/08/2024, 7:23 AMdsn
in your kratos.yml
configuration file is correctly pointing to your PostgreSQL database. The format should be <postgres://username:password@localhost:5432/database_name>
. 2. Database User Permissions: Make sure the database user specified in the dsn
has the correct permissions to read and write to the database. 3. Table Names: Ory Kratos creates tables with specific names in your database. The user data is stored in a table named identities
. Make sure you're checking the correct table. 4. Data Commit: If you're checking the database while Kratos is still running, it's possible that the data hasn't been committed yet. Try stopping Kratos and then check the database again. If you're still not seeing any data, it might be helpful to check the logs produced by Ory Kratos for any error messages related to database connections or operations.