From 4fa14ab0b4e34d8fe7a18adeaa36d7f4715c952b Mon Sep 17 00:00:00 2001 From: jakub961241 <144362244+jakub961241@users.noreply.github.com> Date: Sun, 22 Mar 2026 01:55:03 +0100 Subject: [PATCH] feat: enable IPv6 on 1panel-network by default (#12202) When creating the 1panel-network Docker bridge, IPv6 was explicitly disabled (EnableIPv6: new(bool) = pointer to false). Users wanting IPv6 had to manually recreate the network. Now 1panel-network is created with dual-stack support: - IPv4: 172.18.0.0/16 (gateway 172.18.0.1) - IPv6: fd00:1panel::/64 (gateway fd00:1panel::1) Uses ULA (Unique Local Address) range which doesn't require public IPv6 allocation and works for internal container-to-container communication. Note: Existing installations are not affected - this only applies when the network is first created. To upgrade, stop all containers, delete 1panel-network, and restart 1Panel. Closes #12202 --- agent/utils/docker/docker.go | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/agent/utils/docker/docker.go b/agent/utils/docker/docker.go index 6047084ad391..860acad9bd17 100644 --- a/agent/utils/docker/docker.go +++ b/agent/utils/docker/docker.go @@ -104,9 +104,16 @@ func (c Client) ListAllContainers() ([]container.Summary, error) { } func (c Client) CreateNetwork(name string) error { + enableIPv6 := true _, err := c.cli.NetworkCreate(context.Background(), name, network.CreateOptions{ Driver: "bridge", - EnableIPv6: new(bool), + EnableIPv6: &enableIPv6, + IPAM: &network.IPAM{ + Config: []network.IPAMConfig{ + {Subnet: "172.18.0.0/16", Gateway: "172.18.0.1"}, + {Subnet: "fd00:1panel::/64", Gateway: "fd00:1panel::1"}, + }, + }, }) return err }