[PR #5678] [MERGED] Env vars example file update #5956

Closed
opened 2026-11-02 04:05:18 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/MHSanaei/3x-ui/pull/5678
Author: @nebulosa2007
Created: 6/30/2026
Status: ✅ Merged
Merged: 7/2/2026
Merged by: @MHSanaei

Base: main ← Head: env-vars


📝 Commits (4)

📊 Changes

1 file changed (+172 additions, -14 deletions)

View changed files

📝 .env.example (+172 -14)

📄 Description

Summary

This PR updates and completely reorganizes the .env.example file to align with the latest project documentation. It includes all missing environment variables (such as memory tuning and the tunnel health monitor), structures them into logical sections, and ensures all variables are commented out (masked) by default.

Why

The previous .env.example was outdated and missing several critical configuration knobs that have been recently introduced. Having a complete, well-commented template prevents user confusion and makes setting up 3x-ui via Docker or systemd environment files much easier.

Type of change

  • Bug fix
  • New feature
  • Refactoring (no behavior change)
  • Documentation
  • Tests only
  • Build / CI / tooling
  • Other

Areas affected

  • Frontend (UI / panel pages)
  • Backend (API endpoints, login, settings)
  • Xray config generation
  • Subscription (share links / Clash / JSON)
  • Statistics / traffic counters
  • Database / migrations
  • Install / upgrade script
  • Docker image
  • Multi-node (sub-nodes)
  • Telegram bot

How was this tested?

  • Visually cross-referenced every variable, its description, and default value against the official 3x-ui documentation.
  • Verified that all variables are properly commented out using # and that the file format is valid for standard dotenv parsers.

Screenshots / recordings

N/A (Documentation changes only)

Breaking changes

None.

Checklist

  • I tested the change locally and confirmed the described behavior.
  • I added or updated tests for the new behavior (when applicable).
  • go build ./... and the test suite pass locally.
  • For frontend changes: npm run lint, npm run typecheck, and npm run build pass.
  • I updated the Wiki / README / API docs if user-facing behavior changed.
  • My commits follow the project's existing message style.
  • I have no unrelated changes mixed into this PR.

🔄 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/MHSanaei/3x-ui/pull/5678 **Author:** [@nebulosa2007](https://github.com/nebulosa2007) **Created:** 6/30/2026 **Status:** ✅ Merged **Merged:** 7/2/2026 **Merged by:** [@MHSanaei](https://github.com/MHSanaei) **Base:** `main` ← **Head:** `env-vars` --- ### 📝 Commits (4) - [`b391866`](https://github.com/MHSanaei/3x-ui/commit/b39186638b1c1f91bae6eb08283febcccd67ae92) Update .env.example - [`b9d92a3`](https://github.com/MHSanaei/3x-ui/commit/b9d92a332fa9eccfc02cb18e4fb4dc5e12a6fc72) Update .env.example - [`1cc7606`](https://github.com/MHSanaei/3x-ui/commit/1cc76063d60daa788d620aa1180fd501b7cde23e) Update .env.example - [`20dfa52`](https://github.com/MHSanaei/3x-ui/commit/20dfa52e9f87fbb3a883dca4506bf1fd26c43990) Update .env.example ### 📊 Changes **1 file changed** (+172 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `.env.example` (+172 -14) </details> ### 📄 Description ## Summary This PR updates and completely reorganizes the `.env.example` file to align with the latest project documentation. It includes all missing environment variables (such as memory tuning and the tunnel health monitor), structures them into logical sections, and ensures all variables are commented out (masked) by default. ## Why The previous `.env.example` was outdated and missing several critical configuration knobs that have been recently introduced. Having a complete, well-commented template prevents user confusion and makes setting up 3x-ui via Docker or systemd environment files much easier. ## Type of change - [ ] Bug fix - [ ] New feature - [x] Refactoring (no behavior change) - [x] Documentation - [ ] Tests only - [ ] Build / CI / tooling - [ ] Other ## Areas affected - [ ] Frontend (UI / panel pages) - [x] Backend (API endpoints, login, settings) - [ ] Xray config generation - [ ] Subscription (share links / Clash / JSON) - [ ] Statistics / traffic counters - [ ] Database / migrations - [ ] Install / upgrade script - [x] Docker image - [ ] Multi-node (sub-nodes) - [ ] Telegram bot ## How was this tested? - Visually cross-referenced every variable, its description, and default value against the official 3x-ui documentation. - Verified that all variables are properly commented out using `#` and that the file format is valid for standard dotenv parsers. ## Screenshots / recordings N/A (Documentation changes only) ## Breaking changes None. ## Checklist - [x] I tested the change locally and confirmed the described behavior. - [ ] I added or updated tests for the new behavior (when applicable). - [ ] `go build ./...` and the test suite pass locally. - [ ] For frontend changes: `npm run lint`, `npm run typecheck`, and `npm run build` pass. - [ ] I updated the Wiki / README / API docs if user-facing behavior changed. - [x] My commits follow the project's existing message style. - [x] I have no unrelated changes mixed into this PR. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 04:05:18 +07: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
MHSanaei/3x-ui#5956
No description provided.