How to create a resource server in Keycloak?

I am quite new when it comes to Keycloak. Perhaps this is very obvious but how do I create a resource server in Keycloak?

I would like to protect a web service access with some permissions. And as far as I understand it I need to configure the web service as resource and resources are configure as clients.(?) But if I do so then I get a 400 on a request to the token endpoint with audience = my_resource with an error message “Client does not support permissions”.

Perhaps someone can point me to the right direction on what to do for getting this to work.

Thanks in advance.

Mihael