Skip to content

Unable to spin up the container in Dockge. Issues with TLS file generation #79

@seirdotexe

Description

@seirdotexe

Summary

I can't get this to work, and I've been trying for an hour now. Creating the container in Dockge and spinning it up, I'll always get the faulty error:

openldap | chmod: cannot access '/certs/cert.pem': No such file or directory

It seems to create the other files just fine:

Image Image

To be noted: the creation of dhparam.pem often failed for me too while testing and figuring out what's wrong. It often needs a restart for it to be made.

Steps to reproduce

  1. Create a very simple docker compose with default settings
services:
  openldap:
    image: docker.io/nfrastack/openldap:latest
    container_name: openldap
    ports:
      - 636:636
    volumes:
      - ./data:/data
      - ./certs:/certs
      - ./logs:/logs
    environment:
      - TIMEZONE=Europe/Amsterdam
      - DOMAIN=thuis.lan
      - ORGANIZATION=Thuis LAN
      - ADMIN_PASS=admin
      - CONFIG_PASS=supersecret
      - ENABLE_BACKUP=false
    restart: unless-stopped
networks: {}
  1. Paste the config in Dockge and run it
Image
  1. The container will fail to generate all required TLS files
Image

What is the expected correct behavior?

It should generate all required TLS files just fine to continue setup.

Relevant logs and/or screenshots

openldap  | + print_notice 'Starting TLS configuration - Please wait..'
openldap  | + output_off
openldap  | + '[' true = true ']'
openldap  | + set +x
openldap  | 2026-01-13.21:48:43 [NOTICE] /container/init/init.d/10-openldap ** [openldap] Starting TLS configuration - Please wait..
openldap  | + certificates /certs/cert.pem
openldap  | + case "${1,,}" in
openldap  | + var_true TRUE
openldap  | + '[' true = true ']'
openldap  | + certificates_check_certificates /certs/cert.pem
openldap  | + print_debug 'Certificates: Checking existence of /certs/cert.pem'
openldap  | + output_off
openldap  | + '[' true = true ']'
openldap  | + set +x
openldap  | 2026-01-13.21:48:43 [DEBUG] /container/init/init.d/10-openldap ** [openldap] Certificates: Checking existence of /certs/cert.pem
openldap  | + '[' '!' -f /certs/cert.pem ']'
openldap  | ++ dirname /certs/cert.pem
openldap  | + mkdir -p /certs
openldap  | + certificates_create_certificate /certs/cert.pem
openldap  | + '[' /certs/cert.pem '!=' '' ']'
openldap  | + var_true ''
openldap  | + '[' '' = true ']'
openldap  | + '[' '' = yes ']'
openldap  | + CERT_SUBJECT=/C=XX/ST=LDAP/L=LDAP/O=LDAP/CN=7d559ce8700a
openldap  | + var_true ''
openldap  | + '[' '' = true ']'
openldap  | + '[' '' = yes ']'
openldap  | + '[' '!' -f /certs/key.pem ']'
openldap  | + var_true ''
openldap  | + '[' '' = true ']'
openldap  | + '[' '' = yes ']'
openldap  | + certificates_trust_ca
openldap  | + var_true ''
openldap  | + '[' '' = true ']'
openldap  | + '[' '' = yes ']'
openldap  | + certificates dhparam
openldap  | + case "${1,,}" in
openldap  | + var_true TRUE
openldap  | + '[' true = true ']'
openldap  | + certificates_check_dhparam
openldap  | + var_true TRUE
openldap  | + '[' true = true ']'
openldap  | + print_debug 'Certificates: DH Param - Checking existence of '\''/certs/dhparam.pem'\'''
openldap  | + output_off
openldap  | + '[' true = true ']'
openldap  | + set +x
openldap  | 2026-01-13.21:48:43 [DEBUG] /container/init/init.d/10-openldap ** [openldap] Certificates: DH Param - Checking existence of '/certs/dhparam.pem'
openldap  | + '[' '!' -f /certs/dhparam.pem ']'
openldap  | + certificates_create_dhparam
openldap  | + var_true TRUE
openldap  | + '[' true = true ']'
openldap  | + print_notice 'Certificates: DH Param - Creating '\''/certs/dhparam.pem'\'''
openldap  | + output_off
openldap  | + '[' true = true ']'
openldap  | + set +x
openldap  | 2026-01-13.21:48:43 [NOTICE] /container/init/init.d/10-openldap ** [openldap] Certificates: DH Param - Creating '/certs/dhparam.pem'
openldap  | + mkdir -p /certs/
openldap  | + silent openssl dhparam -out /certs/dhparam.pem 2048
openldap  | + '[' TRUE = true ']'
openldap  | + '[' '' = true ']'
openldap  | + '[' debug = debug ']'
openldap  | + case "$(basename "$0")" in
openldap  | ++ basename /container/init/init.d/10-openldap
openldap  | + openssl dhparam -out /certs/dhparam.pem 2048
openldap  | Generating DH parameters, 2048 bit long safe prime blablabla
openldap  | + var_true TRUE
openldap  | + '[' true = true ']'
openldap  | + chmod 600 /certs/cert.pem /certs/key.pem /certs/dhparam.pem
openldap  | chmod: cannot access '/certs/cert.pem': No such file or directory
openldap  | ++ set +x

Environment

  • Image version / tag: Latest
  • Host OS: 6.16.10-200.fc42.x86_64 Dockge 1.5.0

-CONTAINER_LOG_LEVEL doesn't seem to do anything for me in terms of providing more information in the terminal. However DEBUG_MODE=TRUE does.

Possible fixes

Please give suggestions on what I can do to test.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions