URL without /auth

I’m using Keycloak 18.0.0 with docker.

Is there a possibility to remove /auth from the end of the URL?

EX:

Current is like this

http://10.0.0.13:8080/auth/realms/master/account/

I need it like this

http://10.0.0.13:8080/realms/master/account/

Here’s the docker-compose example I’m using:

version: ‘3’

volumes:
postgres_data:
driver: local

services:
postgres:
image: postgres
volumes:
- postgres_data:/var/lib/postgresql/data
environment:
POSTGRES_DB: keycloak
POSTGRES_USER: keycloak
POSTGRES_PASSWORD: password
container_name: postgres-container
restart: on-failure
keycloak:
image: Quay
environment:
DB_VENDOR: POSTGRES
DB_ADDR: postgres
DB_DATABASE: keycloak
DB_USER: keycloak
DB_SCHEMA: public
DB_PASSWORD: password
KEYCLOAK_USER: admin
KEYCLOAK_PASSWORD: Pa55w0rd
container_name: keycloak-container
ports:
- 8080:8080
depends_on:
- postgres
restart: on-failure

You are using still the Wildfly based legacy distribution. With that, it’s somehow possible to get rid off the /auth context path, but it might be a lot of work.
Do yourself a favor and do an upgrade to the Quarkus based distribution (and also if possible) to the most recent version. With Quarkus based distribution, there is no default /auth context path (but you can configure it, if you need it back).

1 Like