Skip to content

IPv6-only not working with Photoprism #111

@PennRobotics

Description

@PennRobotics

TL;DR

When trying to run the Photoprism app on a shared server with only ipv6, errors appear in docker compose logs stating "network is unreachable"

Expected behavior

Running the Photoprism image would generate a certificate for a domain that already has its AAAA record defined on a server with an ipv6 address.

Observed behavior

A certificate is not generated, but the server can be accessed by its IP address as well as its AAAA-linked URL (therefore the photoprism part of the image works and DNS records are probably set up correctly).

Minimal working example

No response

Log output

traefik     | time="2024-03-06T15:54:13Z" level=error msg="Unable to obtain ACME certificate for domains \" {URL} \": cannot get ACME client get directory at 'https://acme-v02.api.letsencrypt.org/directory': Get \"https://acme-v02.api.letsencrypt.org/directory\": dial tcp 172.65.<>.<>:443: connect: network is unreachable" providerName=mytlschallenge.acme ACME CA="https://acme-v02.api.letsencrypt.org/directory" routerName=photoprism@docker rule="Host(` {URL} `)"

URL redacted, server IP addr partially redacted

Additional information

This was with reverse DNS enabled and AAAA records pointing to the server's IPv6 address. At no point did I add A or CNAME or ALIAS records for the ipv4 address, so I don't believe ipv4 is being used or is necessary between the visitor and server.

After adding an ipv4 address in the cloud console and some /etc/docker/daemon.conf workarounds on the server, such as adding a pair for registry-mirrors and ipv6 and ip6tables, the problem seems to be resolved (or the certificate generated by manually running certbot via pip was slow to get approved and then was imported by the docker image. I also tried about a dozen different things over a few hours, so it's possible some other change was the eventual turning of the "https" tide.

However, I also recreated the server image to start anew, and the moment that I enabled an ipv4 address in console, a certificate was generated and I could then access the site via https.

I don't know much about Docker but can try to run each Dockerfile manually, independently, and verbosely to get more info.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions