forgejo-lxd-runner
A Forgejo Runner act backend plugin that runs CI jobs inside LXD instances.
It implements the experimental plugin.v1alpha.BackendPlugin gRPC service
introduced in Forgejo Runner v13.1.0, so the runner can drive the LXD instance
lifecycle (Create / Start / Exec / CopyIn / CopyOut / Remove) over
a Unix or TCP socket.
Status
Alpha — the upstream plugin protocol itself is v1alpha and may change in
incompatible ways between runner releases.
Install
pip install .
# or, for development:
pip install -e '.[dev]'
Generate the gRPC stubs
The .proto file is vendored in proto/plugin/v1alpha/plugin.proto from
Forgejo Runner v13.1.0. Regenerate the Python bindings with:
nox -s proto
Development
pipx install nox # or: pip install nox
nox # lint + type + tests on the current interpreter
nox -s lint # ruff check + format --check
nox -s fmt # ruff check --fix + format (writes changes)
nox -s type # mypy
nox -s tests # pytest
nox -s tests-3.12 # pytest on a specific Python version
nox -s e2e # pytest against a live LXD or Incus daemon
nox -l # list all sessions
Run
forgejo-lxd-runner --address unix:///run/forgejo-lxd-runner.sock
Then point the runner at it via its plugin configuration. See
docs/usage.md for every command-line flag, the per-label
backend options, and the systemd deployment walkthrough.
Layout
proto/ vendored .proto files
src/forgejo_lxd_runner/ package sources
proto/ generated gRPC stubs (git-ignored)
client.py minimal REST client for the LXD / Incus ``/1.0`` API
executor.py job instance execution context
health.py health-check gRPC service reflecting LXD reachability
metrics.py opt-in Prometheus metrics endpoint and RPC interceptor
server.py BackendPlugin service implementation
__main__.py CLI entry point
tests/ pytest suite
License
GPL-3.0-or-later. The vendored .proto file is MIT-licensed by its upstream
authors.
Metadata
Release files for forgejo-lxd-runner 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| forgejo_lxd_runner-0.1.0.tar.gz | 63.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| forgejo_lxd_runner-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 129.4 kB
Release files / forgejo_lxd_runner-0.1.0.tar.gz
| Download URL | forgejo_lxd_runner-0.1.0.tar.gz |
|---|---|
| Size | 63.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f1c55691d3944364082f830dc1eda6d6eacfc2e3204a1a15bc4ab752c7108535
|
|
BLAKE2b-256 checksum How to use checksums |
c4699926ef6618e0ef4f56f8ec69c2a7b8721c342f80ed433415663b1b412217
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency logRelease files / forgejo_lxd_runner-0.1.0-py3-none-any.whl
| Download URL | forgejo_lxd_runner-0.1.0-py3-none-any.whl |
|---|---|
| Size | 66.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5d43693730db142fa594ccd27c300a58786f57633e7241b1113db5598a83a788
|
|
BLAKE2b-256 checksum How to use checksums |
f87c7706785daee044fd3ccd1b23d7cb0da8085d6a7fcc5046f1d746b5c82a3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 6, 2026.
Transparency log