# "Page error" when using keycloak "/auth"

**URL:** <https://forum.keycloak.org/t/page-error-when-using-keycloak-auth/23269>\
**Category:** Configuring the server\
**Tags:** admin-console\
**Created:** [November 7, 2023, 1:18pm UTC](https://forum.keycloak.org/t/page-error-when-using-keycloak-auth/23269 "2023-11-07T13:18:58Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Leralix](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/leralix/32/9243_2.png) [@Leralix](https://forum.keycloak.org/u/Leralix)\
**Post date:** [November 7, 2023, 1:18pm UTC](https://forum.keycloak.org/t/page-error-when-using-keycloak-auth/23269/1 "2023-11-07T13:18:58Z")

</div>

Hello

I am trying to set up keycloak for a student project. I am using docker in order to run it with my api and postgre database. My plan is to use keycloak to manage accounts on my website and to allow connetion with oauth. Right now my api isn’t working, and i would like to test it straight from the auth page to better understand why i get a “page not found” error.

I do not understand why i do not have access to this page like in the tutorials:

 ![image](https://global.discourse-cdn.com/free1/uploads/keycloak/original/2X/a/ae25b52ecf178b66c20dd8c8a38af07fb77363d7.png)

I only get a message error “page not found” on `http://localhost:8080/auth/`  
Here is my docker-compose in case this helps:

```auto
version: "3.9"

services:
  api:
    build: .
    volumes:
      - ./app:/app
    command: ["uvicorn", "main:app", "--host", "0.0.0.0", "--port", "5000", "--reload"]
    ports:
      - "5000:5000"
    env_file:
      - .env
    depends_on:
      postgres:
        condition: service_healthy
    networks:
      - network_sso

  keycloak:
    image: quay.io/keycloak/keycloak:22.0
    command: start-dev
    env_file:
      - .env
    ports:
      - "8080:8080"
    volumes:
      - keycloak_data:/opt/jboss/keycloak/standalone/data
    depends_on:
      postgres:
        condition: service_healthy
    networks:
      - network_sso

  postgres:
    image: postgres:10
    env_file:
      - .env
    healthcheck:
      test: "exit 0"
    ports:
      - "5432:5432"
    networks:
      - network_sso
    volumes:
      - postgres_data:/var/lib/postgresql/data

volumes:
  postgres_data:
  keycloak_data:

networks:
  network_sso:
    driver: bridge

```

And my .env file is :

```auto
# Postgres
POSTGRES_DB=db_name
POSTGRES_USER=user_name
POSTGRES_PASSWORD=password

# KeyCloak

KC_DB= postgres
KC_DB_URL_HOST=postgres
KC_DB_URL_DATABASE=db_name
KC_DB_PASSWORD=password
KC_DB_USERNAME=user_name
KC_DB_SCHEMA=public
KEYCLOAK_ADMIN=admin
KEYCLOAK_ADMIN_PASSWORD=admin

```

Thanks for helping !

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [November 7, 2023, 3:01pm UTC](https://forum.keycloak.org/t/page-error-when-using-keycloak-auth/23269/2 "2023-11-07T15:01:09Z")

</div>

Try to use the URL without `/auth`.

> [@Leralix](#):
>
> ```auto
> volumes:
> - keycloak_data:/opt/jboss/keycloak/standalone/data
> 
> ```

This won’t work, the target path is no more available, it’s from the legacy container!  
Additionally, _why_ do you want to map this volume? What do you expect from it?

---

<div class="post-metadata">

**Author:** ![Leralix](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/leralix/32/9243_2.png) [@Leralix](https://forum.keycloak.org/u/Leralix)\
**Post date:** [November 9, 2023, 11:26pm UTC](https://forum.keycloak.org/t/page-error-when-using-keycloak-auth/23269/3 "2023-11-09T23:26:35Z")

</div>

Thanks for your quick answer.

When i try to launch on my web (localhost:8080) It automatically change url to /auth (localhost:8080/auth). This is why i don’t understand why i am redirected on legacy content.

> [@dasniko](#):
>
> _why_ do you want to map this volume?

I wanted to map to map the volume to keep data each time i restart the container. Do i only need keep what is stored in my postgre ?  
Thanks

---

<div class="post-metadata">

**Author:** ![dasniko](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/dasniko/32/2969_2.png) [@dasniko](https://forum.keycloak.org/u/dasniko)\
**Post date:** [November 10, 2023, 7:03am UTC](https://forum.keycloak.org/t/page-error-when-using-keycloak-auth/23269/4 "2023-11-10T07:03:52Z")

</div>

> [@Leralix](#):
>
> When i try to launch on my web (localhost:8080) It automatically change url to /auth

Most probably because your browser still has anything cached. Try to clear/disable your browser cache.  
Or, set the `http-relative-path` variable to `/auth` (see docs for details).

> [@Leralix](#):
>
> I wanted to map to map the volume to keep data each time i restart the container.

Data is stored only in the database!

---

<div class="post-metadata">

**Author:** ![Leralix](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/leralix/32/9243_2.png) [@Leralix](https://forum.keycloak.org/u/Leralix)\
**Post date:** [November 13, 2023, 8:35am UTC](https://forum.keycloak.org/t/page-error-when-using-keycloak-auth/23269/5 "2023-11-13T08:35:55Z")

</div>

After clearning my cache i can now access the page. Thank you !
