Skip to content

License not working in dockerized Directus 12.0.2 #742

@stx-chris

Description

@stx-chris

Describe the Bug

When Directus is started in Docker and the license key entered under Settings -> License -> Add License, I am getting the following error:

{
  "service": "license",
  "reason": "Invalid URL",
  "stack": "DirectusError: Service \"license\" is unavailable. Invalid URL.\n    at handleLicenseError (file:///directus/node_modules/.pnpm/@directus+api@file+api_@opentelemetry+api@1.9.0_@opentelemetry+core@2.1.0_@opentelemetr_4fe57fc2f23b0f156ebf7487ebe3f888/node_modules/@directus/api/dist/license/utils/handle-license-error.js:34:8)\n    at LicenseManager.preview (file:///directus/node_modules/.pnpm/@directus+api@file+api_@opentelemetry+api@1.9.0_@opentelemetry+core@2.1.0_@opentelemetr_4fe57fc2f23b0f156ebf7487ebe3f888/node_modules/@directus/api/dist/license/manager.js:167:4)\n    at process.processTicksAndRejections (node:internal/process/task_queues:103:5)\n    at async file:///directus/node_modules/.pnpm/@directus+api@file+api_@opentelemetry+api@1.9.0_@opentelemetry+core@2.1.0_@opentelemetr_4fe57fc2f23b0f156ebf7487ebe3f888/node_modules/@directus/api/dist/controllers/license.js:71:18",
  "code": "SERVICE_UNAVAILABLE"
}

similar errors appear when providing the license key as LICENSE_KEY or LICENSE_TOKEN.
P.S. PUBLIC_URL set to a publicly accessible address.

To Reproduce

  1. Start Directus directly from Docker image directus/directus:12.0.2
  2. Login
  3. Enter license key
  4. See error: "Invalid license...." and the failed request in the Network tab

Directus Version

v12.0.2

Hosting Strategy

Self-Hosted (Docker Image)

Database

PostgreSQL 16

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions