What Exactly this do :Lxc config set core.https_address [::]:8443

What Exactly this do :lxc config set core.https_address [::]:8443

Sorry, if the question is dumb!!!

I agree that the point in the documentation: https://linuxcontainers.org/lxd/docs/master/server
is not so well formulated.

This command will expose your server to the network.
As far as I understand this will be secured with tls-certificates (client need the certificate to connect).
If you set a password, clients can also connect with the password.

See the new advanced guide for details: https://linuxcontainers.org/lxd/advanced-guide/#remote-servers


This allows you to connect one instance of lxc (say on server1) with another lxc instance on another server (server2). The number 8443 is the port number you connect through (so I often change mine to something different). server1 and 2 can be anywhere - same lan or even different countries.

When you go through lxd init it will give you the option of setting up remote connections (the default is ‘no’). If you change that to yes it will ask you for a password and a port number. Once setup, you can remotely manage containers. E.g. from another lxc instance on say server1, you can connect via:

lxc remote add server2 [ip-address]:port #sets up server2 as a remote machine

It will ask you for the password, and then you have a remote server you can manage containers on via your local terminal. This makes it easier to list, manage and even copy containers from one machine to another, e.g.:

lxc list server2: # list containers on server2. (Note, the colon after the name is important)

lxc stop container server2:c1 #stop a container on a remote server
lxc snapshot server2:c1 mysnapshot # creates a snapshot called ‘mysnapshot’ on server2
lxc copy server2:c1/mysnapshot new-c1 # creates a copy of the remote c1 container on local machine
lxc exec server2:c1 bash # gives you a bash instance on a remote container #wow!

Pretty much everything you can do using lxc on a remote server, you can do on a local one.

It’s rather AWESOME and it works across a lan AND over the web! :slight_smile:



1 Like