Unable to login to Operate/Admin/Tasklist with demo user after connecting C8 Run to PostgreSQL

I’m facing an issue logging into Operate, Admin, and Tasklist after configuring Camunda 8 Run (C8Run) to use a PostgreSQL database.

Previously, login with the default demo/demo user worked fine when using the default setup. However, after switching to PostgreSQL, login is no longer working.

What I tried:

  1. Attempted to explicitly create the demo user via API

    • Received response:

      Command 'CREATE' rejected with code 'ALREADY_EXISTS': 
      Expected to create user with username 'demo', but a user with this username already exists
      
  2. Tried fetching/searching for the user

  • No user is returned (user not visible)
  1. Deleted the /data folder (Zeebe data) and restarted C8Run
  • Issue still persists

Current Behavior:

  • Login fails for demo/demo

  • User seems to exist (based on API error) but is not retrievable or usable

  • No Users found in user_ table. table is empty

Environment:

  • Camunda 8 Run version: 8.9

  • Database: PostgreSQL

  • Deployment type: Local C8Run

Questions:

  • Is there any additional configuration required when switching to PostgreSQL for identity?

  • How can I reset or properly reinitialize users when using PostgreSQL?

This looks like a user initialization issue when switching Camunda 8 Run to PostgreSQL where the demo user exists in one system but not in the database tables. I found the following relevant resources:

Does this help? If not, can anyone from the community jump in? :waving_hand:


:light_bulb: Hints: Use the Ask AI feature in Camunda’s documentation to chat with AI and get fast help. Report bugs and features in Camuda’s GitHub issue tracker. Trust the process. :robot:

application.yaml

camunda:
  data:
    secondary-storage:
      type: rdbms
      rdbms:
        url: jdbc:postgresql://localhost:5432/camunda
        username: postgres
        password: postgres
  security:
    initialization:
      users:
        - username: demo
          password: demo
          name: Demo
          email: demo@example.com
      defaultRoles:
        admin:
          users:
            - demo
    # By default authorization and api protection is disabled
    authentication:
      method: BASIC
      unprotected-api: true
    authorizations:
      enabled: false
  mcp:
    enabled: true

zeebe:
  broker:
    network:
      host: localhost
      advertisedHost: localhost
  gateway:
    cluster:
      initialContactPoints: zeebe:26502
      memberId: identity

It didn’t work with fresh setup too

I do see the issue, When you change from H2 to postgres either before starting the server or after starting the server, user data is not populated.

  1. Start the C8Run with default H2 database.
  2. Login with demo user and validate the setup.
  3. Stop the C8Run.
  4. Export the H2 database and store the dump file.
  5. Create the postgres database
  6. Import the database dump to Postgres.
  7. Configure C8Run with postgres using application.properties or yaml
  8. Validate the C8Run setup.
  9. The default C8Run H2 Database name would be jdbc:h2:file:./camunda-h2-database and credentials are: sa

Hope this helps.

I’m not sure about switching to PostgreSQL after using H2. However, I can confirm that Camunda Run 8.9.2 works with a local PostgreSQL database. I just need to change the RDBMS URL, username, and password. And it works.

As i mentioned earlier, when we switch from H2 to Postgres, there is no steps will take care to move the data. If we configure directly to postgres will work.