[PR #998] [MERGED] fix(homarr): use named volume for /appdata and 64-char hex encryption key #16306

Closed
opened 2026-07-14 23:18:41 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Dokploy/templates/pull/998
Author: @Siumauricio
Created: 7/14/2026
Status: Merged
Merged: 7/14/2026
Merged by: @Siumauricio

Base: canaryHead: fix/homarr-volumes


📝 Commits (1)

  • c6a0b1b fix(homarr): use named volume for /appdata and hex encryption key

📊 Changes

2 files changed (+5 additions, -2 deletions)

View changed files

📝 blueprints/homarr/docker-compose.yml (+4 -1)
📝 blueprints/homarr/template.toml (+1 -1)

📄 Description

Problem

As reported in #738, the Homarr template mounts its data with a relative bind mount:

volumes:
  - ../homarr/appdata:/appdata

Bind mounts like this can't be backed up with Dokploy volume backups and depend on the compose file location on disk.

Additionally, SECRET_ENCRYPTION_KEY was generated with ${password:64}. Homarr requires a 64-character hex string (equivalent to openssl rand -hex 32, see the official install docs), but Dokploy's password helper emits lowercase alphanumeric characters including g-z, which are not valid hex.

Fix

  • Use a named volume, as suggested in the issue: homarr_appdata:/appdata (declared in a top-level volumes: section).
  • Generate SECRET_ENCRYPTION_KEY with ${hash:64}, which produces exactly 64 hex characters (randomBytes().toString("hex")).

Evidence

Deployed the updated template on a Dokploy instance: deploy finished in 21s, container running, HTTP 200 on the generated domain, and the generated SECRET_ENCRYPTION_KEY verified as a valid 64-character hex string.

Note for existing installs

Existing deployments of this template keep their data in the old bind-mount directory (../homarr/appdata inside the compose folder). After updating, they will start with a fresh named volume and need to copy their old appdata contents into it manually.

Closes #738

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Dokploy/templates/pull/998 **Author:** [@Siumauricio](https://github.com/Siumauricio) **Created:** 7/14/2026 **Status:** ✅ Merged **Merged:** 7/14/2026 **Merged by:** [@Siumauricio](https://github.com/Siumauricio) **Base:** `canary` ← **Head:** `fix/homarr-volumes` --- ### 📝 Commits (1) - [`c6a0b1b`](https://github.com/Dokploy/templates/commit/c6a0b1b1b5d50c21c4b394d4f8d8ab941ae58a12) fix(homarr): use named volume for /appdata and hex encryption key ### 📊 Changes **2 files changed** (+5 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `blueprints/homarr/docker-compose.yml` (+4 -1) 📝 `blueprints/homarr/template.toml` (+1 -1) </details> ### 📄 Description ## Problem As reported in #738, the Homarr template mounts its data with a relative bind mount: ```yaml volumes: - ../homarr/appdata:/appdata ``` Bind mounts like this can't be backed up with Dokploy volume backups and depend on the compose file location on disk. Additionally, `SECRET_ENCRYPTION_KEY` was generated with `${password:64}`. Homarr requires a **64-character hex string** (equivalent to `openssl rand -hex 32`, see the [official install docs](https://homarr.dev/docs/getting-started/installation/docker)), but Dokploy's `password` helper emits lowercase alphanumeric characters including `g-z`, which are not valid hex. ## Fix - Use a named volume, as suggested in the issue: `homarr_appdata:/appdata` (declared in a top-level `volumes:` section). - Generate `SECRET_ENCRYPTION_KEY` with `${hash:64}`, which produces exactly 64 hex characters (`randomBytes().toString("hex")`). ## Evidence Deployed the updated template on a Dokploy instance: deploy finished in 21s, container running, HTTP 200 on the generated domain, and the generated `SECRET_ENCRYPTION_KEY` verified as a valid 64-character hex string. ## Note for existing installs Existing deployments of this template keep their data in the old bind-mount directory (`../homarr/appdata` inside the compose folder). After updating, they will start with a fresh named volume and need to copy their old `appdata` contents into it manually. Closes #738 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-07-14 23:18:41 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/templates#16306