# Keycloak.X Docker DB setup: "No suitable driver found"

**URL:** <https://forum.keycloak.org/t/keycloak-x-docker-db-setup-no-suitable-driver-found/12792>\
**Category:** Configuring the server\
**Created:** [December 27, 2021, 4:48pm UTC](https://forum.keycloak.org/t/keycloak-x-docker-db-setup-no-suitable-driver-found/12792 "2021-12-27T16:48:06Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![summersab](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/summersab/32/3514_2.png) [@summersab](https://forum.keycloak.org/u/summersab)\
**Post date:** [December 27, 2021, 4:48pm UTC](https://forum.keycloak.org/t/keycloak-x-docker-db-setup-no-suitable-driver-found/12792/1 "2021-12-27T16:48:06Z")

</div>

When trying to launch the Keycloak.X Docker image, I get the following error:  
`java.sql.SQLException: No suitable driver found for jdbc:mariadb://192.168.0.204/keycloak`

Here is how I’m launching the container:

```auto
docker run -e KEYCLOAK_ADMIN=<username> -e KEYCLOAK_ADMIN_PASSWORD=<password> \
  -ti -p 80:8080 quay.io/keycloak/keycloak-x \
  -Dkc.db=mariadb -Dkc.db.url.host=<db-ip> \
  --db-username=<db-username> --db-password=<db-password> --http-enabled=true

```

I’ve also tried using the `--db-url` parameter as well as different DB vendor strings. All of them result in the same error. What’s strange is that when running the container with the internal H2 DB, I see the following in the logs:

`Installed features: [agroal, cdi, hibernate-orm, jdbc-h2, jdbc-mariadb, jdbc-mysql, jdbc-postgresql, keycloak, mutiny, narayana-jta, resteasy, resteasy-jackson, smallrye-context-propagation, smallrye-health, smallrye-metrics, vertx, vertx-web]`

So, the JDBC drivers should be there according to the logs. What am I doing wrong?

---

<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:** [December 27, 2021, 4:53pm UTC](https://forum.keycloak.org/t/keycloak-x-docker-db-setup-no-suitable-driver-found/12792/2 "2021-12-27T16:53:37Z")

</div>

The `db` config parameter is a build time config parameter. So, first build your custom image with the parameter and the command `build`, or start the container with the command `auto-build`.

_Keep in mind that Keycloak.X is still preview, so not all docs are final and/or official, nor publicly available. However, it‘s mentioned somewhere already. Once X is officially supported, also the docs will be updated and available._

---

<div class="post-metadata">

**Author:** ![summersab](https://yyz2.discourse-cdn.com/free1/user_avatar/forum.keycloak.org/summersab/32/3514_2.png) [@summersab](https://forum.keycloak.org/u/summersab)\
**Post date:** [December 27, 2021, 5:57pm UTC](https://forum.keycloak.org/t/keycloak-x-docker-db-setup-no-suitable-driver-found/12792/3 "2021-12-27T17:57:33Z")

</div>

Perfect! It looks like that actually needs to be passed with the `config` command - `kc.sh build` throws an error that the command `build` doesn’t exist. However, I’ve got it working now. Thanks!
