<a id="lxc-cluster-link-create-md"></a>

# `lxc cluster link create`

Create cluster links

## Synopsis

Description:
Create cluster links

Bidirectional (default): run without –token on cluster A to get a token, then run with –token on cluster B.
Unidirectional: run “lxc auth identity create cluster-link/<name>” on B to get a token, then run with –token –unidirectional on A.
Public: run with –public –remote-address on A; the certificate fingerprint is shown for confirmation before the link is created.
Stdin is the confirmation channel for public links, so configuration must be given as key=value arguments rather than piped YAML.

```none
lxc cluster link create [<remote>:]<link> [key=value...] [flags]
```

## Examples

```none
  lxc cluster link create backup-cluster --auth-group backups
      Create a pending bidirectional cluster link called "backup-cluster".

  lxc cluster link create main-cluster --token <token> --auth-group backups
      Create an active bidirectional cluster link called "main-cluster" using a token from "backup-cluster".

  lxc cluster link create image-host --token <token> --unidirectional
      Create a unidirectional cluster link called "image-host" using a token issued by the remote cluster.

  lxc cluster link create image-host --public --remote-address 10.0.0.1:8443
      Create a public cluster link called "image-host" by pinning the remote certificate.
```

## Options

```none
  -g, --auth-group       Authentication groups to add the newly created cluster link identity to
  -d, --description      Cluster link description
      --public           Create a link without presenting a client certificate (requires --remote-address)
      --remote-address   Address of the remote cluster for public links
  -t, --token            Trust token to use when creating cluster link
      --unidirectional   Create a unidirectional cluster link (requires --token)
```

## Options inherited from parent commands

```none
      --debug          Show all debug messages
      --force-local    Force using the local unix socket
  -h, --help           Print help
      --project        Override the source project
  -q, --quiet          Do not show progress information
      --sub-commands   Use with help or --help to view sub-commands
  -v, --verbose        Show all information messages
      --version        Print version number
```

## SEE ALSO

* [lxc cluster link](https://canonical.com/lxd/docs/latest/reference/manpages/lxc/cluster/link/index.html.md#lxc-cluster-link-md)	 - Manage cluster links
