Skip to main content

Keycloak Realm Setup for BitDive

This guide explains how to create a new Keycloak realm, configure a client, and set up a user for the BitDive application.

Step 1: Create a New Realm

  1. Access the Keycloak Admin Console at https://your-server-ip:9999
  2. Log in using the credentials you configured in your .env file:
KEYCLOAK_ADMIN=your_keycloak_user
KEYCLOAK_ADMIN_PASSWORD=your_keycloak_password
  1. Navigate to the Realms section.
  2. Click Add Realm and specify a name for your new realm.
  3. Save the configuration.

Step 2: Configure a New Client

  1. In the newly created realm, go to the Clients section.
  2. Click Create to add a new client.
  3. Provide the following configuration:
    • Client ID: react-client
    • Valid Redirect URIs: https://your-server-ip/*
    • Web Origins: https://your-server-ip
  4. Save the client configuration.

Step 3: Create a New User

  1. Navigate to the Users section of your realm.
  2. Click Add User to create a new user.
  3. Specify a Username for the user.
  4. Save the user configuration.

Set Up the User Password

  1. Open the created user's settings.
  2. Go to the Credentials tab.
  3. Set a new password and confirm it.
  4. Optionally, disable Temporary Password if you want the user to keep the password permanently.

Notes

  • Replace https://your-server-ip with the actual URL of your UI if it is hosted elsewhere.
  • Ensure the react-client matches the client ID used in your application configuration.

This setup ensures that your BitDive application can authenticate users through Keycloak.