feat(setup): allow declaring a server setup token through env variable #489

Closed
opened 2026-04-05 17:12:53 +02:00 by MrUnknownDE · 0 comments
Owner

Originally created by @water-sucks on 12/15/2025

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.
*Originally created by @water-sucks on 12/15/2025* ## 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.
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github/pangolin#489