HUB
Sign inSign up

midpointdev/credoid

By midpointdev

•Updated 4 days ago

development build

Image
Security
1

10K+

midpointdev/credoid repository overview

⁠CredoID access control service

Latest development build of CredoID service docker image

⁠How to use this image

⁠Docker Compose with PostgreSQL database
services:
  credoid:
    container_name: "credoid"
    image: "midpointdev/credoid:latest"
    ports:
        # exposed ports
        - "8090:8090" # api
        - "4070:4070" # hid
        - "3002:3002" # aero
        - "3001:3001" # mrc
        - "58032:58032" # mobile
        - "5500:5500" # grpc
        - "51212:51212" # suprema device connections
        - "51213:51213" # suprema secure (TLS) device connections
    # uncomment for macos
    #network_mode: "host"
    environment:
        TZ: "America/New_York" # site timezone (IANA name), see "Environment Variables"
        ConnectionString: "Server=db;Database=CredoID;User Id=postgres;Password=CredoIDPassword1"
        ScpSettings__DisableAeroDriver: false
        ScpSettings__DisableMercuryDriver: true
        TanlockSettings__DisableSsl: true
        Serilog__MinimumLevel: Information
        SupremaSettings__DisableGSdkService: true # set to false when Suprema devices are used
        LicensingSettings__LicenseKey: "YOUR_LICENSE_KEY"
        # uncomment for macos
        #DOTNET_EnableWriteXorExecute: 0 
    depends_on:
        - db
    volumes:
      - /usr/share/Midpoint-Security:/usr/share/Midpoint-Security
  db:
    container_name: "database"
    image: "postgres:latest"
    environment:
      POSTGRES_PASSWORD: "CredoIDPassword1"
      PGDATA: "/var/lib/postgresql/data/pgdata"
    volumes:
      - type: volume
        source: data
        target: /var/lib/postgresql/data    
volumes:
  data:

NOTE: The examples above use the latest tag for simplicity. Be aware of the implications of leaving it as latest instead of pinning a specific version:

  • Non-reproducible deployments — latest points to whatever was most recently published, so two installations (or a reinstall later) may run different versions without any config change.
  • Unexpected upgrades — a docker pull / docker compose pull silently upgrades the service, potentially introducing breaking changes, database schema migrations, or new bugs.
  • Harder rollbacks and support — without a pinned tag it is difficult to know which version is actually running or to roll back to a known-good state.

For production environments, it is highly advised to use Docker images with a "-stable" suffix tag and an explicitly set version (e.g., midpointdev/credoid:4.24.76-stable), and the same applies to the database image (e.g., postgres:18.1).

⁠Docker run (external database)
⁠Linux/Windows
docker run --name credoid --add-host=host.docker.internal:host-gateway -p 8090:8090 -p 4070:4070 -p 3001:3001 -p 3002:3002 -p 51212:51212 -p 51213:51213 -v /usr/share/Midpoint-Security:/usr/share/Midpoint-Security -e ConnectionString="Server=host.docker.internal;Database=credoid;User ID=postgres;Password=strong#Password" -e TZ="America/New_York" -e LicensingSettings__LicenseKey="YOUR_LICENSE_KEY" -e Serilog__MinimumLevel="Information" -e ScpSettings__DisableAeroDriver="false" -e ScpSettings__DisableMercuryDriver="true" midpointdev/credoid:latest
⁠MacOS
docker run --name credoid --net=host -p 8090:8090 -p 4070:4070 -p 3001:3001 -p 3002:3002 -p 51212:51212 -p 51213:51213 -v /usr/share/Midpoint-Security:/usr/share/Midpoint-Security -e ConnectionString="Server=host.docker.internal;Database=credoid;User ID=postgres;Password=strong#Password" -e TZ="America/New_York" -e LicensingSettings__LicenseKey="YOUR_LICENSE_KEY" -e Serilog__MinimumLevel="Information" -e ScpSettings__DisableAeroDriver="false" -e ScpSettings__DisableMercuryDriver="true" -e DOTNET_EnableWriteXorExecute=0 midpointdev/credoid:latest

⁠Persistent data and backup

CredoID keeps its data in two places. Both must survive container recreation and both must be backed up together:

  1. PostgreSQL database (the data volume in the compose example, or your external database).
  2. Shared folder /usr/share/Midpoint-Security inside the container. Mount it from the host exactly as in the compose example: /usr/share/Midpoint-Security:/usr/share/Midpoint-Security.

Contents of the shared folder:

Path (inside /usr/share/Midpoint-Security)What it is
CredoID-Service/saltPassword salt (only present on installations migrated from Windows). Must stay with its database, otherwise existing passwords stop working.
CredoID-Service/config*.jsonService configuration (created on first start)
CredoID-Service/config.licensing.jsonLicensing settings, including the license server URL
CredoID-Service/*.licActivated license
CredoID-Service/Config/KeysData protection keys. They encrypt two-factor authentication secrets; if lost, users with 2FA cannot log in until 2FA is reset.
CredoID-Service/FilesUploaded files: maps, images, card designs, sounds, user photos
BackupBackups created by CredoID

Logs are written to /var/log/Midpoint-Security/CredoID-Service. Mount it too if you want logs to survive container recreation, e.g. /var/log/Midpoint-Security:/var/log/Midpoint-Security.

NOTE: the salt file is created only by the Windows installer. If it is missing, CredoID silently uses a built-in default salt, so passwords stored with the original salt no longer verify. Always keep salt with its database: back them up together and restore them together.

⁠Backup

Back up the database (e.g. pg_dump) and the whole shared folder at the same time. A database backup restored without its matching salt file leaves every operator password unusable.

⁠Ports

Below is a list of ports that need to be open for specified access control devices to connect:

  • HID VertX: 4070 TCP
  • HID Aero: 3002 TCP
  • Mercury: 3001 TCP
  • Suprema: 51212 TCP (device connections to the built-in Suprema gateway)
  • Suprema secure: 51213 TCP (device connections over TLS, used when secure communication is enabled on the device)
  • CredoID web client: 8090 TCP
  • CredoID Mobile application: 58032 TCP
  • ASB Security: 20002, 20005 TCP

⁠Environment Variables

⁠ConnectionString (mandatory)

This environment variable sets connection string for postgre database i.e. Server=host.docker.internal;Database=credoid;User ID=postgres;Password=password

⁠LicensingSettings__LicenseKey (mandatory)

Contact sales at [email protected]⁠ to get your key. Key consists of 24 alphanumeric characters only i.e. 643DC7E8B766B52827D3B310

⁠TZ (mandatory)

Timezone of the site, as an IANA name, e.g. America/New_York, Europe/London, Europe/Vilnius (list⁠). CredoID stores event times, schedules, holidays and report periods in local time, so this must match the site's real timezone. If it is not set, the container uses Europe/Vilnius. When migrating from Windows, use the zone that matches the server's previous Windows timezone setting (e.g. "Eastern Standard Time" → America/New_York), otherwise new events will be shifted against migrated data. Stored times are not converted when TZ changes: existing records keep their old local times and only new ones use the new zone. Set it correctly before first start.

⁠ScpSettings__DisableAeroDriver (optional)

Disables the HID Aero device driver.

NOTE: the Aero and Mercury drivers cannot run at the same time. Enable only one of them: set this to false and ScpSettings__DisableMercuryDriver to true for Aero, or the other way round for Mercury.

⁠ScpSettings__DisableMercuryDriver (optional)

Disables the Mercury device driver.

NOTE: only one of the Aero and Mercury drivers can be enabled (see ScpSettings__DisableAeroDriver).

⁠SupremaSettings__DisableGSdkService (optional)

Default false. When true, the built-in Suprema gateway (G-SDK) is not started and Suprema devices cannot connect. Set it to true on sites without Suprema devices. The gateway's internal gRPC port (4000) listens only inside the container and must not be published.

⁠Migrating from Windows

  1. Stop the CredoID service on Windows. Never run the Windows and Docker installations against the same panels at the same time: controllers connect to one host only, and both instances would try to use the same license.
  2. Back up the Windows database (pg_dump) and restore it into the PostgreSQL instance used by Docker. Use the same CredoID version or newer in Docker; database upgrades run automatically on first start.
  3. Copy these files from C:\ProgramData\Midpoint-Security\CredoID Service\ to /usr/share/Midpoint-Security/CredoID-Service/ on the Docker host (on Linux the folder name has a dash instead of a space):
    • salt (required, otherwise existing passwords stop working)
    • Files folder (maps, images, card designs, user photos)
    • Config\Keys folder (needed if operators use two-factor authentication)
  4. Do not copy the Windows config*.json or *.lic files. Configure the container with environment variables and config.licensing.json instead (see Environment Variables).
  5. Licensing: Docker installations use volume licensing. Ask Midpoint for a volume license ID for each site before starting the container, set it in LicensingSettings__LicenseKey, and put your volume license server URL in config.licensing.json (the LicensingSettings__ServerUrls__0 environment variable is overridden by that file):
    {
      "LicensingSettings": {
        "IsVolumeLicensing": true,
        "ServerUrls": [ "https://<your-volume-license-server>" ]
      }
    }
    
    Every site needs its own ID. Two sites with the same ID will conflict.
  6. Set TZ to the timezone the Windows server used, e.g. Windows "Eastern Standard Time" → TZ=America/New_York. A wrong timezone shifts new events against migrated data.
  7. Publish the ports for the device families the site uses (see Ports) and disable unused drivers (see Environment Variables).
  8. If the Docker host has a different IP address than the Windows server, update the host address on the controllers.
  9. Start the container. Check that operators can log in, controllers come online and access events arrive.
  10. Keep the Windows backup until the site has run correctly for a while; then it can be removed.

Tag summary

Content type

Image

Digest

sha256:cba2790ee…

Size

865.1 MB

Last updated

4 days ago

docker pull midpointdev/credoid:4.26.128-stable