Skip to content

Add cron-job api-key env variable to homarr script #5204

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Meierschlumpf
Copy link

✍️ Description

Adds env variable CRON_JOB_API_KEY that will be used from one of the upcoming homarr releases as key for communication between backend & background tasks api

🔗 Related PR / Issue

Link: homarr-labs/homarr#3408

✅ Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.

I don't think I can test the script as I myself do not have any proxmox installation. I'll leave the PR as draft until the feature has been reviewed on our side. I'll let you know early enough, so that we don't release it without this being merged yet (and cause starting issues for proxmox user)

@CrazyWolf13
Copy link
Member

Thanks @Meierschlumpf
For this proactive PR, appreciate it!
So this var will be regenerated on each homarr-start, same as AUTH_SECRET, is that expected?

I've added the line at two more places, where we fix old installs, during update

@Meierschlumpf
Copy link
Author

Okay thanks, yes the key is just used internally (between two processes), so regeneration is expected

@CrazyWolf13
Copy link
Member

perfect, is ready from our side,
Technically we could already merge this, if it's ready from your side.

@CrazyWolf13 CrazyWolf13 marked this pull request as ready for review June 17, 2025 12:36
@CrazyWolf13 CrazyWolf13 requested a review from a team as a code owner June 17, 2025 12:36
@Meierschlumpf
Copy link
Author

I let you know once I got the first iteration of feedback on our side, not sure if someone of the other maintainers has a problem with the way I've implemented this logic. Keep you updated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature update script A change that updates a script
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants