Any tutorial or tips on getting a private LXD server running on Google Cloud Platform

I’m new to LXC/LXD, and have often struggled with networking concepts, so I’m looking for a simpler tutorial for setting up a private server for hosting LXC images, and doing it on a Google Cloud Platform VM.

I know my question is related to the top question in this FAQ
but I’m not understanding it.
ip add did not give a candidate ip address.
and using the listed external IP address for the VM, was not accepted in the line
lxc config set core.https_address

Could you point me to some more advice?


I have written a few tutorials on how to setup LXD on different hosting providers.
I do not cover yet Google’s platform but it may be helpful to have a look.

Your actual question is quite specific and you are asking about how to set up LXD so that it is accessible remotely from another LXD client. If you are new to LXD, you might not need to do that yet.

In any case, the Google Compute Engine (GCE) gives your VM two IP addresses, a private IP (10.x.x.x) and a public IP. If you really want to make your LXD installation accessible remotely by another LXD client, you need to specify that 10.x.x.x IP address in lxc config set core.https_address 10.x.x.x.x.
Then, in the LXD client you can set up a remote using the public IP address.
See a similar discussion about GCE and private/public IP addresses.

Thank you so much for the directly applicable response. It feels great to get that assistance. As well as the link to specific on point tutorial.

I’ve got to examine this, and fiddle with it some more. On first try, it didn’t “just work” for me, but I won’t ask any other followup until I’ve done my part by efforting to understand the concepts and actually try it more times.

I just saw your question, actually its very easy to install LXD on google compute instances. But setting up lxd cluster on google cloud platform is not straight forward. This is due to the fact that all the address in GCP are unicast address and to use LXD cluster, it sets up simple FAN networking which needs multi-cast ip address netmask.

If you use your own networking configuration like I do for google cloud platform, it is possible to setup LXD cluster and work well. I used ipip instead of VPN or others (as it slows down the base response). Although few software create problem with ipip networking.