I’m looking to setup Authentikibut I can’t for the life of me get the postgresql container working. I’m gettingconnectionn refused.

I’ve followed the docentation, watched several videos of people who have done the exact same thing as me but its not working. The compose file is the same file from the documentation.

I’m running it on an lxc in proxmox but I’ve also tried a VM with the same result. Any ideas or assistance?

This is in preperation for netbird and I’ve also tried the netbird all in one docker script that uses Zitadel but again that fails as well. The zdb container fails with connection failed to server 172.20.0.2 ( docker IP). I need to have it connect to the host.

  • Tinkerer@lemmy.caOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    3 days ago

    Here is the compose file I’m using:

    services:
      postgresql:
        image: postgres:16-alpine
        container_name: postgresql
        restart: unless-stopped
        networks:
          - authentik
        healthcheck:
          test: ["CMD-SHELL", "pg_isready -d authentik -U postgres"]
          start_period: 20s
          interval: 30s
          retries: 5
          timeout: 5s
        volumes:
          - ./database:/var/lib/postgresql/data
        ports:
          - 5432:5432
        environment:
          POSTGRES_PASSWORD: JKSHDFUHWEUEIORUhdsjhfglsdhuifghert
          POSTGRES_USER: postgres
          POSTGRES_DB: authentik
      redis:
        image: redis:alpine
        container_name: redis
        command: --save 60 1 --loglevel warning
        restart: unless-stopped
        healthcheck:
          test: ["CMD-SHELL", "redis-cli ping | grep PONG"]
          start_period: 20s
          interval: 30s
          retries: 5
          timeout: 3s
        volumes:
          - ./redis:/data
        networks:
          - authentik
      server:
        image: ghcr.io/goauthentik/server:2025.6.4
        container_name: authentik-server
        restart: unless-stopped
        command: server
        environment:
          AUTHENTIK_SECRET_KEY: 0rIgYE/fgWwkkhKXob6jQQ8M8Wp6tJzDc658GGb0C5r0QZOt
          AUTHENTIK_REDIS__HOST: redis
          AUTHENTIK_POSTGRESQL__HOST: postgresql
          AUTHENTIK_POSTGRESQL__USER: postgres
          AUTHENTIK_POSTGRESQL__NAME: authentik
          AUTHENTIK_POSTGRESQL__PASSWORD: JKSHDFUHWEUEIORUhdsjhfglsdhuifghert
        volumes:
          - ./media:/media
          - ./custom-templates:/templates
        ports:
          - 9000:9000
          - 9443:9443
        networks:
          - authentik
        depends_on:
          postgresql:
            condition: service_healthy
          redis:
            condition: service_healthy
      worker:
        image: ghcr.io/goauthentik/server:2025.6.4
        container_name: authentik-worker
        restart: unless-stopped
        command: worker
        networks:
          - authentik
        environment:
          AUTHENTIK_SECRET_KEY: 0rIgYE/fgWwkkhKXob6jQQ8M8Wp6tJzDc658GGb0C5r0QZOt
          AUTHENTIK_REDIS__HOST: redis
          AUTHENTIK_POSTGRESQL__HOST: postgresql
          AUTHENTIK_POSTGRESQL__USER: postgres
          AUTHENTIK_POSTGRESQL__NAME: authentik
          AUTHENTIK_POSTGRESQL__PASSWORD: JKSHDFUHWEUEIORUhdsjhfglsdhuifghert
        user: root
        volumes:
          - /var/run/docker.sock:/var/run/docker.sock
          - ./media:/media
          - ./certs:/certs
          - ./custom-templates:/templates
        depends_on:
          postgresql:
            condition: service_healthy
          redis:
            condition: service_healthy
    networks:
      authentik: