XUI.ONE is the most famous paid IPTV panel provided by GTA and team with great features and improved security. The panel kept available with 2 of the official versions and a beta version all the time. The panel can be installed both on Ubuntu 20 and Ubuntu 18, but LBs seems to be done over Ubuntu 20 only.
Basics for XUI.ONE
service xuione <start|stop|reload|restart>
service xuione start
After a new installation, the license will be generated from the setup page. This can be access via: http://yoursite.com:8080/accesscode
Each installation has a unique access code, if yours for some reason doesn’t work, try the Access Code instructions below.
If you’ve already installed and progressed past the setup page, but need to regenerate the license, or on a load balancer for example, try the below instructions:
- Visit the XUI Billing Panel, log in and Reissue your license (for Main server only). Load balancers can skip this step.
- Ensure your license number is in /home/xui/config/config.ini
- Run the following commands on the server via SSH:
sudo -u xui /home/xui/bin/php/bin/php /home/xui/crons/license.php
The license.php will output information about your license and whether it is valid or not. If this doesn’t work, and your license is definitely in the Reissued state, then you’ll have to contact support or post on the forum.
No Access Code
If you can’t access the admin interface, as you don’t have an access code or the access code you have doesn’t work, check
/home/xui/bin/nginx/conf/codes/ to ensure there is a code that ends with .conf. If there is, try using this as your access code.
If there are no codes that end with .conf, or the ones that do are not for an admin interface login, then copy
admin.conf and make the following changes:
- Enter mysql via your preferred method and run: USE
`xui`; INSERT INTO `access_codes`( `code`, `type`, `enabled`, `groups`) VALUES ('admin', 0, 1, '');
- Run the following command via SSH:
service xuione reload
- You should now be able to access the admin panel via:
Login Error: “You do not have access”
This error relates to the access code specifically, it means the access code you’re using is for a group that your user is not in. Make sure you’re using the right user, or the right access code. If you can’t access the panel because of this then use the instructions from the No Access Code section to create a new access code for admins.
MySQL Access Denied
If you’re getting access denied on the main server, you’re going to need to edit /home/xui/config/config.ini and change the username and password in the Encrypted section to match the credentials you were given when installing XUI, like this:
username = "username"
password = "password"
After saving, you can restart the panel and see if this has worked.
For load balancers, you can either follow the above steps or ensure that the main panel mysql is working then reinstall the laod balancer. There is also an option in Management -> Tools -> Quick Tools -> General that will regenerate mysql authentication for your load balancers. If this doesn’t fix the issue, the XUI mysql user doesn’t have permission to authorise external users. In which case you will have to ensure that the user does by granting the privilege, or allowing the load balancer IP manually. Either worst-case option here is an advanced procedure and may require external help.
Load Balancer Offline
Access the load balancer via SSH and run
/etc/init.d/xuione stop then
/etc/init.d/xuione start, this will tell you some information about what is wrong with the installation that prevents it from going online, it could be a mysql issue, it could be a license issue, or it could be something relating to libraries not being installed. Follow the trail.
In order to migrate your old database to XUI, a separate database has been created called xui_migrate which XUI has full access to. You will need to restore your migration SQL file to this database in order for migration to work.
You can restore the SQL file using the following shell command:
mysql xui_migrate < database.sql
You can migrate at any time by visiting:
You can also manually migrate via SSH using the following command:
If a failed migration causes issues with logging in, you can restore a blank database using the following command:
mysql xui < /home/xui/bin/install/database.sql
Reset Admin User
If you need to reset the admin user for any reason, you can run the following via mysql to restore user ID 1 to the username admin and password admin. Please change the username and password afterwards.
USE `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());
XUI.ONE Admin API – Placeholder
You can then access the API via:
As a developer, use this as your API endpoint and set the
"action" parameter to one of the following API commands:
LOGS & EVENT API
ACCESS CODE API
TRANSCODING PROFILE API
SUB RESELLER API
WATCH FOLDERS API
BLOCKED ISP & IP API
SETTINGS, STATS AND OTHER API
Upcoming API information will help identify what each function does, and what parameters can be submitted.
For now, if you want to poke around I suggest using the Admin Interface with Developer Tools enabled and log any traffic to post.php. The parameters sent there will be the same parameters you can send to the API function it relates to.
For example if you go to Streams and add a stream, you can log post.php and submit the same request to the create_stream function to replicate it.
To edit a stream, pass the id with it too.
Some of the functions are server specific, so send server_id with them, for example:
get_server_stats, get_fpm_status, get_rtmp_stats, get_free_space, get_pids, get_certificate_info, reload_nginx, clear_temp, clear_streams, update_blacklist, get_directory
Line Example – Editing line #4 to change password to helloworld and select bouquets 1 and 2:
HowTo push a RTMP stream to XUI.ONE
1.1 Go to the Server Settings >> Manage Servers
1.2 Open the Server Settings under Edit Server
1.3 Open the Tap “Advanced” and check out the RTMP Port
1.4 Go to Management >> Acccess Control >> RTMP IPs
1.5 We have to add here 2 IPs (One for Device where RTMP stream comes from and the other one must be the Local IP 127.0.0.1)
In my case will use OBS for the RTMP stream for Demo purposes, so i will add my public IP with PUSH permissions (I am pushing the stream to the server)
The addtional Local IP 127.0.0.1 with pull permissions is required to pull my incoming RTMP stream to the Panel it self as a Channel.
1.6 Go to Content >> Streams >> Add Stream
1.7 Add your decided Stream Name (in my case RTMP), select your decided Cateory and Bouguet
1.8 Add the source stream URL, like: rtmp://localhost:8880/live/mychannel?password=h2WVR4j2SSgXZ46t
> mychannel (this is the stream key and can be freely chosen)
> ?password=h2WVR4j2SSgXZ46t (The RTMP access password from step 1.5)
1.9 Under Servers Tap, select the Server(s) (Main or LB) where you want to stream from this Channel and save the Channel
2. Push your RTMP stream from your PC or Encoder to the Panel
2.1 Open OBS Settings >> Stream and the Server IP & Port and RTMP credentials like:
Stream Key: [CHANNELNAME]?password=[RTMPPASSWORD]
In my example it looks like:
2.2 Push the RTMP stream to the Server (XUI.ONE Panel) with clicking the Start Stream button. If you succesfull conected you will see on the rigt buttom the FPS and Bitrate.
2.3 Go back to the Panel >> Content >> Manage Streams and check the Channel you added at step 1.6 – 1.9
If the Channel Uptime has been started, you can be happy !
HowTo add Admin API in XUI.ONE
1. Open the Panel, go to MANAGEMENT >> ACCESS CONTROL >> ACCESS CODES
2. Add Access Code, select from ACCESS TYPE: Admin API and click next
3. Select as Group “Administrators”
4. If you want restrict the API to a cretain IP, add the IP and save it
5. To get the Admin API Key, open the Admin Profile