For AI agents: a documentation index is available at /llms.txt. Markdown versions of pages are available by appending .md to any documentation URL.
Skip to main content

Configure IPv6

In peer-to-peer (P2P) networking, Teku listens over IPv4 by default. You can configure it to listen over IPv6 or both (dual-stack).

Listen over only IPv6

To configure Teku to listen only on IPv6, set the --p2p-interface CLI option to ::. The --p2p-port, --p2p-udp-port, and --p2p-quic-port CLI options are used for the TCP transport, discovery, and QUIC transport ports.

In single-stack mode, Teku uses port 9000 for TCP and UDP, and 9001 for QUIC (UDP) by default.

Listen over both IPv4 and IPv6 (dual-stack)

To configure Teku to listen over both IPv4 and IPv6 (dual-stack), set the --p2p-interface CLI option to one IPv4 address and one IPv6 address, separated by a comma. For example, set it to 0.0.0.0,:: to listen on all IPv4 and IPv6 interfaces.

In this setup, the --p2p-port, --p2p-udp-port, and --p2p-quic-port options apply to the IPv4 address. The --p2p-port-ipv6, --p2p-udp-port-ipv6, and --p2p-quic-port-ipv6 options apply to the IPv6 address.

In dual-stack mode, Teku uses the following ports by default:

  • On IPv4: 9000 for TCP and UDP, and 9001 for QUIC (UDP)
  • On IPv6: 9090 for TCP and UDP, and 9091 for QUIC (UDP)
Listen on the same port

In dual-stack mode, you can set an IPv6 listening port to the same value as its corresponding IPv4 port. If the ports match and --p2p-interface includes the IPv6 wildcard address (::), Teku binds a single IPv6 wildcard listener for that port, accepting both IPv4 and IPv6 connections on all interfaces. This applies independently to the TCP, UDP discovery, and QUIC ports.

To advertise only the IPv6 public address to the network, use the --p2p-advertised-ip CLI option. This is similar to advertising an IPv4 address.

You can configure the advertised ports using the --p2p-advertised-port and --p2p-advertised-quic-port options.

To advertise both the IPv4 and IPv6 public addresses to the network, use the --p2p-advertised-ips CLI option and provide the two addresses, separated by a comma.

You can configure the advertised ports for the IPv4 address using the --p2p-advertised-port and --p2p-advertised-quic-port options.

You can configure the advertised port for the IPv6 address using the --p2p-advertised-port-ipv6 and --p2p-advertised-quic-port-ipv6 options.