Skip to main content

Removing the default user

This guide is not applicable to ClickHouse Cloud.
In this guide, we’re going to learn how to remove the default user from ClickHouse Server. We can do this by creating a YAML file (let’s call it remove_default_user.yaml) that has the following content
The location of this file depends on how we have ClickHouse installed.

Running the executable directly

If we’re running the ClickHouse directly (clickhouse server), we need to put the file under the config.d directory. When we run ClickHouse Server:
We’ll see the following line in the logs:
And we’ll be unable to connect using clickhouse client:

Docker or installed

If we’re running ClickHouse via Docker or have it installed on our machine, we need to put the file under the /etc/clickhouse-server/users.d directory instead. So if we’re running with Docker, we can mount the config.d directory that we created earlier to /etc/clickhouse-server/users.d:
We can then search the server logs to check that it gets picked up:
We should see the following line:
Last modified on July 2, 2026