Docker compose.yaml missing ipv6 support #4017

Open
opened 2026-02-28 03:48:17 -05:00 by deekerman · 8 comments
Owner

Originally created by @neilbags on GitHub (Mar 4, 2025).

I can't see any reporting ipv6 issue with the docker container where docker ipv6 is otherwise configured and working

🛡️ Security Policy

Description

I'm using uptime-kuma from the latest docker image:

services:
  uptime-kuma:
    image: louislam/uptime-kuma
    container_name: uptime-kuma
    volumes:
      - ./uptime-kuma-data:/app/data
    ports:
      - 3001:3001  # <Host Port>:<Container Port>
    restart: always

Docker ipv6 is configured:

# cat /etc/docker/daemon.json
{
  "ipv6": true,
  "fixed-cidr-v6": "<hidden>"
}

Docker ipv6 is working:

# docker run --rm -it busybox ping -c 1 ipv6.google.com
PING ipv6.google.com (2404:6800:4006:814::200e): 56 data bytes
64 bytes from 2404:6800:4006:814::200e: seq=0 ttl=116 time=0.945 ms

ipv6 in the uptime-kuma container is not:

# docker exec uptime-kuma ping -c 1 ipv6.google.com
connect: Network is unreachable

Have tested on multiple hosts, Ubuntu 24.04 and 22.04.

👟 Reproduction steps

docker exec uptime-kuma ping -c 1 ipv6.google.com

👀 Expected behavior

ipv6 works

😓 Actual Behavior

connect: Network is unreachable

🐻 Uptime-Kuma Version

1.23.16

💻 Operating System and Arch

Ubuntu 24.04

🌐 Browser

Firefox 135.0.1

🖥️ Deployment Environment

Default docker image

📝 Relevant log output


Originally created by @neilbags on GitHub (Mar 4, 2025). ### 📑 I have found these related issues/pull requests I can't see any reporting ipv6 issue with the docker container where docker ipv6 is otherwise configured and working ### 🛡️ Security Policy - [x] I agree to have read this project [Security Policy](https://github.com/louislam/uptime-kuma/security/policy) ### Description I'm using uptime-kuma from the latest docker image: ``` services: uptime-kuma: image: louislam/uptime-kuma container_name: uptime-kuma volumes: - ./uptime-kuma-data:/app/data ports: - 3001:3001 # <Host Port>:<Container Port> restart: always ``` Docker ipv6 is configured: ``` # cat /etc/docker/daemon.json { "ipv6": true, "fixed-cidr-v6": "<hidden>" } ``` Docker ipv6 is working: ``` # docker run --rm -it busybox ping -c 1 ipv6.google.com PING ipv6.google.com (2404:6800:4006:814::200e): 56 data bytes 64 bytes from 2404:6800:4006:814::200e: seq=0 ttl=116 time=0.945 ms ``` ipv6 in the uptime-kuma container is not: ``` # docker exec uptime-kuma ping -c 1 ipv6.google.com connect: Network is unreachable ``` Have tested on multiple hosts, Ubuntu 24.04 and 22.04. ### 👟 Reproduction steps ``` docker exec uptime-kuma ping -c 1 ipv6.google.com ``` ### 👀 Expected behavior ipv6 works ### 😓 Actual Behavior ``` connect: Network is unreachable ``` ### 🐻 Uptime-Kuma Version 1.23.16 ### 💻 Operating System and Arch Ubuntu 24.04 ### 🌐 Browser Firefox 135.0.1 ### 🖥️ Deployment Environment Default docker image ### 📝 Relevant log output ```shell ```
Author
Owner

@CommanderStorm commented on GitHub (Mar 7, 2025):

docker exec uptime-kuma ping -c 1 ipv6.google.com
connect: Network is unreachable

If ipv6.google.com is not reachable from the docker container, this is not our fault.
There is something wrong with how you set up the networking => start with the midpoint, look if pinging works => bisect your network from there..

Setting docker up to support ipv6 can be tricky

Closing as resolved as not an issue in our docker image

@CommanderStorm commented on GitHub (Mar 7, 2025): ``` docker exec uptime-kuma ping -c 1 ipv6.google.com connect: Network is unreachable ``` If ipv6.google.com is not reachable from the docker container, this is not our fault. There is something wrong with how you set up the networking => start with the midpoint, look if pinging works => bisect your network from there.. Setting docker up to support ipv6 can be tricky Closing as resolved as not an issue in our docker image
Author
Owner

@neilbags commented on GitHub (Mar 7, 2025):

@CommanderStorm I had another look at this - ipv6 was enabled and working in docker but it appears that it needs to be explicitly enabled in the compose file. i.e. this works:

services:
  uptime-kuma:
    image: louislam/uptime-kuma:1
    volumes:
      - ./data:/app/data
    ports:
      # <Host Port>:<Container Port>
      - 3001:3001
    restart: unless-stopped
    networks:
      - uptime-kuma
networks:
  uptime-kuma:
    enable_ipv6: true

The provided compose.yaml doesn't work with ipv6 (at least on my systems) and I can't see any way to enable it globally. Do you want me to submit a PR to update the provided compose.yaml?

@neilbags commented on GitHub (Mar 7, 2025): @CommanderStorm I had another look at this - ipv6 was enabled and working in docker but it appears that it needs to be explicitly enabled in the compose file. i.e. this works: ```yaml services: uptime-kuma: image: louislam/uptime-kuma:1 volumes: - ./data:/app/data ports: # <Host Port>:<Container Port> - 3001:3001 restart: unless-stopped networks: - uptime-kuma networks: uptime-kuma: enable_ipv6: true ``` The provided compose.yaml doesn't work with ipv6 (at least on my systems) and I can't see any way to enable it globally. Do you want me to submit a PR to update the provided compose.yaml?
Author
Owner

@CommanderStorm commented on GitHub (Mar 7, 2025):

Could you try the debugging step in https://docs.docker.com/engine/daemon/ipv6/#use-ipv6-for-the-default-bridge-network first?

This seems like a bug in docker..

@CommanderStorm commented on GitHub (Mar 7, 2025): Could you try the debugging step in https://docs.docker.com/engine/daemon/ipv6/#use-ipv6-for-the-default-bridge-network first? This seems like a bug in docker..
Author
Owner

@neilbags commented on GitHub (Mar 9, 2025):

Could you try the debugging step

Do you mean setting "ipv6": true and "fixed-cidr-v6" in daemon.json? Yes I have done that (see above) and it does work for containers brought up using with docker run but doesn't work for docker compose without specifying enable_ipv6: true in compose file.

The guide does mention:
"This also applies to networks created from a Docker Compose file, with enable_ipv6 set to true." which sort-of implies that its required in the compose file.

I also tried specifying default-address-pools but that didn't change the behavior

@neilbags commented on GitHub (Mar 9, 2025): > Could you try the debugging step Do you mean setting ` "ipv6": true` and ` "fixed-cidr-v6"` in `daemon.json`? Yes I have done that (see above) and it does work for containers brought up using with `docker run` but doesn't work for `docker compose` without specifying `enable_ipv6: true` in compose file. The guide does mention: "This also applies to networks created from a Docker Compose file, with enable_ipv6 set to true." which sort-of implies that its required in the compose file. I also tried specifying `default-address-pools` but that didn't change the behavior
Author
Owner

@CommanderStorm commented on GitHub (Mar 10, 2025):

No, does docker run --rm -p 80:80 traefik/whoami bind to ipv6

The docs pretty clearly state that the docker compose part should not be nessesary

@CommanderStorm commented on GitHub (Mar 10, 2025): No, does docker run --rm -p 80:80 traefik/whoami bind to ipv6 The docs pretty clearly state that the docker compose part should not be nessesary
Author
Owner

@neilbags commented on GitHub (Mar 10, 2025):

does docker run --rm -p 80:80 traefik/whoami bind to ipv6

yes

@neilbags commented on GitHub (Mar 10, 2025): > does docker run --rm -p 80:80 traefik/whoami bind to ipv6 yes
Author
Owner

@louislam commented on GitHub (Apr 4, 2025):

It is a docker compose issue, if you start Uptime Kuma via command line, it is able to ping too.

docker run --rm -it louislam/uptime-kuma ping -c 1 ipv6.google.com
root@louis-twister-pi:/opt/stacks/test-uptime-kuma-ipv6 # docker run --rm -it louislam/uptime-kuma ping -c 1 ipv6.google.com
==> Performing startup jobs and maintenance tasks
==> Starting application with user 0 group 0
PING ipv6.google.com(nchkgb-ai-in-x0e.1e100.net (2404:6800:4005:81a::200e)) 56 data bytes
64 bytes from nchkgb-ai-in-x0e.1e100.net (2404:6800:4005:81a::200e): icmp_seq=1 ttl=56 time=3.59 ms

--- ipv6.google.com ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 3.592/3.592/3.592/0.000 ms

It seems you need to add some extra ipv6 config in your compose.yaml, but it is a bit complicated. I actually don't understand why they were doing this.

Read more:
https://stackoverflow.com/questions/39649458/how-to-assign-ipv6-address-with-docker-compose

@louislam commented on GitHub (Apr 4, 2025): It is a docker compose issue, if you start Uptime Kuma via command line, it is able to ping too. ```bash docker run --rm -it louislam/uptime-kuma ping -c 1 ipv6.google.com ``` ``` root@louis-twister-pi:/opt/stacks/test-uptime-kuma-ipv6 # docker run --rm -it louislam/uptime-kuma ping -c 1 ipv6.google.com ==> Performing startup jobs and maintenance tasks ==> Starting application with user 0 group 0 PING ipv6.google.com(nchkgb-ai-in-x0e.1e100.net (2404:6800:4005:81a::200e)) 56 data bytes 64 bytes from nchkgb-ai-in-x0e.1e100.net (2404:6800:4005:81a::200e): icmp_seq=1 ttl=56 time=3.59 ms --- ipv6.google.com ping statistics --- 1 packets transmitted, 1 received, 0% packet loss, time 0ms rtt min/avg/max/mdev = 3.592/3.592/3.592/0.000 ms ``` It seems you need to add some extra ipv6 config in your compose.yaml, but it is a bit complicated. I actually don't understand why they were doing this. Read more: https://stackoverflow.com/questions/39649458/how-to-assign-ipv6-address-with-docker-compose
Author
Owner

@hvisage commented on GitHub (Jul 16, 2025):

using the Live demo of Kuma, I cant seem to have it resolve IPv6 only endpoints either. Would be great to showcase the live demo with IPv6

Image
@hvisage commented on GitHub (Jul 16, 2025): using the Live demo of Kuma, I cant seem to have it resolve IPv6 only endpoints either. Would be great to showcase the live demo with IPv6 <img width="1694" height="932" alt="Image" src="https://github.com/user-attachments/assets/a86d517e-5b32-4f30-8433-cdb2221fb13b" />
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/uptime-kuma#4017
No description provided.