panel-hardening

Audits and hardens a 3x-ui proxy panel through scoped API tokens, credential rotation, fail2ban, and backups.

5|3|Updated Apr 11, 2026
One-click install
npx skills add https://github.com/pyworkload/3x-ui-mcp --skill panel-hardening-pyworkload
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: panel-hardening
Source: https://github.com/pyworkload/3x-ui-mcp/tree/main/skills/panel-hardening
Command: npx skills add https://github.com/pyworkload/3x-ui-mcp --skill panel-hardening-pyworkload

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? A default 3x-ui panel is exposed to internet-wide scanners, relies on an all-powerful admin password, and may silently fail to enforce IP limits or backups. This Skill walks through a structured audit-and-harden sequence so the panel, its API tokens, and its credentials are secured without locking yourself out. ## Core Features & Use Cases - Security audit: Reads current settings, API tokens, fail2ban status, and update info to establish a baseline before changing anything. - Token-based authentication: Replaces admin password auth with scoped, revocable API tokens, and prunes unrecognized tokens safely by disabling before deleting. - Credential rotation and lockout prevention: Rotates admin credentials while keeping the MCP server's own access intact. - Enforcement verification: Confirms fail2ban is actually installed so per-client IP limits are enforced, not just recorded. - Backups and safe updates: Tests the Telegram backup bot, takes backups before updates or bulk deletions, and verifies panel updates after restart. - Use Case: Before handing panel access to a contractor, mint a scoped, expiring API token, disable stale tokens, verify fail2ban enforcement, and take a Telegram backup. ## Quick Start Ask the agent to audit and harden my 3x-ui panel, starting with current settings and API tokens, then move authentication to a scoped token and take a backup before any changes.

Frequently Asked Questions about panel-hardening

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I secure a 3x-ui panel from internet scanners?▼

Change the default listening port and set a non-empty base path in the panel UI, since default configurations are found by internet-wide scanners within hours. If you change the base path, update the MCP server's XUI_BASE_PATH to match or every subsequent API call returns 404.

How do I replace the 3x-ui admin password with an API token?▼

Call create_api_token with a scope such as admin, capture the plaintext from that one response since the panel stores only a SHA-256 hash, then set it as XUI_API_TOKEN and remove XUI_USERNAME and XUI_PASSWORD. Tokens can be revoked individually without touching the admin credentials.

Why are 3x-ui per-client IP limits not being enforced?▼

The panel records IP usage but enforces nothing unless fail2ban is installed on the host. Check get_fail2ban_status; without fail2ban, limitIp values are silently ignored, and with it, exceeding the limit bans the source address.

What panel version is required for scoped API tokens in 3x-ui?▼

Scoped API tokens require panel v3.7.0 or later, while basic token and certificate helper features need v3.5.0 or later. Older versions lack the token management routes this workflow depends on.

How do I safely delete depleted or orphan clients in 3x-ui?▼

Enumerate targets first with list_clients_paged and a filter, show the list, then delete. Both delete_depleted_clients and delete_orphan_clients are destructive and panel-wide with no undo or confirmation step, so take a backup beforehand.