bubblewrap
bubblewrap
Section titled “bubblewrap”bubblewrap is the Linux namespace primitive behind Fence and many other sandboxes. Use it directly when you want a minimal DIY jail without Fence’s policy layer.
Install
Section titled “Install”# Debian / Ubuntusudo apt install bubblewrap
# Fedorasudo dnf install bubblewrapFor a higher-level wrapper around per-project bubblewrap configs, see sandbox-run.
Launch with proxy env
Section titled “Launch with proxy env”Share the host network so the jail can reach varlock on loopback, bind your project read-write, and keep the rest of $HOME out:
eval "$(varlock proxy env)"
bwrap \ --die-with-parent \ --unshare-pid \ --share-net \ --ro-bind /usr /usr \ --ro-bind /bin /bin \ --ro-bind /lib /lib \ --ro-bind /lib64 /lib64 \ --ro-bind /etc /etc \ --bind "$PWD" "$PWD" \ --chdir "$PWD" \ --dev /dev \ --proc /proc \ --tmpfs /tmp \ -- claudeAdjust binds for your distro layout and tools (node, agent binaries under /home, etc.). Prefer Fence if you want packaged agent templates and domain allowlisting without maintaining a long bwrap line.