Skip to content

Feature Request: Support environment variables for default user in Docker deployments #2169

Description

@xmha97

Description:
Currently Radicale requires manual configuration of authentication via a users file or config file. In Docker-based deployments, especially for quick self-hosted setups, it would be very useful to allow defining a default user through environment variables.

This would simplify initial setup and make Radicale more suitable for automated deployment environments (e.g. Docker Compose, Kubernetes, homelabs).

Proposed feature:
Support environment variables such as:

  • RADICALE_USER
  • RADICALE_PASSWORD (or RADICALE_PASS)

These variables could automatically generate or populate an htpasswd-compatible authentication backend on container startup.

Example usage in docker-compose:

environment:
  - RADICALE_USER=admin
  - RADICALE_PASSWORD=securepassword

Expected behavior:

  • On first startup, if authentication is enabled and no users file exists:

    • Automatically create htpasswd file with provided credentials
  • If users file already exists, environment variables are ignored (or optionally used only to append users)

Why this is useful:

  • Enables “one-command” setup for Radicale
  • Reduces need for manual config file + htpasswd setup
  • Improves usability in Docker-based self-hosting environments
  • Aligns with existing unofficial Docker images that already implement similar behavior

Alternative considered:

  • Using only config file + htpasswd (current approach)

    • Works, but not ideal for ephemeral containers or automated deployment

Additional context:
Some community Docker images already implement similar environment variables (e.g. RADICALE_USER, RADICALE_PASS), which shows demand for this feature.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions