

Adding your non-root account to the lxd Unix group This involves adding your sudo user to the lxd group and configuring your storage backend. Step 1 - Preparing Your Environment for LXDīefore you configure and run LXD, you will prepare your server’s environment. If, however, you want to use the LXD deb package, see our tutorial How To Install and Use LXD on Ubuntu 18.04. Suggested server with 2GB RAMĪbility to upgrade from the other package formatįollow the rest of this tutorial to use LXD from the snap package in Ubuntu 20.04. You will use this to store all data related to the containers. In the configuration of the Block Storage, select Manually Format & Mount in order to allow LXD to prepare it as required. To set this up, you can follow DigitalOcean’s Block Storage Volumes Quickstart. We will refer to it later as your_server_ip.Īt least 5GB of block storage. To set up a server, including a non-root sudo user and a firewall, you can create a DigitalOcean Droplet running Ubuntu 20.04 and then follow our Initial Server Setup Guide.

To complete this tutorial, you’ll need the following:Ī server running Ubuntu 20.04. You’ll then route traffic from the internet to the container to make a sample web page accessible. In this tutorial, you’ll configure LXD and use it to run Nginx in a container.

LXD provides a hypervisor service to manage the entire life cycle of containers. LXD lets you create and manage these containers. Linux containers sit somewhere between virtual hosts and virtual machines. On the other hand, when using virtual machines, you would create a separate nested virtual machine for each website. On the one hand, each web site could be a virtual host/server block of the same instance of the Apache or Nginx web server. Imagine that you have a server that should run multiple web sites for your customers. This means you can create more containers than virtual machines on the same server. You don’t have the overhead of running an additional Linux kernel, and the containers don’t require any CPU hardware virtualization support. To the end-user, a Linux container functions as a virtual machine, but it’s much more lightweight. IntroductionĪ Linux container is a set of processes that is separated from the rest of the system. The author selected the Free and Open Source Fund to receive a donation as part of the Write for DOnations program.
