Incus: Initial Server Setup

This short post introduces Incus and shows you how to set up your first Incus server. We'll cover the basic features and topics of Incus this time, but we'll explore more advanced features in future posts.

Hi, my name is Mamadou, and I am a freelance Software Engineer. This is my first public article, so please forgive any mistakes. I will do my best to keep it straightforward and clear.

In the following sections, we will:

  1. Briefly introduce Incus

  2. Discuss what we need to get started with Incus

  3. Set up our first Incus server

  4. Explore the next steps

1. What is Incus?

"Incus is a modern, secure and powerful system container and virtual machine manager" according to the definition on Incus official page. I don't think there is a better way to tell you what Incus is.

For new IT learners, network applications were traditionally deployed on physical servers. Each server could host one or more applications, but all those applications had to be compatible with the server's operating system. If an application wasn't compatible, we had to get a new physical server and install the required operating system, even if the existing server had enough resources.

To solve this issue, engineers developed Virtualization Technologies. These technologies virtualize server hardware components, allowing multiple virtual servers to run on a single physical server. Incus is one such technology. In Incus and similar technologies, these virtual servers are called instances. If you're new to Virtualization Technologies, I hope this helps you understand why Incus exists.

Why should you use Incus?

  • Incus supports many Linux distribution images.

  • It is built around a powerful API.

  • It is secure and scalable.

  • It is ready to handle development and production workloads.

  • It is easy to deploy and maintain.

  • It has a powerful CLI tool.

  • and more...

Containers vs Virtual Machines in Incus

In Incus, an instance can be either a container or a virtual machine. Incus uses LXC for containers and QEMU for virtual machines.

A container is a native instance of Incus and supports more features than virtual machines. One key difference between a container and a virtual machine is that a container does not have its own kernel, unlike a virtual machine. An Incus container relies on the host kernel, making it less resource-intensive compared to a full virtual machine.

2. Getting Started with Incus

There is no better place to learn Incus than its official documentation page. So head to the main page to read about all the cool things you can do with Incus. Don't forget to support the project and contributors if you can. Find the links at the end of the article.

To start using Incus, you must install it on your computer/server using one of the options available for the operating system of your computer/server. Before you even get to installing Incus on your own system, you can try it online at https://linuxcontainers.org/incus/try-it/..

3. Setting Up a New Incus Server

The documentation provides clear instructions on how to get Incus running on your server. However, I thought I'd show you how I set up mine from start to finish using an Ubuntu 24.04 machine.

Things to Know

  • Incus server works only on Linux.

  • Incus consists of a daemon and a client. The daemon runs your containers, VMs, and API. The client is a CLI tool for interacting with the daemon.

  • Incus client is available for most operating systems, including Windows and macOS.

  • Incus does not come with a built-in UI application

Install Incus daemon and client on Ubuntu 24.04

The following commands install the Incus daemon and client on Ubuntu 24.04. If you have a version of Ubuntu below 24.04 or any other Linux distribution, check out the installation page on the Incus website for specific instructions.

sudo apt update

sudo apt upgrade -y

sudo apt install incus

Check Incus installation

Use incus --version to check the version you installed.

Initialize Incus daemon:

sudo incus admin init

To keep things simple let's accept all default options.

Add your user account to Incus administrator group

sudo adduser sam incus-admin

sudo newgrp incus-admin

You can bootstrap Incus initialization by following the instructions on this page.

Create your first Incus container

incus launch images:ubuntu/20.04 my-container-1

4. Where to Go from Here

Use Incus client --help flag to discover more commands to manage your resources.

Incus project: https://github.com/zabbly/incus

Incus home page: https://linuxcontainers.org/incus/introduction/

Incus documentation: https://linuxcontainers.org/incus/docs/main/

Conclusion

In this post, I wanted to create a simple tutorial on how to get started with Incus without diving into too many details. This is a reference for me, and I hope it helps you get started too. In future posts, I will cover more details on Incus resource types and management, including networking, storage, backup, clustering, security, and more. I hope you'll come back to learn more about Incus with me.

0
Subscribe to my newsletter

Read articles from Mamadou Sandwidi directly inside your inbox. Subscribe to the newsletter, and don't miss out.

Written by

Mamadou Sandwidi
Mamadou Sandwidi