Skip to content

docs(docker): keep the premium device stable - #155

Merged
kelsos merged 1 commit into
rotki:mainfrom
kelsos:docs/docker-premium-device-limits
Nov 10, 2026
Merged

kelsos merged 1 commit into
rotki:mainfrom
kelsos:docs/docker-premium-device-limits

Conversation

@kelsos

@kelsos kelsos commented Nov 4, 2026

Copy link
Copy Markdown
Member

Refs rotki/rotki#13513

What

Adds a "Premium and device limits" section to the Docker page and a pointer to it from the device management page.

Why

The issue reports containers using up the premium device limit. The image has no machine ID, so rotki falls back to a container-based identifier (extended_get_machine_id in rotkehlchen/premium/premium.py):

  • Docker and Podman: the container ID
  • Kubernetes: the pod hostname

Each recreated container or rescheduled pod registers a new device. rotki already swaps the old device out when the new container runs a newer version, but recreating on the same version (--rm, compose down/up, a config change, any Deployment rollout) adds one.

The issue suggests a fixed hostname. That works on Kubernetes but has no effect on Docker, where the hostname is not part of the identifier.

The section covers

  • Docker and Podman: mount the host's /etc/machine-id read-only. py-machineid reads it before any container fallback, so the ID stays the same across recreations. Linux hosts only.
  • Kubernetes: set spec.hostname in the pod template, or use a single-replica StatefulSet.
  • Removing stale device entries.

Tested

  • py-machineid==0.8.0 (the pinned version) in fresh containers: without the mount the ID changes on every Docker run and is not found under rootless Podman. With it, both runtimes return the host's ID on every run.
  • rotki/rotki:latest (1.44.2) sees the mounted file unchanged.
  • kind cluster, running rotki's ID functions copied from develop: a plain Deployment got a new ID after a pod delete and after a rollout restart. A Deployment with hostname: rotki, and a StatefulSet, kept theirs.

Not tested: a real premium login, since the premium URL is fixed to rotki.com.

Not covered

The issue's second item, linking device management from the "Device limit exceeded" error, is app or server work. The app already links it on account creation and on the premium API keys page when the server message carries the _DEVICE_LIMIT_LINK_ placeholder. That's why this PR uses Refs and does not close the issue.

Containers have no machine ID, so rotki identifies the device by the
container ID (Docker, Podman) or the pod hostname (Kubernetes). Both
change when the container is recreated or the pod rescheduled, and each
change registers a new premium device until the limit is reached.

Document mounting the host's /etc/machine-id for Docker and Podman,
pinning spec.hostname (or using a StatefulSet) for Kubernetes, and
removing stale device entries. Point to it from the device page.
@kelsos
kelsos merged commit a893885 into rotki:main Nov 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants