Unattended OPNsense provisioning for Proxmox via standard NoCloud cloud-init
  • Python 58.2%
  • HCL 19.9%
  • Shell 7.3%
  • Go Template 7.3%
  • Nix 5%
  • Other 2.3%
Find a file
Louis Raymond 1dbc2fa98a
All checks were successful
CI / image-build (push) Has been skipped
CI / shellcheck (push) Successful in 34s
CI / packer-validate (push) Successful in 36s
CI / terraform-validate (push) Successful in 37s
CI / opnseed-tests (push) Successful in 1m9s
forgejo ci: add image-build job on the new KVM runner
Real Packer+QEMU unattended install (make image), not just packer
validate's syntax check. Targets the dedicated kvm-runner (host-execution,
/dev/kvm access) rather than the default Docker-based runner, which has
neither KVM nor enough disk for this. Manual/weekly trigger only -- too
slow to gate every push.
2026-08-19 15:39:15 -04:00
.forgejo/workflows forgejo ci: add image-build job on the new KVM runner 2026-08-19 15:39:15 -04:00
.github/workflows OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
base OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
docs OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
examples OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
guest/usr/local/etc/rc.syshook.d/early OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
iso OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
opnseed OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
packer OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
terraform OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
.envrc OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
.gitignore OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
flake.lock OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
flake.nix OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
Makefile OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
README.md OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00
THIRD_PARTY_NOTICES.md OPNsense unattended provisioning for Proxmox (NoCloud cloud-init) 2026-08-19 13:44:35 -04:00

OPNsense unattended provisioning for Proxmox (NoCloud cloud-init)

Automates OPNsense's normally-manual bring-up on Proxmox VE:

  1. Install OPNsense from ISO to permanent disk storage.
  2. Assign LAN so the web GUI is reachable.
  3. Configure interfaces, IP addressing, VLANs, hostname, and SSH/API access — everything the setup wizard would otherwise ask for by hand.

Why not just run cloud-init inside OPNsense?

OPNsense has no official cloud-init support, and stock cloud-init's FreeBSD network renderer writes addressing into /etc/rc.conf — which OPNsense's own config (/conf/config.xml) and GUI never see, so the box ends up misconfigured from OPNsense's point of view even though the network technically works. See docs/architecture.md for the full rationale.

Instead, this project builds a base image with a custom first-boot hook that parses the standard Proxmox NoCloud seed (user-data / meta-data / network-config, exactly what the Proxmox GUI's Cloud-Init tab or qm set --ipconfig0/--sshkeys/--ciuser produces) and renders it directly into /conf/config.xml using OPNsense's own configuration format. No cloud-init package runs inside the guest.

Documentation

Dev environment

nix develop
# or, with direnv: direnv allow

Provides Packer, QEMU, the Python toolchain for opnseed, OpenTofu, Ansible, and debugging tools (VNC, guestfish). packer is BUSL-licensed; the flake whitelists only that package via allowUnfreePredicate rather than a blanket allowUnfree.

License

See THIRD_PARTY_NOTICES.md for attribution of code derived from other projects.