Keycloak with load balancer AWS

Hello,
I have a question, it’s probably stupid.

I’m new to Keycloak and trying to use an AWS load balancer.

From what I have read in different forums, when using a load balancer, it is not necessary to configure certificates on the machine itself.

Which leads me to the following doubts, when I start the service I should start it with “start-dev”, since with “start” (production mode) it requested a hostname which would put the load balancer.

Currently I have been trying various ways but I understand that the command from what I have seen should be something like this
./kc.sh start-dev --proxy=edge

I use version 23.0.6 of Keycloak and I do not have Apache installed on EC2.
I publish the service on 0.0.0.0:8080 and the balancer would redirect the entry from 8443 to 8080, so that I could access it with https://{hostname}:8443/

The load balancer may not be completely configured correctly, but my main doubt is towards the keycloak configuration, since I want to make sure it is correct.

Thanks!!

start-dev is for development purposes!

RTFM:

and

and all the other useful guides!

Hello,
The error was mainly in the balancer configuration, although it helped me to review the doc.

Thank you so much

If anyone needs it, here are the environment variables I use to successfully run Keycloak in Docker behind an AWS Application Load Balancer.

keycloak:
    image: keycloak/keycloak:26.0
    environment:
      KC_BOOTSTRAP_ADMIN_USERNAME: admin
      KC_BOOTSTRAP_ADMIN_PASSWORD: admin
      KC_DB: postgres
      KC_DB_URL: jdbc:postgresql://keycloak-db/keycloak
      KC_DB_USERNAME: keycloak
      KC_DB_PASSWORD: password
      KC_HEALTH_ENABLED: true
      KC_PROXY_HEADERS: xforwarded
      KC_HTTP_ENABLED: true
      KC_HOSTNAME: keycloak.example.com
      KC_HOSTNAME_STRICT: false
    ports:
      - '8080:8080'
    command: start