Skip to main content
This guide is intended for users with the Admin role in ClickHouse Cloud. ClickHouse Cloud customers may select from pre-defined system roles or create custom roles to assign to users. For more information on system roles and their associated permissions, review Console roles and permissions. This guide provides details for managing custom roles.

Create custom roles

Custom roles can contain a combination of organization, service, and database permissions. Permissions may be applied to all or a subset of services and databases.
1

Access organization settings and select Users and roles

From the services page, select the name of your organization. Select the Users and roles menu item from the popup menu.
2

Select the Roles tab

Select the Roles tab from the top middle of the screen.
3

Select Create new role from the upper right

Select the Create new role button in the upper right of the screen.
4

Name the role

Enter a descriptive role name. This will be the name you will see when assigning roles to users and API keys.
5

Click Allow and select permission scope

Click the Allow button and select from Organization, Service, and/or Database permissions. For a description of all permissions, see Console roles and permissions.
Ensure users who will log into the console have a minimum of Organization > Access organization permissions.
Data Sources tab accessTo access the Data Sources tab, the role currently requires the Manage selected services permission.
6

Review your new role

Review permissions assigned to your new role before finalizing. Click Create role when done.

Manage database roles (beta)

In addition to console permissions, custom roles can include data permissions that control access to the databases of selected services. This lets you manage console and database access in one place instead of maintaining separate roles in each database.
This feature is in beta and is available for services running ClickHouse version 26.4 and above.
When you add data permissions to a custom role, ClickHouse Cloud creates a matching role in each selected service, prefixed with cloud:. For example, a custom role named readonly appears in the database as cloud:readonly. Members of the custom role receive these database permissions when they connect to the service through SQL console passwordless authentication.
Cloud-managed database roles replace manually assigned sql-console-role:<email> roles, which are not compatible with JWT authentication.

Prerequisites

Custom database roles on a service depend on JWT authentication and are not applied while it is disabled. Before adding data permissions to a role, navigate to the service, open Settings, and find the JWT authentication card in the Security section. Make sure the SQL Console toggle is enabled.
1

Add data permissions to a role

Create a custom role or edit an existing one. In the role dialog, click the Allow permissions button and select Data.
2

Select the service

Select the service the permissions apply to. Add more services to apply the same Read-only or Admin permissions across multiple services.
3

Choose the access level

Select Read-only, Admin, or Custom access. With Custom access, define specific data access permissions using ClickHouse GRANT statements. Custom access can only be selected when the permissions target a single service; to define custom permissions for multiple services, add a separate Data permission for each service.
4

Create the role

Click Create role. The database roles are created in the selected services. The roles can take up to 10 minutes to propagate to a service, but users assigned the role receive its permissions immediately when they query the service.

Verify database roles

Roles managed through the console are created in the database with the cloud: prefix and the cloud storage type, and can take up to 10 minutes to appear after creation. To list them, query the system.roles table in the service:

Update custom roles

Custom roles may be updated after they’re created. Users will lose any permissions removed from the role and will gain any permissions added.
User permissions are additive. If a user has permission to perform an operation as part of multiple roles, they may not immediately lose access if permission is removed from only one role.
  1. Access organization settings and select Users and roles
  2. Select the Roles tab
  3. Select the three dots next to the role you would like to update
  4. Select Edit
  5. Modify the permissions
  6. Select Edit role

Delete custom roles

Custom roles may be deleted at any time.
You must have at least one user in the organization with administrative permissions. If deleting the role removes administrative permissions from the last user, you can’t delete it. To resolve this, assign at least one user the Admin system role before deleting the custom role.
  1. Access organization settings and select Users and roles
  2. Select the Roles tab
  3. Select the three dots next to the role you would like to delete
  4. Review the users and API keys that will lose access when the role is removed. Adjust assignments as needed.
  5. Select Delete role to complete the process
Last modified on August 26, 2026