# How to create users? Not users for the backoffice

**URL:** <https://discourse.getcockpit.com/t/how-to-create-users-not-users-for-the-backoffice/750>\
**Category:** Uncategorized\
**Created:** [April 14, 2019, 9:26am UTC](https://discourse.getcockpit.com/t/how-to-create-users-not-users-for-the-backoffice/750 "2019-04-14T09:26:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![darkylmnx](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@darkylmnx](https://discourse.getcockpit.com/u/darkylmnx)\
**Post date:** [April 14, 2019, 9:26am UTC](https://discourse.getcockpit.com/t/how-to-create-users-not-users-for-the-backoffice/750/1 "2019-04-14T09:26:05Z")

</div>

hi, is there a way to create users? Not users that would use the backoffice / admin, but users that would register through my frontend.

I would like to create a signup / signin system, where I would then link my uses collection to other collections likes : posts, comments, videos etc.

I saw the auth api but it doesn’t say if I get a token or not… It also doesn’t say if it’s only to create admin users or not.

I don’t want those users to have access to my cockpit admin obviously…

Any idea on how to acheive that?

Just to precise: I am not asking how to create a user collection, I’m asking how to create an auth system that can’t access the admin.

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [April 14, 2019, 5:29pm UTC](https://discourse.getcockpit.com/t/how-to-create-users-not-users-for-the-backoffice/750/2 "2019-04-14T17:29:43Z")

</div>

You can use the builtin users functionality and disallow access for user groups to the backend. Managing users can be done via [api calls](https://getcockpit.com/documentation/api/cockpit).

The user groups system is simple. Define a group in `config/config.yaml`

```auto
groups:
    user:

```

Now you have a user group named “user” without any rights. Everything is set to false unless you enable it.

Send a request `/api/cockpit/saveUser?token=xxtokenxx`

`{"user":{"name":"API User Test","user":"apiusertest","password":"apiusertest","email":"post@example.com","api_key":1}}`

If you don’t set `"api_key"` to anything, no api key is created.

Have a look here to see the defaults:

> <https://github.com/agentejo/cockpit/blob/next/modules/Cockpit/Controller/RestApi.php#L61>

---

<div class="post-metadata">

**Author:** ![darkylmnx](https://avatars.discourse-cdn.com/v4/letter/d/3e96dc/32.png) [@darkylmnx](https://discourse.getcockpit.com/u/darkylmnx)\
**Post date:** [April 16, 2019, 2:38pm UTC](https://discourse.getcockpit.com/t/how-to-create-users-not-users-for-the-backoffice/750/3 "2019-04-16T14:38:26Z")

</div>

okay i’ll give it a try.  
It’s not pretty clear in the docs though on how groups are handles.  
By default are collections tied to the admin group or are public on creation, edit and delete ?

---

<div class="post-metadata">

**Author:** ![raffaelj](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.getcockpit.com/raffaelj/32/331_2.png) [@raffaelj](https://discourse.getcockpit.com/u/raffaelj)\
**Post date:** [April 16, 2019, 10:10pm UTC](https://discourse.getcockpit.com/t/how-to-create-users-not-users-for-the-backoffice/750/4 "2019-04-16T22:10:10Z")

</div>

Collections aren’t public, but you can enable permissions via groups settings (config file) or in the collection definitions (admin ui when editing collection, tab “Permissions”) with rights per collection.
