XUI.ONE Management: Comprehensive Guide for Service Commands, License Issues, and More
Introduction
If you're managing XUI.ONE, a powerful tool for streaming and server management, it's crucial to understand how to handle various administrative tasks. This guide covers everything from service commands to troubleshooting license issues, managing MySQL access, handling load balancers, migrating databases, and resetting admin users. Follow these steps to ensure smooth operation and efficient management of your XUI.ONE setup.
Service Commands for XUI.ONE
Managing your XUI.ONE service is straightforward with the right commands. You can start, stop, reload, or restart the service using:
service xuione <start|stop|reload|restart>
Example Usage:
service xuione start
These commands help you control the service status and perform necessary operations.
License Management
Generating a License After Installation
To generate a license after a fresh installation, visit the setup page at:
http://yoursite.com:8080/accesscode
Each installation has a unique access code. If you encounter issues with the access code, follow the steps below.
Reissuing a License
If you've already installed XUI.ONE and need to reissue your license (especially if you're using a load balancer), do the following:
-
Reissue the License:
- Log in to the XUI Billing Panel and reissue your license (Main server only; load balancers can skip this step).
-
Update the License File:
- Ensure your license number is correctly listed in
/home/xui/config/config.ini
. - Run these commands via SSH:
bash
rm /home/xui/config/license sudo -u xui /home/xui/bin/php/bin/php /home/xui/crons/license.php
- This will output information about your license and its validity.
- Ensure your license number is correctly listed in
-
Further Assistance:
- If issues persist, contact support or consult the forum.
Access Code Issues
No Access Code Available
If you can’t access the admin interface due to a missing or incorrect access code, check for existing codes in /home/xui/bin/nginx/conf/codes/
. If .conf
files are available, use one as your access code.
If no suitable codes are available, follow these steps:
-
Create a New Access Code:
- Copy the template to
admin.conf
and make the following changes:- Replace
#CODE#
withadmin
- Replace
#TYPE#
withadmin
- Delete
#WHITELIST#
- Replace
- Insert the following into MySQL:
sql
USE `xui`; INSERT INTO `access_codes`(`code`, `type`, `enabled`, `groups`) VALUES ('admin', 0, 1, '[1]');
- Copy the template to
-
Reload XUI.ONE:
- Run:
service xuione reload
You should then be able to access the admin panel via:
bashhttp://yoursite.com:8080/admin
- Run:
Login Error: "You do not have access"
This error indicates that the access code you're using is associated with a group your user is not in. Ensure you're using the correct user and access code. If you’re locked out, follow the steps for creating a new access code.
Troubleshooting MySQL Access Denied
If you receive an "access denied" error on the main server:
-
Update Credentials:
- Edit
/home/xui/config/config.ini
to match the MySQL credentials provided during installation:ini[Encrypted] username = "username" password = "password"
- Edit
-
Restart the Panel:
- Restart the XUI.ONE panel to apply changes.
For load balancers, ensure the main panel MySQL is functioning and consider reinstalling the load balancer. Use Management -> Tools -> Quick Tools -> General to regenerate MySQL authentication if needed.
Managing Load Balancers
If your load balancer is offline:
-
Restart the Load Balancer:
- Run:
bash
/etc/init.d/xuione stop /etc/init.d/xuione start
- This will provide information about any issues preventing the load balancer from going online.
- Run:
-
Diagnose Issues:
- Check for MySQL, license, or library issues based on the output.
Database Migration
To migrate your old database to XUI.ONE:
-
Restore Migration SQL File:
- Use:
bash
mysql xui_migrate < database.sql
- Use:
-
Migrate via Web Interface or CLI:
- Visit:
http://yoursite.com:8080/accesscode/setup
- Alternatively, use SSH:
bash
/home/xui/bin/php/bin/php /home/xui/includes/cli/migrate.php
- Visit:
-
Restore a Blank Database if Needed:
- If migration fails, restore a blank database:
bash
mysql xui < /home/xui/bin/install/database.sql
- If migration fails, restore a blank database:
Resetting the Admin User
To reset the admin user:
-
Run SQL Command:
sqlUSE `xui`; REPLACE INTO `users`(`id`, `username`, `password`, `member_group_id`, `status`, `owner_id`, `date_registered`) VALUES(1, 'admin', '$6$rounds=20000$xui$eQfRsD2gsIUhoY5RnnYN82qiB5VeZTcHICQrFxXpa98J2R1454b6lzVHVjiJ.NP0gi0X3K7NXVgxeR1VhVhg61', 1, 1, 0, UNIX_TIMESTAMP());
Make sure to change the username and password afterwards.
Conclusion
With these instructions, you should be able to manage your XUI.ONE installation effectively. Whether it's dealing with service commands, handling license issues, or troubleshooting access problems, this guide provides you with the essential steps to keep your system running smoothly.