---
title: Charmhub | Deploy Landscape Client using Charmhub - The Open Operator Collection
description: Deploy the latest version of Landscape Client on any cloud. Charm for
  installing landscape-client
url: https://charmhub.io/landscape-client
---

# Landscape Client

[Landscape Charmers](https://charmhub.io/publisher/landscape-charmers "View all packages from Landscape Charmers")

* [Landscape Charmers](https://charmhub.io/publisher/landscape-charmers "View all packages from Landscape Charmers")
* [Monitoring](https://charmhub.io/?filter=monitoring)

Platform:

24.04

23.10

23.04

22.10

22.04

20.04

18.04

16.04

14.04

+1

stable 72

```
juju deploy landscape-client
```

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

---

#### Relevant links

* [Homepage](https://launchpad.net/landscape-client-charm)

---

#### Contacts

* [Submit a bug](https://bugs.launchpad.net/landscape-client-charm)

---

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

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

# landscape-client

## [Description](https://charmhub.io/landscape-client#p-26073-description)

Landscape client is the daemon for Landscape server. This subordinate charm is intended to be used to register a machine against a running Landscape server. This charm uses the [Ops framework](https://juju.is/docs/sdk/ops)

See the full [Landscape documentation](https://ubuntu.com/landscape/docs) for more details.

## [Links](https://charmhub.io/landscape-client#p-26073-links)

* [Landscape Client Charmhub](https://charmhub.io/landscape-client?channel=beta)
* [Landscape Client Charm Source](https://github.com/canonical/landscape-client-charm)
* [Landscape Client Source](https://github.com/canonical/landscape-client)

## [Usage](https://charmhub.io/landscape-client#p-26073-usage)

The minimal example to get started with [Landscape SaaS](https://landscape.canonical.com)

```
juju deploy landscape-client --config account-name=foo-bar
juju deploy ubuntu --series jammy
juju relate landscape-client ubuntu
```

To install using a PPA

```
--config ppa=ppa:landscape/self-hosted-beta
```

To connect to a Landscape Self-Hosted instance

```
juju deploy landscape-client \
    --config computer-title=helloworld \
    --config account-name=standalone \
    --config url=https://mydomain.com/message-system \
    --config ping-url=http://mydomain.com/ping \
```

However, when registering the client against a server with a custom or not well known
CA, we need to use the `ssl-public-key` option. To insert the certificate
contents into the charm config directly, encode it in base64 using the following syntax:

```
--config ssl-public-key=base64:<base64_encoded_certificate>
```

For example:

```
--config ssl-public-key=base64:LS0tLS1CRUdJTiBDRVJUSUZJQ0FURS0tLS4HY5RHZ6VWxUcDYwcjFNRmw1bG16M2I5a2dJeTVJeUYyUURCNnhXeEFMYXoKUGJwVCtnZ2NvYTN5Ci0tLS0tRU5EIENFUlRJRklDQVRFLS0tLS0=
```

If the certificate is already present in the client machine, then use the filepath:

```
--config ssl-public-key=/path/to/ca.cert
```

## [Upgrading](https://charmhub.io/landscape-client#p-26073-upgrading)

It is recommended to use the PPA.

```
juju config landscape-client ppa=ppa:landscape/self-hosted-beta
```

The charm upgrade action can be run as shown where `landscape-client/0` is the desired unit.

For juju 3.0 and above, run:

```
juju run landscape-client/0 upgrade
```

For versions before juju 3.0, use `run-action` instead of `run`:

```
juju run-action landscape-client/0 upgrade
```

## [Re-registering](https://charmhub.io/landscape-client#p-26073-re-registering)

The charm will register the client once. Subsequent config-changed events will restart the service. If you want to register again, run:

```
juju run landscape-client/0 register
```

If you’re using a version before juju 3.0, use `run-action` instead of `run`.

## [Relations](https://charmhub.io/landscape-client#p-26073-relations)

Since this is a subordinate charm, a relation is required. (Breaking the relation via `remove-relation` will disable the client.)

In the following example the [Ubuntu Charm](https://charmhub.io/ubuntu) is used.

```
juju deploy landscape-client --config account-name=foo-bar
juju deploy ubuntu --series jammy
juju relate landscape-client ubuntu
```

This is accomplished using the `juju-info` interface. For more information, see [Juju’s reference material on implicit integrations](https://juju.is/docs/sdk/integration#heading--implicit-integrations).

## [Source Code](https://charmhub.io/landscape-client#p-26073-source-code)

The code for this updated version of the charm is in <https://github.com/canonical/landscape-client-charm>

## [Development](https://charmhub.io/landscape-client#p-26073-development)

Make your code modifications and ensure that the options `bundle.yaml` are correct. Then

```
make build
```

To run linting and tests, `cd` into the top level directory and

```
sudo apt install tox
tox
```

To run an individual test:

```
tox tests/unit/test_charm.py::TestCharm::test_ssl_cert
```

The following commands may also be helpful:

```
juju status --watch 1s
juju debug-log --include landscape-client
```

---

[Help improve this document in the forum](https://discourse.charmhub.io/t/landscape-client-charm-docs/10898) ([guidelines](https://discourse.charmhub.io/t/how-to-write-docs-our-documentation-guidelines-for-contributors/1245)). Last updated 1 year, 7 months ago.
