feat: add lima incus example (#24640)

Depends on https://github.com/coder/coder/pull/24616

Adds a sample Lima configuration for Coder+Incus.
This commit is contained in:
Cian Johnston
2026-04-23 08:24:03 +01:00
committed by GitHub
parent edd5d83280
commit f5ccf68e53
7 changed files with 201 additions and 14 deletions
+29 -7
View File
@@ -1,19 +1,22 @@
---
name: Run Coder in Lima
description: Quickly stand up Coder using Lima
tags: [local, docker, vm, lima]
tags: [local, docker, incus, vm, lima]
---
# Run Coder in Lima
This provides a sample [Lima](https://github.com/lima-vm/lima) configuration for Coder.
This provides sample [Lima](https://github.com/lima-vm/lima) configurations for Coder.
This lets you quickly test out Coder in a self-contained environment.
The Docker configuration runs workspaces in Docker containers; the Incus configuration runs workspaces in Incus system containers (with Docker available inside each workspace).
> Prerequisite: You must have `lima` installed and available to use this.
## Getting Started
## Getting Started (Docker)
- Run `limactl start --name=coder https://raw.githubusercontent.com/coder/coder/main/examples/lima/coder.yaml`
This configuration (`coder-docker.yaml`) creates a VM to run Coder workspaces in Docker.
- Run `limactl start --name=coder https://raw.githubusercontent.com/coder/coder/main/examples/lima/coder-docker.yaml`
- You can use the configuration as-is, or edit it to your liking.
This will:
@@ -21,13 +24,32 @@ This will:
- Start an Ubuntu 22.04 VM
- Install Docker and Terraform from the official repos
- Install Coder using the [installation script](../../docs/install/install.sh.md)
- Generates an initial user account `admin@coder.com` with a randomly generated password (stored in the VM under `/home/${USER}.linux/.config/coderv2/password`)
- Initializes a [sample Docker template](https://github.com/coder/coder/tree/main/examples/templates/docker) for creating workspaces
- Generate an initial user account `admin@coder.com` with a randomly generated password (stored in the VM under `/home/${USER}.linux/.config/coderv2/password`)
- Initialize a [sample Docker template](https://github.com/coder/coder/tree/main/examples/templates/docker) for creating workspaces
Once this completes, you can visit `http://localhost:3000` and start creating workspaces!
Alternatively, enter the VM with `limactl shell coder` and run `coder templates init` to start creating your own templates!
## Getting Started (Incus)
This configuration (`coder-incus.yaml`) creates a VM to run Coder workspaces in Incus.
- Run `limactl start --name=coder-incus https://raw.githubusercontent.com/coder/coder/main/examples/lima/coder-incus.yaml`
- You can use the configuration as-is, or edit it to your liking.
This will:
- Start a Debian 13 VM
- Install Incus from the Debian repos and Terraform via the Coder installer
- Install Coder using the [installation script](../../docs/install/install.sh.md)
- Generate an initial user account `admin@coder.com` with a randomly generated password (stored in the VM under `/home/${USER}.linux/.config/coderv2/password`)
- Initialize a [sample Incus template](https://github.com/coder/coder/tree/main/examples/templates/incus) for creating workspaces
Once this completes, you can visit `http://localhost:3000` and start creating workspaces!
Alternatively, enter the VM with `limactl shell coder-incus` and run `coder templates init` to start creating your own templates!
## Further Information
- To learn more about Lima, [visit the the project's GitHub page](https://github.com/lima-vm/lima/).
- To learn more about Lima, [visit the project's GitHub page](https://github.com/lima-vm/lima/).