[PR #2080] [MERGED] feat(setup): allow declaring a server setup token through env variable #33013

Closed
opened 2026-06-15 10:31:22 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/fosrl/pangolin/pull/2080
Author: @water-sucks
Created: 12/15/2025
Status: Merged
Merged: 12/16/2025
Merged by: @oschwartz10612

Base: devHead: server-setup-token-env-var


📝 Commits (1)

  • 474b9a6 feat(setup): allow declaring a server setup token through env variable

📊 Changes

1 file changed (+50 additions, -10 deletions)

View changed files

📝 server/setup/ensureSetupToken.ts (+50 -10)

📄 Description

Community Contribution License Agreement

By creating this pull request, I grant the project maintainers an unlimited,
perpetual license to use, modify, and redistribute these contributions under any terms they
choose, including both the AGPLv3 and the Fossorial Commercial license terms. I
represent that I have the right to grant this license for all contributed content.

Description

To facilitate integration testing/a more declarative configuration for Pangolin setups, this PR introduces the ability to manually specify a server setup token through an environment variable, PANGOLIN_SETUP_TOKEN.

How to test?

A few test cases exist:

  • If PANGOLIN_SETUP_TOKEN is unset, this should preserve previous token generation behavior.
  • Set PANGOLIN_SETUP_TOKEN on a fresh instance. This should insert a token into the DB with this provided value.
  • Set PANGOLIN_SETUP_TOKEN to an invalid value. This should cause the server to fail to start up.
  • Set PANGOLIN_SETUP_TOKEN when the a token has been generated already, but not used yet. The value, if valid, should replace the previously generated one.

🔄 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/fosrl/pangolin/pull/2080 **Author:** [@water-sucks](https://github.com/water-sucks) **Created:** 12/15/2025 **Status:** ✅ Merged **Merged:** 12/16/2025 **Merged by:** [@oschwartz10612](https://github.com/oschwartz10612) **Base:** `dev` ← **Head:** `server-setup-token-env-var` --- ### 📝 Commits (1) - [`474b9a6`](https://github.com/fosrl/pangolin/commit/474b9a685ddd86af4368bcc112b6fda4a67c1424) feat(setup): allow declaring a server setup token through env variable ### 📊 Changes **1 file changed** (+50 additions, -10 deletions) <details> <summary>View changed files</summary> 📝 `server/setup/ensureSetupToken.ts` (+50 -10) </details> ### 📄 Description ## Community Contribution License Agreement By creating this pull request, I grant the project maintainers an unlimited, perpetual license to use, modify, and redistribute these contributions under any terms they choose, including both the AGPLv3 and the Fossorial Commercial license terms. I represent that I have the right to grant this license for all contributed content. ## Description To facilitate integration testing/a more declarative configuration for Pangolin setups, this PR introduces the ability to manually specify a server setup token through an environment variable, `PANGOLIN_SETUP_TOKEN`. ## How to test? A few test cases exist: - If PANGOLIN_SETUP_TOKEN is unset, this should preserve previous token generation behavior. - Set PANGOLIN_SETUP_TOKEN on a fresh instance. This should insert a token into the DB with this provided value. - Set PANGOLIN_SETUP_TOKEN to an invalid value. This should cause the server to fail to start up. - Set PANGOLIN_SETUP_TOKEN when the a token has been generated already, but not used yet. The value, if valid, should replace the previously generated one. --- <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-06-15 10:31:22 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/pangolin#33013