diff --git a/daemon/entrypoint.sh b/daemon/entrypoint.sh
index 2cb0ec1a1003369cd21d506cfde0d361f3723ae5..7b502660cb98ee481a11f45ce26f47355c6724df 100755
--- a/daemon/entrypoint.sh
+++ b/daemon/entrypoint.sh
@@ -1,5 +1,5 @@
-#!/bin/bash
-set -euo pipefail
+#!/bin/sh
+set -eu
 
 rm /tmp/rtorrent.log
 touch /tmp/rtorrent.log
diff --git a/wireguard/Dockerfile b/wireguard/Dockerfile
index 4356df3034a4175e3b382cd6603a3a42f9076775..c5999cf488d100ae848b8c661bf6819403ccfeb7 100644
--- a/wireguard/Dockerfile
+++ b/wireguard/Dockerfile
@@ -9,6 +9,8 @@ RUN rm /sbin/iptables /sbin/ip6tables
 RUN ln -s /sbin/ip6tables-nft /sbin/ip6tables
 RUN ln -s /sbin/iptables-nft /sbin/iptables
 
+ENV LOCAL_NETWORK=""
+
 COPY entrypoint.sh /entrypoint.sh
 VOLUME ["/wireguard.conf"]
 ENTRYPOINT ["/entrypoint.sh"]
diff --git a/wireguard/entrypoint.sh b/wireguard/entrypoint.sh
index eb852b9e2e43d106f108c318988c4bdc623576e3..af86aa6a48300dca835a89af82639107fb992d61 100755
--- a/wireguard/entrypoint.sh
+++ b/wireguard/entrypoint.sh
@@ -1,5 +1,5 @@
-#!/bin/bash
-set -euo pipefail
+#!/bin/sh
+set -eu
 
 if [ -n "$LOCAL_NETWORK" ]; then
   gateway=$(ip route list match 0.0.0.0 | grep -v tun0 | cut -d ' ' -f 3)