Incus operations
Incus manages system containers and virtual machines on a Linux host. This skill
gets you from "no idea where the daemon is" to operating instances confidently,
and routes deeper questions into five reference files under references/.
What Incus is
Incus is image-based: you launch an instance from an image, then configure and
use it. Containers share the host kernel and start in seconds; VMs (--vm)
boot their own kernel and behave like full machines. Both are instances driven
by the same commands. Instance configuration is key=value pairs such as
limits.cpu=1 and limits.memory=512MiB.
Reach the daemon first
The incus CLI is a client for a Linux daemon, and you may be on macOS, in a
sandbox, or on the host itself. Determine your execution path before running any
other command, in this order:
- Local binary:
command -v incus. If found, run incus list. An instance
table (possibly empty) proves a reachable daemon — use plain incus ….
- OrbStack Linux machine: no local
incus, but command -v orbctl finds a
binary and orbctl list shows a Linux machine. Wrap every command:
orb -m <machine> incus …. If the machine has no Incus yet:orb -m <machine> sudo apt-get update && orb -m <machine> sudo apt-get install -y incus
orb -m <machine> sudo incus admin init --minimal
orb -m <machine> sudo adduser "$(whoami)" incus-admin
Each orb -m call starts a fresh login shell, so group membership applies on
the next invocation. Verify with orb -m <machine> incus list.
- Remote server: neither of the above, but the user names a server. Install
the client alone —
brew install incus on macOS ships the client without a
daemon — then attach:incus remote add <name> <host[:port]>
The server side must expose its API (core.https_address) and mint a trust
token with incus config trust add <client-name>; supply that token when the
client prompts. Address every object explicitly with --remote <name>, or
switch once with incus remote switch <name> and drop the flag.
None of these apply → report what is missing instead of improvising: the Incus
daemon exists only on Linux.
Command grammar
Everything else builds on these verbs. <inst> means an instance name, with an
optional :<remote> or <remote>:<inst> prefix.
| Task |
Command |
| Create and start, with limits |
incus launch images:debian/12 web --config limits.cpu=1 --config limits.memory=512MiB |
| Create without starting; make it a VM |
incus init images:ubuntu/24.04 db --vm |
| Lifecycle |
incus start | stop | restart <inst> |
| Remove |
incus delete <inst> — refuses running instances; see the gate below |
| Clone / relocate |
incus copy src dst, incus move old new |
| Run a command inside |
incus exec web -- apt-get install -y nginx |
| Move files |
incus file push app.conf web/etc/app.conf · incus file pull web/var/log/nginx/error.log - |
| Change configuration |
incus config set web limits.memory=1GiB · incus config show web · config edit |
| Add/override devices |
incus config device add web http proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:80 · config device override for profile-inherited devices |
| Snapshots |
incus snapshot create web clean · snapshot restore web clean · snapshot delete … |
| Inspect |
incus list · incus info web · incus info web --show-log |
Object namespaces follow the same shape: incus config, profile, network,
storage, image, project, remote, admin. Image specifiers name a server.
A stock install ships two: images:debian/12 (public linuxcontainers.org
images, including images:ubuntu/24.04) and bare names for the local store.
Servers you add as remotes contribute their own prefix; see
references/images-profiles.md.
This table is syntax only. The recipes, flags that matter, and failure modes
live in the references — route by task:
| When the task touches… |
Read |
| Creating, limiting, configuring instances; cloud-init; devices; exec/file workflows; console; troubleshooting; snapshots & backups |
references/instances.md |
| Finding, copying, building images; aliases; remotes; profiles & inheritance; client TLS |
references/images-profiles.md |
| Storage pools, custom volumes, attaching disks, moving or exporting volumes |
references/storage.md |
| Bridges, NIC types, port forwards, ACLs, DNS/firewall interplay, OVN |
references/networking.md |
| Server init & tuning, API exposure, projects, clustering, debugging, metrics, authn/z |
references/administration.md |
Each reference opens with a two-line scope statement; if a request falls between
two files, the scope lines tell you which owns it.
Judgment calls that bite
--vm changes the download. The same image name resolves to a different
VM-compatible build; a container-only image fails to boot as a VM.
- Stop before delete when the data matters.
delete on a running instance
errors out; --force bypasses that check, but stopping first lets the guest
flush its filesystems, which a forced kill does not guarantee.
exec needs the -- separator. Without it, flags meant for the inner
command get eaten by incus itself: incus exec web -- ls -la /.
- Wrappers eat quoting levels. Through
ssh host incus exec web -- … or
orb -m m incus exec …, each layer strips one round of quotes; test the inner
command with echo before running something destructive.
- Commands are project-scoped. Most commands act inside the current project;
pass
--project <name> explicitly whenever more than the default project
exists, or you will silently operate on the wrong namespace.
- Device support differs by instance type. Some device kinds work only on
containers or only on VMs; check the device tables in
references/instances.md before promising a device
will attach.
Destructive-action gate
Deletions in Incus are immediate — there is no undo and no recycle bin, because
the daemon frees storage and state at once. Pause and confirm with the human
before any of these:
- deleting instances, snapshots, volumes, pools, profiles, networks, projects,
images, or cluster members
- any
delete --force, or removing a running instance's last snapshot
- recovery operations (
incus admin recover) that rewrite daemon state
Offer the reversible alternative where one exists: stop instead of force-delete,
export a volume backup before removing a pool. When the user has clearly asked
for the deletion, proceed without re-litigating.
1---2name: incus-lxc3description: Operate Incus, the modern system container and VM manager (LXD/LXC successor): launch, configure, exec into, snapshot, back up, and delete instances; manage images, remotes, profiles, storage pools/volumes, networks (bridges, port forwards, ACLs), projects, and server configuration. Use whenever the user mentions incus, lxc, lxd, system containers, lightweight VMs, container/VM images, profiles, storage pools, bridges or port forwarding on a Linux host, or asks to deploy a service into a container/VM — even if they never say "Incus".4---56# Incus operations78Incus manages system containers and virtual machines on a Linux host. This skill9gets you from "no idea where the daemon is" to operating instances confidently,10and routes deeper questions into five reference files under `references/`.1112## What Incus is1314Incus is image-based: you launch an instance from an image, then configure and15use it. Containers share the host kernel and start in seconds; VMs (`--vm`)16boot their own kernel and behave like full machines. Both are *instances* driven17by the same commands. Instance configuration is `key=value` pairs such as18`limits.cpu=1` and `limits.memory=512MiB`.1920## Reach the daemon first2122The `incus` CLI is a client for a Linux daemon, and you may be on macOS, in a23sandbox, or on the host itself. Determine your execution path before running any24other command, in this order:25261. **Local binary**: `command -v incus`. If found, run `incus list`. An instance27 table (possibly empty) proves a reachable daemon — use plain `incus …`.282. **OrbStack Linux machine**: no local `incus`, but `command -v orbctl` finds a29 binary and `orbctl list` shows a Linux machine. Wrap every command:30 `orb -m <machine> incus …`. If the machine has no Incus yet:31 ```bash32 orb -m <machine> sudo apt-get update && orb -m <machine> sudo apt-get install -y incus33 orb -m <machine> sudo incus admin init --minimal34 orb -m <machine> sudo adduser "$(whoami)" incus-admin35 ```36 Each `orb -m` call starts a fresh login shell, so group membership applies on37 the next invocation. Verify with `orb -m <machine> incus list`.383. **Remote server**: neither of the above, but the user names a server. Install39 the client alone — `brew install incus` on macOS ships the client without a40 daemon — then attach:41 ```bash42 incus remote add <name> <host[:port]>43 ```44 The server side must expose its API (`core.https_address`) and mint a trust45 token with `incus config trust add <client-name>`; supply that token when the46 client prompts. Address every object explicitly with `--remote <name>`, or47 switch once with `incus remote switch <name>` and drop the flag.4849None of these apply → report what is missing instead of improvising: the Incus50daemon exists only on Linux.5152## Command grammar5354Everything else builds on these verbs. `<inst>` means an instance name, with an55optional `:<remote>` or `<remote>:<inst>` prefix.5657| Task | Command |58| --- | --- |59| Create and start, with limits | `incus launch images:debian/12 web --config limits.cpu=1 --config limits.memory=512MiB` |60| Create without starting; make it a VM | `incus init images:ubuntu/24.04 db --vm` |61| Lifecycle | `incus start \| stop \| restart <inst>` |62| Remove | `incus delete <inst>` — refuses running instances; see the gate below |63| Clone / relocate | `incus copy src dst`, `incus move old new` |64| Run a command inside | `incus exec web -- apt-get install -y nginx` |65| Move files | `incus file push app.conf web/etc/app.conf` · `incus file pull web/var/log/nginx/error.log -` |66| Change configuration | `incus config set web limits.memory=1GiB` · `incus config show web` · `config edit` |67| Add/override devices | `incus config device add web http proxy listen=tcp:0.0.0.0:8080 connect=tcp:127.0.0.1:80` · `config device override` for profile-inherited devices |68| Snapshots | `incus snapshot create web clean` · `snapshot restore web clean` · `snapshot delete …` |69| Inspect | `incus list` · `incus info web` · `incus info web --show-log` |7071Object namespaces follow the same shape: `incus config`, `profile`, `network`,72`storage`, `image`, `project`, `remote`, `admin`. Image specifiers name a server.73A stock install ships two: `images:debian/12` (public linuxcontainers.org74images, including `images:ubuntu/24.04`) and bare names for the local store.75Servers you add as remotes contribute their own prefix; see76[references/images-profiles.md](references/images-profiles.md).7778This table is syntax only. The recipes, flags that matter, and failure modes79live in the references — route by task:8081| When the task touches… | Read |82| --- | --- |83| Creating, limiting, configuring instances; cloud-init; devices; exec/file workflows; console; troubleshooting; snapshots & backups | [references/instances.md](references/instances.md) |84| Finding, copying, building images; aliases; remotes; profiles & inheritance; client TLS | [references/images-profiles.md](references/images-profiles.md) |85| Storage pools, custom volumes, attaching disks, moving or exporting volumes | [references/storage.md](references/storage.md) |86| Bridges, NIC types, port forwards, ACLs, DNS/firewall interplay, OVN | [references/networking.md](references/networking.md) |87| Server init & tuning, API exposure, projects, clustering, debugging, metrics, authn/z | [references/administration.md](references/administration.md) |8889Each reference opens with a two-line scope statement; if a request falls between90two files, the scope lines tell you which owns it.9192## Judgment calls that bite9394- **`--vm` changes the download.** The same image name resolves to a different95 VM-compatible build; a container-only image fails to boot as a VM.96- **Stop before delete when the data matters.** `delete` on a running instance97 errors out; `--force` bypasses that check, but stopping first lets the guest98 flush its filesystems, which a forced kill does not guarantee.99- **`exec` needs the `--` separator.** Without it, flags meant for the inner100 command get eaten by `incus` itself: `incus exec web -- ls -la /`.101- **Wrappers eat quoting levels.** Through `ssh host incus exec web -- …` or102 `orb -m m incus exec …`, each layer strips one round of quotes; test the inner103 command with `echo` before running something destructive.104- **Commands are project-scoped.** Most commands act inside the current project;105 pass `--project <name>` explicitly whenever more than the default project106 exists, or you will silently operate on the wrong namespace.107- **Device support differs by instance type.** Some device kinds work only on108 containers or only on VMs; check the device tables in109 [references/instances.md](references/instances.md) before promising a device110 will attach.111112## Destructive-action gate113114Deletions in Incus are immediate — there is no undo and no recycle bin, because115the daemon frees storage and state at once. Pause and confirm with the human116before any of these:117118- deleting instances, snapshots, volumes, pools, profiles, networks, projects,119 images, or cluster members120- any `delete --force`, or removing a running instance's last snapshot121- recovery operations (`incus admin recover`) that rewrite daemon state122123Offer the reversible alternative where one exists: `stop` instead of force-delete,124`export` a volume backup before removing a pool. When the user has clearly asked125for the deletion, proceed without re-litigating.