<a id="ref-image-registries"></a>

# Image registries

An image registry is a server-side entity that points to a global, read-only source of images, such as a SimpleStreams server or another LXD server.
A registry does not store any images itself; it records the location of the image source and the protocol used to reach it, so that LXD can download images from that source.

See [How to manage image registries](https://canonical.com/lxd/docs/latest/howto/image_registries/index.html.md#howto-image-registries) for instructions on how to create and manage image registries, and [Built-in image registries](https://canonical.com/lxd/docs/latest/reference/remote_image_servers/index.html.md#remote-image-servers) for the registries that are built in to LXD.

<a id="remote-image-server-types"></a>

## Registry protocols

An image registry uses one of the following protocols, depending on the type of image source it points to:

`simplestreams`
: The image source is a pure image server that uses the [simple streams format](https://git.launchpad.net/simplestreams/tree/).
  The built-in registries are all `simplestreams` registries.
  <br/>
  You configure a `simplestreams` registry with the `url` of the image server (which must use HTTPS).

`lxd`
: The image source is another LXD server, reached through a [cluster link](https://canonical.com/lxd/docs/latest/howto/cluster_links_create/index.html.md#howto-cluster-links-create).
  This can be a LXD server that is used solely to serve images, or a regular LXD server that also serves images in addition to running instances.
  <br/>
  You configure a `lxd` registry with the name of the `cluster` link that connects to the source server.
  Use a public cluster link for a public LXD server, or a unidirectional or bidirectional cluster link to authenticate to a private server.

For a public LXD server that is used solely to serve images, set the [`core.https_address`](https://canonical.com/lxd/docs/latest/server/index.html.md#server-core:core.https_address) configuration option and mark the images that you want to share as `public` (see [How to expose LXD to the network](https://canonical.com/lxd/docs/latest/howto/server_expose/index.html.md#server-expose) for more information).
For a private LXD server, restrict access to the remote API and configure an authentication method (see [Remote API authentication](https://canonical.com/lxd/docs/latest/authentication/index.html.md#authentication)).

## Configuration options

Image registries can be configured through a set of key/value configuration options.
See [Configure an image registry](https://canonical.com/lxd/docs/latest/howto/image_registries/index.html.md#howto-image-registries-configure) for instructions on how to set these options.

The following options are available:

<!-- Include content from [../metadata.txt](../metadata.txt) -->

<a id="image-registry-image-registry-conf:cluster"></a>
`cluster`

Cluster link name for image registry using “LXD” protocol

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#image-registry-image-registry-conf:cluster)

| **Key:**      | `cluster`   |
|---------------|-------------|
| **Type:**     | string      |
| **Required:** | no          |

<a id="image-registry-image-registry-conf:source_project"></a>
`source_project`

Source project for image registry using “LXD” protocol

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#image-registry-image-registry-conf:source_project)

| **Key:**      | `source_project`   |
|---------------|--------------------|
| **Type:**     | string             |
| **Required:** | no                 |

<a id="image-registry-image-registry-conf:url"></a>
`url`

Source URL for image registry using “SimpleStreams” protocol

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#image-registry-image-registry-conf:url)

| **Key:**      | `url`   |
|---------------|---------|
| **Type:**     | string  |
| **Required:** | no      |

<a id="image-registry-image-registry-conf:user.*"></a>
`user.*`

User-provided free-form key/value pairs

[<i class="icon"><svg><use href="#svg-arrow-right"></use></svg></i>](#image-registry-image-registry-conf:user.*)

| **Key:**    | `user.*`   |
|-------------|------------|
| **Type:**   | string     |

## Related topics

How-to guides:

- [Images](https://canonical.com/lxd/docs/latest/images/index.html.md#images)

Explanation:

- [Local and remote images](https://canonical.com/lxd/docs/latest/image-handling/index.html.md#about-images)
