# LXC

LXC is a well-known Linux container runtime that consists of tools, templates, and library and language bindings.

Canonical page: https://ourlocalhost.com/app/4105/lxc

## Description

LXC is a well-known Linux container runtime that consists of tools, templates, and library and language bindings. It's pretty low level, very flexible and covers just about every containment feature supported by the upstream kernel. LXC (Linux Containers) is similar to Docker but with a key difference: while Docker abstracts away much of the system maintenance, LXC gives users greater control and responsibility over managing their environments. This allows for more customization and fine-tuning, making it ideal for users who prefer a hands-on approach.

## Platform availability

Available on 1 of 10 platforms: Unraid.

## Health score

77/100 (Good), based on 4 of 5 factors.
- Maintained: 100 (last commit 9 days ago)
- Popular: 74 (5,299 GitHub stars)
- Easy to install: 25 (1 install platform, install notes)
- Security check: 86 (no serious findings, CI, tests, OpenSSF Scorecard 7.3/10)

## Links

- GitHub: https://github.com/lxc/lxc
- Official website: https://linuxcontainers.org/lxc

## Common questions

### Do LXC system containers need their own kernel?

No, LXC system containers use the host kernel while providing an environment close to a virtual machine. This avoids the overhead of running a separate kernel and simulating hardware.

### What does an unprivileged LXC container need on the host?

It needs kernel support for user namespaces and setuid helpers such as lxc-user-nic, newuidmap, and newgidmap. These helpers map container UIDs and GIDs to unprivileged host values and create network devices.

### How can I make LXC see correct CPU and memory for resource limits?

Run LXCFS with sudo lxcfs /var/lib/lxcfs to publish its special /proc and /sys files. Without this mount, containers may report incorrect CPU and memory information, and resource limits may not work as expected.

### Can I run LXC on Debian without LXD?

Some self-hosters use LXC directly to host services instead of Docker or Podman. LXD is a common LXC manager, but it is not available on Debian via apt and snap installation can cause problems.

### Where should I ask LXC setup questions?

The Linux Containers forum is intended for support questions, feature discussion, and sharing usage of LXC, LXD, and LXCFS.

## Alternatives

- Davit: Fully native macOS interface for running Linux containers on Apple silicon, with direct daemon communication, one-click terminals, live sta…
- Distrobox: Use any Linux distribution inside your terminal.
- Docker: Docker (Moby) is the open-source engine that builds and runs containerized applications, forming the foundation of the Docker ecosystem for…
- Docker Desktop: Docker Desktop is a one-click-install application that lets you to build, share, and run containerized applications and microservices.
- KVM (Kernel-based Virtual Machine): KVM (for Kernel-based Virtual Machine) is a full virtualization solution for Linux on x86 hardware containing virtualization extensions (In…
- Kata Containers Runtime: Kata Containers Runtime is an Unraid plugin that installs Kata Containers, an open-source virtual-machine-based runtime for Docker and OCI-…

---
Source: Our Local Host (https://ourlocalhost.com/app/4105/lxc), the self-hosted and open-source app directory.
