[FEATURE] Generate 3xUI API Token automatically on first container start #20

Closed
opened 2026-07-07 21:39:42 +00:00 by PoweredDeveloper · 0 comments

The Backend communicates with the 3x-UI Panel using a persistent API Bearer token. Currently, this token must be generated manually after the first deployment, introducing an additional setup step and preventing fully automated infrastructure provisioning.

Describe the solution you'd like

Automatically generate a 3x-UI API token during the initial container startup and make it available for the Backend.

The implementation should include:

  • Detect whether the 3x-UI instance is being initialized for the first time.
  • Generate a persistent API token automatically after the panel has been initialized.
  • Expose the token for Backend configuration (e.g., via an environment file or another secure bootstrap mechanism).
  • Ensure the generation process is idempotent and does not replace an existing token.

Describe alternatives you've considered

The token can be generated manually through the 3x-UI administration panel after deployment. While this approach works, it requires manual intervention and makes fully automated deployments more difficult.

Additional context

The generated token will be used by the Backend to authenticate all requests to the 3x-UI API using the Authorization: Bearer <token> header.

Checklist

  • I have checked that this feature is not already requested.
  • I am willing to help implement it (optional).
## Is your feature request related to a problem? The Backend communicates with the 3x-UI Panel using a persistent API Bearer token. Currently, this token must be generated manually after the first deployment, introducing an additional setup step and preventing fully automated infrastructure provisioning. ## Describe the solution you'd like Automatically generate a 3x-UI API token during the initial container startup and make it available for the Backend. The implementation should include: - [x] Detect whether the 3x-UI instance is being initialized for the first time. - [x] Generate a persistent API token automatically after the panel has been initialized. - [x] Expose the token for Backend configuration (e.g., via an environment file or another secure bootstrap mechanism). - [x] Ensure the generation process is idempotent and does not replace an existing token. ## Describe alternatives you've considered The token can be generated manually through the 3x-UI administration panel after deployment. While this approach works, it requires manual intervention and makes fully automated deployments more difficult. ## Additional context The generated token will be used by the Backend to authenticate all requests to the 3x-UI API using the `Authorization: Bearer <token>` header. ## Checklist * [x] I have checked that this feature is not already requested. * [x] I am willing to help implement it (optional).
PoweredDeveloper changed reference from insfrastructure to backend-3xui-integration 2026-07-09 20:07:11 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
PoweredDeveloper/radix-vpn#20
No description provided.