Conversation
- Add CONTAINER_RUNTIME (lxd|incus); install Incus from the Zabbly apt repo (no snap) - Add ENABLE_PUBLIC_IPS/ENABLE_CADDY/BIND_ADDRESS for web-terminal-only mode - Make bridge/container IPs, memory/swap, extra packages, and SSH enablement configurable - Fix init probe (storage pool), LXD bool vs Incus byte swap, package-list injection/quoting - Update README manual install steps and env var docs
sunghyun1000
requested changes
Sep 10, 2026
sunghyun1000
left a comment
Owner
There was a problem hiding this comment.
한 가지 중요한 문제가 보입니다. PR에서 Incus용 브리지로 incusbr0를 추가했는데, 기존 outbound abuse 차단 규칙은 여전히 iifname "lxdbr0"로 고정되어 있습니다. 이 때문에 Incus를 사용할 경우 SMTP(25/465/587)나 BitTorrent 트래픽 차단이 제대로 적용되지 않을 수 있습니다.
또 ENABLE_PUBLIC_IPS=0인 경우에는 nftables 설정 자체를 건너뛰고 있어서, 웹 전용 모드에서도 동일하게 abuse 차단 규칙이 빠지게 됩니다. Public IP 사용 여부와 outbound abuse 차단은 별개의 설정으로 분리하는 게 좋을 것 같습니다.
- Template abuse-block.nft with __LXD_BRIDGE_NAME__ so Incus uses incusbr0 - Apply abuse blocking in both public-IP and web-only modes; only student-nat DNAT/SNAT stays gated behind ENABLE_PUBLIC_IPS - Load br_netfilter and configure the firewalld trusted zone unconditionally - Update README nftables manual steps
Contributor
Author
|
지적 감사합니다. 맞는 문제라 수정했습니다 (
검증: |
tasoo-oos
marked this pull request as ready for review
September 10, 2026 11:39
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
English
Summary
Adds support for the
Incusruntime (no snapd required) and aweb-terminal-only modefor hosts without secondary/public IPs. The existing LXD (snap) path is unchanged.Changes
CONTAINER_RUNTIME:lxd(default, snap) orincus(Zabbly apt repo, no snap). Client/daemon commands, bridge (lxdbr0/incusbr0), image (ubuntu:24.04/images:ubuntu/noble), group (lxd/incus-admin), storage path, and init command are derived per runtime.ENABLE_PUBLIC_IPS=0skips NetworkManager secondary IPs and nftables DNAT/SNAT;ENABLE_CADDY=0skips Caddy and exposes the app viaBIND_ADDRESS. Bridge/container addressing is configurable to avoid host subnet collisions.CONTAINER_MEMORY,CONTAINER_SWAP,CONTAINER_EXTRA_PACKAGES, andCONTAINER_SSH_ENABLED(default off), plus a file capability so non-root users can runping.defaultstorage pool (a fresh daemon already seeds the default profile);limits.memory.swapbyte values are Incus-only (LXD requires bool);CONTAINER_EXTRA_PACKAGESis passed viaexec --env/ a child-process env object instead of being expanded by the host shell;SECONDARY_IPSis pre-declared forset -u; README manual install and env docs updated.Verification
Created/rebuilt 6 containers on Ubuntu 24.04 with Incus 7.4 (Zabbly): student auth against
/etc/shadow, admin API, xterm.js WebSocket terminal, and the reset queue all work. Each container has 2 GB RAM + 2 GB swap, SSH disabled by default, and the standard toolset installed.Notes
On Incus/cgroup2 with a hard memory limit,
limits.memory.swap=trueresults in no swap, so the value is converted to a byte size equal to the memory limit for Incus only. The LXD path is unchanged.개요
snapd 없이 동작하는
Incus런타임을 추가하고, Secondary/공인 IP가 없는 환경에서도 브라우저 터미널만으로 운영할 수 있는웹 전용 모드를 추가했습니다. 기존 LXD(snap) 경로는 그대로 유지됩니다.주요 변경 사항
1. 컨테이너 런타임 선택 (
CONTAINER_RUNTIME)lxd(기본, snap) 또는incus(Zabbly apt 저장소, snap 불필요)를 선택할 수 있습니다.lxdbr0/incusbr0), 이미지(ubuntu:24.04/images:ubuntu/noble), 그룹(lxd/incus-admin), 저장소 경로, 초기화 명령(lxd init/incus admin init)을 자동 선택합니다.2. 웹 전용 모드
ENABLE_PUBLIC_IPS=0: NetworkManager Secondary IP 설정과 nftables DNAT/SNAT 구성을 생략합니다.ENABLE_CADDY=0: Caddy를 생략하고BIND_ADDRESS로 웹앱을 직접 노출합니다.LXD_BRIDGE_IP/LXD_BRIDGE_SUBNET/CONTAINER_IP_PREFIX를 설정할 수 있습니다.3. 컨테이너 설정 변수
CONTAINER_MEMORY,CONTAINER_SWAP: 메모리 제한과 swap (기본true= 메모리와 동일 크기).CONTAINER_EXTRA_PACKAGES: 생성 시 설치할 패키지 목록.CONTAINER_SSH_ENABLED: sshd 활성화 여부 (기본0, openssh-server는 설치됨).ping을 위한 파일 capability를 부여합니다.4. 버그 수정
profile show default가 init 전에도 성공해 초기화가 건너뛰어지던 문제 →storage list의default풀 존재 여부로 판단합니다.limits.memory.swap바이트 값은 LXD에서 거부(bool만 허용)되므로 Incus일 때만 변환합니다.CONTAINER_EXTRA_PACKAGES가 호스트 셸에서 확장/실행되던 문제 →exec --env로 전달하고, 리셋 경로는 child-process env 객체를 사용합니다.set -u에서 미정의SECONDARY_IPS접근 시 에러 → 빈 배열을 사전 선언합니다.검증
/etc/shadow대조), 관리자 API, xterm.js WebSocket 터미널, 초기화 큐 동작을 확인했습니다.참고
limits.memory.swap=true는 swap 0이 되므로, Incus에 한해 메모리 크기의 바이트 값으로 자동 변환합니다.