1 # Container Management {#ch-containers}
3 NixOS allows you to easily run other NixOS instances as *containers*.
4 Containers are a light-weight approach to virtualisation that runs
5 software in the container at the same speed as in the host system. NixOS
6 containers share the Nix store of the host, making container creation
10 Currently, NixOS containers are not perfectly isolated from the host
11 system. This means that a user with root access to the container can do
12 things that affect the host. So you should not give container root
13 access to untrusted users.
16 NixOS containers can be created in two ways: imperatively, using the
17 command `nixos-container`, and declaratively, by specifying them in your
18 `configuration.nix`. The declarative approach implies that containers
19 get upgraded along with your host system when you run `nixos-rebuild`,
20 which is often not what you want. By contrast, in the imperative
21 approach, containers are configured and updated independently from the
25 <xi:include href="imperative-containers.section.xml" />
26 <xi:include href="declarative-containers.section.xml" />
27 <xi:include href="container-networking.section.xml" />