TGViewer
r/SelfHosted r/SelfHosted @r_selfhosted · 982 subscribers
Post #54246 28
[Help] wg-easy in Docker on Raspberry Pi OS (Bookworm) - iptables vs nftables conflict breaking Docker daemon

Hi everyone,

I’m trying to set up `wg-easy` via Docker Compose, but I’m caught in a networking loop between `iptables` and `nftables`.

**My Setup:**

* **Host:** Raspberry Pi running the latest Pi OS (Bookworm)
* **Environment:** Docker / Docker Compose
* **DDNS:** Using a No-IP DDNS address (configured in my router)

**The Problem:** When I start the `wg-easy` container, it fails to bring up the `wg0` interface with the following error in the logs: `modprobe: module ip_tables not found in modules.dep` `iptables v1.8.11 (legacy): can't initialize iptables table 'nat': Table does not exist`

**What I've tried so far:**

1. I added `- /lib/modules:/lib/modules:ro` to my `docker-compose.yml` volumes, but the kernel module still isn't found.
2. I learned that Bookworm uses `nftables` by default. I tried forcing the OS back to legacy iptables using `sudo update-alternatives --set iptables /usr/sbin/iptables-legacy` and rebooted.
3. **The Result:** This completely broke my Docker daemon. `docker.service` failed to start (`code=exited, status=1/FAILURE`). It seems Docker on this specific Pi kernel relies on `iptables-nft`.
4. I reverted the OS back to `iptables-nft`, which fixed Docker, but puts me back at square one with `wg-easy` crashing.

**My Question:** Has anyone successfully deployed `wg-easy` on the new Pi OS (Bookworm) using `nftables`? Is there a way to pass the correct `WG_POST_UP` nftables environment variables to the container, or another workaround that doesn't involve breaking the Docker daemon?

Thanks in advance for any advice!

https://redd.it/1x8ct1h
@r_SelfHosted
Reddit From the selfhosted community on Reddit Explore this post and more from the selfhosted community
More from @r_selfhosted
  1. Oct 17, 2026Amazon Fire stick alternatives I'm looking for cheap alternatives to the Amazon fire stick…
  2. Oct 17, 2026What's the safest way to expose self-hosted apps to the internet? Hi everyone, I have a ho…
  3. Oct 17, 2026Anyone else slowly moving away from complicated self-hosted setups? I feel like there’s a…
  4. Oct 17, 2026Are there any alternatives to Yamtrack? The development stalled a lot and it's now incompa…
  5. Oct 17, 2026photo post
  6. Oct 17, 2026My open-source database client just crossed 650 GitHub stars https://redd.it/1x8g1ks @r_Se…
Threads Profile ViewerView any public Threads profile without an account.Open ThreadLook →Writing with AI? Make it sound human.Metric37 rewrites AI drafts so they read naturally. Free AI detector, 1,500 words free.Try Metric37 →