---
title: "Charmhub | Deploy Local Users\n using Charmhub - The Open Operator Collection"
description: "Deploy the latest version of Local Users\n on any cloud."
url: https://charmhub.io/local-users/docs/tutorial
---

# Local Users

[Canonical BootStack Charmers](https://charmhub.io/publisher/bootstack-charmers "View all packages from Canonical BootStack Charmers")

* [Canonical BootStack Charmers](https://charmhub.io/publisher/bootstack-charmers "View all packages from Canonical BootStack Charmers")

Platform:

24.04

22.04

20.04

18.04

stable 216

```
juju deploy local-users
```

[Learn to deploy on juju >](https://juju.is/docs/juju/manage-applications)

---

Share your thoughts on this charm with the community on discourse.

[Join the discussion](https://discourse.charmhub.io/)

# Tutorial: Get started

Here’s how to get started with using the charm-local-users application.

Firstly, create a configuration file as shown below:

```
$ cat config-local-users.yaml
local-users:
  group: mygroup
  users: |
    alice;Alice;ssh-rsa ABC alice@desktop
    bob;Bob;ssh-rsa XYZ bob@laptop
```

Deploy any principal charm application of your choice, e.g. Ubuntu

```
juju deploy ubuntu
```

Deploy the `charm-local-users` application providing the path to the configuration file you created earlier:

```
juju deploy --config config-local-users.yaml local-users
```

Relate to the principal charm application.

```
juju relate local-users ubuntu
```

The charm can also be configured after deployment.

For example, to remove `bob`’s account, create an updated user list file `user.lst` that doesn’t
include Bob’s account anymore and simply update the config:

```
$ cat user.lst
alice;Alice;ssh-rsa ABC alice@desktop
```

Now provide this config to the charm.

```
juju config local-users users=@user.lst
```

The charm will enter a `blocked` state if you try to add a user account that already exists but
isn’t a member of the managed group. If you’re sure that you want to add the pre-existing account
to the managed group anyway, making it a charm managed account from now, you can run:

```
juju config local-users allow-existing-users=true
```

Home directories of removed users will be backed up in the location specified in the `backup-path` config option before being removed.

---
