Repository navigation
docs(docker): keep the premium device stable - #155
Merged
Merged
Conversation
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.
yabirgb
approved these changes
Nov 4, 2026
1 task
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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_idinrotkehlchen/premium/premium.py):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
/etc/machine-idread-only.py-machineidreads it before any container fallback, so the ID stays the same across recreations. Linux hosts only.spec.hostnamein the pod template, or use a single-replica StatefulSet.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.develop: a plain Deployment got a new ID after a pod delete and after a rollout restart. A Deployment withhostname: 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 usesRefsand does not close the issue.