Direkt zum Hauptinhalt

LDAP Installation

📜 Zertifikat mit ACME automatisch installieren

 & verwalten (Docker, Synology, All-Inkl)

🔗 Offizielles Projekt:
👉 https://github.com/acmesh-official/acme.sh – GitHub


🐳 Docker Container

version: "2.1"
services:
  acme.sh:
    image: neilpang/acme.sh
    container_name: tool-acme.sh
    environment:
      #Check your UserID and GroupID using command: id acme
      - PUID=1026         #acme# userBenutzer-ID (z. B. acme user)
      - PGID=100          # Gruppen-ID
      - TZ=Europe/Berlin
      - UMASK_SET=002
    network_mode: host
    volumes:
      - /volume3/docker/acme/config:/acme.sh   # persistente Konfiguration
      - /volume3/docker/acme/key:/key          # optionale Schlüsselablage
    command: daemon
    restart: unless-stopped

Konfiguration
hinterlegen

🔐 DSM-Zugangsdaten setzen (für Deployment auf Synology)

👉 Anleitung: https://github.com/acmesh-official/Synology NAS Guide (acme.sh/wiki/Synology-NAS-Guidesh)

DazuIm in die Container Console wechselnContainer:

export SYNO_USERNAME=adminUser
export SYNO_PASSWORD=adminPassword
export SYNO_SCHEME=https
export SYNO_HOSTNAME=dsm.familie-jonas.bayern
export SYNO_PORT=5001
export SYNO_CREATE=1

Notify

🔔 Benachrichtigung per Pushover

 aktivieren

👉 https://github.com/acmesh-official/acme.sh/wiki/notifyPushover Notify-Hook Doku

1. Zugangsdaten exportieren:

export PUSHOVER_TOKEN=tokenyour_token
export PUSHOVER_USER=useryour_user_key

Pushover

2. konfigurierenNotify-Hook und testen

aktivieren:

acme.sh --set-notify --notify-hook pushover --notify-level 3

0:--notify-level disabled,Bedeutungen:

nonotificationwillbesent.1:sendnotificationonlywhenthereisanerror.Nogoodnews.2:sendissuccessfullyrenewed,orsendnotificationwhen a cert is skipped, renewed, or error. You will receive notification every night with this level.
Level Beschreibung
0 Deaktiviert
1 Nur newsbei isFehlern
2 Bei notificationerfolgreicher whenErneuerung aoder certFehler
3 Immer there(auch iswenn anZertifikat errorübersprungen 3:wurde)

Das💡 Hinweis: Nach erfolgreichem Test mit --notify-level 3 sollte, sofern der cron job funktioniert nach 24h/48hggf. auf --notify-level 2 reduziert werden.reduzieren.

Es


sollte

🌐 eine Nachricht an den User geschickt worden sein!

All-Inkl.com domainDNS API

 (All-Inkl)

👉 Doku: https://github.com/acmesh-official/acme.sh/wiki/dnsapi2#dns_kasdns_kas

export KAS_Login=<ACCOUNTID>
export KAS_Authdata=<PLAINTEXTPASSWORD>
export KAS_Authtype=plain

Konfigration🧪 TestenZertifikat manuell testen

Zertifikat erstellen

erstellen:

acme.sh --issue -d ldap.familie-jonas.bayern --dns dns_kas --keylength 2048 --server letsencrypt

🛑 Hinweis:
Ohne --keylength erstellt acme.sh standardmäßig ein ECC-Zertifikat.
Die Angabe --keylength 2048 erzwingt ein RSA-Zertifikat, das besser kompatibel ist – z. B. mit Synology DSM.


Zertifikat deployen

deployen:

acme.sh --deploy -d ldap.familie-jonas.bayern --deploy-hook synology_dsm

Standartmäßig

⚙️ erstelltAutomatische Erneuerung (Cronjob im Container)

Interner Cronjob aktivieren:

acme.sh ein ECC-Zertifikat. Dies kann durch die Angabe der --keylengthinstall-cronjob
2048
unterbunden

➡️ werden.Dieser Dadurchläuft wirdalle ein24h RSA-Zertifikatautomatisch erstellt,im welchesContainer erfolgreich(sofern deployedcommand: werdendaemon kann.im Docker aktiv ist)

Manuell

Testlauf der Automatik (Cron)testen:

acme.sh --cron

Ausgabe

Beispielausgabe:

acme.sh --cron
[Wed Aug  6 09:59:57 CEST 2025] ===Starting cron===
[Wed Aug  6 09:59:57 CEST 2025] Already up to date!
[Wed Aug  6 09:59:57 CEST 2025] Upgrade successful!
[Wed Aug  6 09:59:57 CEST 2025] Automatically upgraded to: 3.1.2
[Wed Aug  6 09:59:57 CEST 2025] Renewing: 'ldap.familie-jonas.bayern'
[Wed Aug  6 09:59:57 CEST 2025] Renewing using Le_API=https://acme-v02.api.letsencrypt.org/directory
[Wed Aug  6 09:59:57 CEST 2025] Skipping. Next renewal time is: 2025-10-04T07:27:23Z
[Wed Aug  6 09:59:57 CEST 2025] Add '--force' to force renewal.
[Wed Aug  6 09:59:57 CEST 2025] Skipped ldap.familie-jonas.bayern
[Wed Aug  6 09:59:57 CEST 2025] Sending via: pushover
[Wed Aug  6 09:59:59 CEST 2025] PUSHOVER send success.
[Wed Aug  6 09:59:59 CEST 2025] pushover Success
[Wed Aug  6 09:59:59 CEST 2025] ===End cron===

🧩 Optional: Alles als Shell-Skript zusammenführen

#!/bin/bash

# Konfiguration setzen
export SYNO_USERNAME=adminUser
export SYNO_PASSWORD=adminPassword
export SYNO_SCHEME=https
export SYNO_HOSTNAME=dsm.familie-jonas.bayern
export SYNO_PORT=5001
export SYNO_CREATE=1

export KAS_Login=<ACCOUNTID>
export KAS_Authdata=<PLAINTEXTPASSWORD>
export KAS_Authtype=plain

export PUSHOVER_TOKEN=your_token
export PUSHOVER_USER=your_user_key

# Zertifikat ausstellen + deployen
acme.sh --issue -d ldap.familie-jonas.bayern --dns dns_kas --keylength 2048 --server letsencrypt --force
acme.sh --deploy -d ldap.familie-jonas.bayern --deploy-hook synology_dsm

📁 Dieses Skript kann auch über den DSM-Aufgabenplaner regelmäßig ausgeführt werden – alternativ zur Docker-internen Automatik.