File: remotes.md

package info (click to toggle)
lxd 5.0.2%2Bgit20231211.1364ae4-9
  • links: PTS, VCS
  • area: main
  • in suites: trixie
  • size: 25,632 kB
  • sloc: sh: 14,272; ansic: 3,112; python: 432; makefile: 265; ruby: 51; sql: 50; javascript: 9; lisp: 6
file content (58 lines) | stat: -rw-r--r-- 1,775 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
# Remotes

## Introduction

Remotes are a concept in the LXD command line client which are used to refer to various LXD servers or clusters.
A remote is effectively a name pointing to the URL of a particular LXD server as well as needed credentials to login and authenticate the server.
LXD has four types of remotes:

- Static
- Default
- Global (per-system)
- Local (per-user)

### Static

Static remotes are:

- `local` (default)
- `ubuntu`
- `ubuntu-daily`

They are hardcoded and can't be modified by the user.

### Default

Automatically added on first use.

### Global (per-system)

By default the global configuration file is kept in either `/etc/lxd/config.yml`, or `/var/snap/lxd/common/global-conf/` for the snap version, or in `LXD_GLOBAL_CONF` if defined.
The configuration file can be manually edited to add global remotes. Certificates for those remotes should be stored inside the `servercerts` directory (e.g. `/etc/lxd/servercerts/`) and match the remote name (e.g. `foo.crt`).

An example configuration is below:

```
remotes:
  foo:
    addr: https://10.0.2.4:8443
    auth_type: tls
    project: default
    protocol: lxd
    public: false
  bar:
    addr: https://10.0.2.5:8443
    auth_type: tls
    project: default
    protocol: lxd
    public: false
```

### Local (per-user)

Local level remotes are managed from the CLI (`lxc`) with:
`lxc remote [command]`

By default the configuration file is kept in `~/.config/lxc/config.yml`, or `~/snap/lxd/common/config/config.yml` for the snap version, or in `LXD_CONF` if defined.
Users have the possibility to override system remotes (e.g. by running `lxc remote rename` or `lxc remote set-url`)
which results in the remote being copied to their own configuration, including any associated certificates.