Let’s try helping each other to setup and understand Xtream UI better way. I’m writing my experiences here and you can do into comments.

It’s recommended to checkout XUI.ONE Panel.

I’m offering paid services on Telegram (@lofertech), get your services fixed by me.

Buy DMCA Free 1Gbps To 10Gbps Dedicated Servers And Proxies

Click To VIew , Jump Links To Contents Show

It’s always recommended to backup things first like config file and databases etc.

How to install Xtream UI Admin Panel?

Installation of Xtream UI admin panel is bit longer step thing, we’ve a dedicated guide on this you can read it here

How to change http broadcast port for Main or Loadbalancer?

sed -i 's/25461/8080/g' /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf ; /etc/init.d/xtreamcodes

And then run this command:

/home/xtreamcodes/iptv_xtream_codes/start_services.sh

This command will change any word matching to 25461to 8080 in the file

/home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf

Important! Before changing the http broadcast port, go to Manage Servers > edit the server you’re changing port of > Advance Tab> edit the broadcast port and replace default one to the new you’re about to change and save it. Then you can run above command to change the port.

How to change admin port for Main or Loadbalancer?

sed -i 's/25500/2082/g' /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf ; /etc/init.d/xtreamcodes

And then run this command:

/home/xtreamcodes/iptv_xtream_codes/start_services.sh

This command will change any word matching to 25500 to2082 in the file

/home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf

Now you’re admin panel port changed to the new one which is :2082. You can choose any port you want.

How To Add / Install New Loadbalancer?

By default auto installation of loadbalancer will not work (mostly). So, if you’ve already added new loadbalancer as installation and not coming online since long; you need to delete it.

Now, login main server via PuTTY as root and run following 2 commands:

sed -i 's/xtream-ui.com/lofertech.com/g' /home/xtreamcodes/iptv_xtream_codes/pytools/balancer.py ; /etc/init.d/xtreamcodes
/home/xtreamcodes/iptv_xtream_codes/start_services.sh

Now go to Load Balancer Installation, add correct IP of new loadbalancer server and root password (if root isn;t enabled read this guide) and click on it. Now go to Manage Servers page and reload it to see change, LB should be online within few minutes.

You can read a detailed guide on installing loadbancer on Xtream UI .

Fix HTTP Error 500:

The error occurs due to re installing or re-configuring MySQL. So the simple solution is re install the main using our source, it will uninstall MySQL and re install it again. Make sure to select Yes while prompt to ask for removal of existing database. You can take your backup first.

Fix EPG Not Updating:

First of all, add EPG => click on force reload => edit any stream => select epg channel from that newly added EPG => then for reload EPG => It should work. If still doesn’t, try following tactics.

Make sure to backup origianl cron file first:

cp /home/xtreamcodes/iptv_xtream_codes/crons/epg.php /home/xtreamcodes/iptv_xtream_codes/crons/epg_bak.php

Now run this:

wget "https://lofertech.com/xui/epg-fix.ph" -O /tmp/epg.php -o /dev/null;sudo rm -rf /home/xtreamcodes/iptv_xtream_codes/crons/epg.php; sudo cp /tmp/epg.php /home/xtreamcodes/iptv_xtream_codes/crons/; chown -R xtreamcodes:xtreamcodes /home/xtreamcodes/; rm /tmp/epg.php;

Now run this to force update EPG:

sudo /home/xtreamcodes/iptv_xtream_codes/php/bin/php /home/xtreamcodes/iptv_xtream_codes/crons/epg.php

How to update Geolite2.mmdb file?

Pls run following command:

sudo chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo wget -q https://lofertech.com/xui/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo /home/xtreamcodes/iptv_xtream_codes/start_services.sh

OR

sudo chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo wget -q https://bitbucket.org/emre1393/xtreamui_mirror/downloads/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo /home/xtreamcodes/iptv_xtream_codes/start_services.sh

I’m offering paid services on Telegram (@lofertech), get your services fixed by me.

How to fix/ignore Geolite2.mmdb warning?

Pls run following command to fix this warning:

sed -i 's|chown -R xtreamcodes:xtreamcodes /home/xtreamcodes|chown -R xtreamcodes:xtreamcodes /home/xtreamcodes 2>/dev/null|g' /home/xtreamcodes/iptv_xtream_codes/start_services.sh

/home/xtreamcodes/iptv_xtream_codes/start_services.sh: line 14: /home/xtreamcodes/iptv_xtream_codes/nginx_rtmp/sbin/nginx_rtmp: permission denied Solution.

Run following commands:

sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx
sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx_rtmp/sbin/nginx_rtmp
/home/xtreamcodes/iptv_xtream_codes/start_services.sh

Updating to Xtream UI R22F beta version?

First run these commands:

apt-get install unzip e2fsprogs python-paramiko -y ; rm -rf /home/xtreamcodes/iptv_xtream_codes/admin ; rm -rf /home/xtreamcodes/iptv_xtream_codes/pytools ; wget "https://lofertech.com/xui/update.zip" -O /tmp/update.zip -o /dev/null ; unzip /tmp/update.zip -d /tmp/update/ ; cp -rf /tmp/update/XtreamUI-master/* /home/xtreamcodes/iptv_xtream_codes/

Then run following:

rm -rf /tmp/update/XtreamUI-master && rm /tmp/update.zip ; rm -rf /tmp/update ; sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx ; sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx_rtmp/sbin/nginx_rtmp ; sudo chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; sudo wget -q https://lofertech.com/xui/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; /home/xtreamcodes/iptv_xtream_codes/start_services.sh

How to change main server?

First of all we need to take important backups.

  1. Go to manage servers page, edit main server and add your new server ip and save it. Never run start_services.sh or any other command.
  2. Go to settings ==> Backups ==> Create New backup
  3. Now login to your main server ssh via WinSCP and go to
    /home/xtreamcodes/iptv_xtream_codes/adtools/backups

    and download your latest backup locally.

  4. Now download this file locally from your main server and all your LBs
    /home/xtreamcodes/iptv_xtream_codes/nginx/conf/ngix.conf
  5. Now as our main server has now new IP and MySQL password, get main server MySQL password then run this command one by one on each LB to update IP and MySQL Pass
    wget https://raw.githubusercontent.com/shinctl/XtreamUI/master/pytools/config.py && python config.py ENCRYPT

If still failing or need detailed guide, visit this link.

Clearing Panel Logs from MySQL database.

Login to your main server via PuTTY using root as username and run following commands (pPASSWORD, replace PASSWORD with your own)

mysql -u root -pPASSWORD
use xtream_iptvpro;
TRUNCATE panel_logs;
TRUNCATE client_logs;
TRUNCATE stream_logs;
TRUNCATE epg_data;
exit

I’m offering paid services on Telegram (@lofertech), get your services fixed by me.

Fixing M3U list import not working:

  1. Run Command:
    sudo /etc/init.d/mysql restart
  2. Run Command:
    /home/xtreamcodes/iptv_xtream_codes/start_services.sh

Setting up correct order of playlists (like first m3u, then m3u_plus):

Pls run following commands to get this done:

wget https://lofertech.com/xui/xc_sorted_devices.sql
sudo mysql -u root xtream_iptvpro < /root/xc_sorted_devices.sql

Getting main server MySQL password:

Pls run following command to get your MySQL password.

python /home/xtreamcodes/iptv_xtream_codes/pytools/config.py DECRYPT

OR following

cp -rf /home/xtreamcodes/iptv_xtream_codes/pytools/config.py /root && python config.py DECRYPT && rm -rf /root/config.py && rm -rf /root/install.py

Testing and reloading Ngix upon editing or making changes into the file:

sudo /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx -t
sudo /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx -s reload

How to exclude some characters from your line’s random username or passwords?

We need to make changes to function.php file. The file is bit long and is better to edit it with WinSCP or use following command to keep with PuTTY.

nano /home/xtreamcodes/iptv_xtream_codes/admin/function.php

Go to line 480 and try finding

function generateString($strength = 10)

and to the next line is

$input = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

So in

$input = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';

remove all unwanted and save it.

Fixing error 500 on Xtream UI admin:

There are many reason of this error, we;ll try applying max we can. I’m sharing 2 solutions, one is fixing/updating Geolite2.mmdb file and second is updating panel with fresh files to R22F.

First Run this single command to update Geolite2.mmdb file and check if things started working already.

sudo chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo wget -q https://lofertech.com/xui/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo /home/xtreamcodes/iptv_xtream_codes/start_services.sh

If not yet working, use following both commands.

apt-get install unzip e2fsprogs python-paramiko -y && rm -rf /home/xtreamcodes/iptv_xtream_codes/admin && rm -rf /home/xtreamcodes/iptv_xtream_codes/pytools && wget “https://lofertech.com/xui/update.zip” -O /tmp/update.zip -o /dev/null && unzip /tmp/update.zip -d /tmp/update/ && cp -rf /tmp/update/XtreamUI-master/* /home/xtreamcodes/iptv_xtream_codes/

After this must run following commands:

rm -rf /tmp/update/XtreamUI-master && rm /tmp/update.zip && rm -rf /tmp/update && sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx && sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx_rtmp/sbin/nginx_rtmp && sudo chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo wget -q https://lofertech.com/xui/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && sudo /home/xtreamcodes/iptv_xtream_codes/start_services.sh

Now try reloading panel or line if all fine there or if not PuTTY must shown you the error on terminal, try searching relevant issues on this site and apply fixes or comment bellow.

Admin not logging after restoring database or resetting admin password.

Run following commands on main server and try logging again.

mysql
use xtream_iptvpro
UPDATE xtream_iptvpro.reg_users SET password='$6$rounds=20000$xtreamcodes$XThC5OwfuS0YwS4ahiifzF14vkGbGsFF1w7ETL4sRRC5sOrAWCjWvQJDromZUQoQuwbAXAFdX3h3Cp3vqulpS0' WHERE id='1';
UPDATE xtream_iptvpro.reg_users SET username = 'admin' WHERE id = '1';
UPDATE xtream_iptvpro.reg_users SET member_group_id = '1' WHERE id = '1';

Now try logging using user and pass as admin admin

Xtream UI High CPU solution:

If you’re getting high cpu on main server, maybe your server is under ddos (or someone’s trying to connect too much from a dead user). You can try killing connections and find out the ddos user then block his IP. Or if you’re getting high CPU issue on loadbalancer, first make all his streams on-demand mode or move to any other loadbalancer then reboot it. After back up, move these streams or take online the streams in lower numbers like 10-20. The weak CPU’s can show high usage when you online more than its capacity on it. If it dont work try re install the OS and online less channels over it. You can also try add file called servers_checker.php

Xtream UI High Memory Usage solution:

This issue appears when you have low RAM and more channels over the LB or you’ve prebuffer rate more than default. Try decreasing prebuffer rate to 0 in settings => Streaming or add PID Monitor file by following:

wget "https://lofertech.com/xui/pid_monitor.zip" -O/tmp/pid_monitor.zip -o /dev/null && unzip /tmp/pid_monitor.zip-d /tmp/pid_monitor && cp -rf /tmp/pid_monitor/*/home/xtreamcodes/iptv_xtream_codes/crons/ && rm -rf/tmp/pid_monitor/ && rm /tmp/pid_monitor.zip

Xtream Ui Select At Least One Server solution:

This error appear when you’re try to add or move streams/vod and don’t select the server where it will be live. When you add new stream or VOD at the end tab (Servers), you need to drag a server (can be LB or Main) over stream source then add it.

How To Update Xtream UI?

To upgrade run following commands one by one:

apt-get install unzip e2fsprogs python-paramiko -y ; rm -rf /home/xtreamcodes/iptv_xtream_codes/admin ; rm -rf /home/xtreamcodes/iptv_xtream_codes/pytools ; wget "https://lofertech.com/xui/update.zip" -O /tmp/update.zip -o /dev/null ; unzip /tmp/update.zip -d /tmp/update/ ; cp -rf /tmp/update/XtreamUI-master/* /home/xtreamcodes/iptv_xtream_codes/

And then:

rm -rf /tmp/update/XtreamUI-master && rm /tmp/update.zip ; rm -rf /tmp/update && sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx ; sudo chmod +x /home/xtreamcodes/iptv_xtream_codes/nginx_rtmp/sbin/nginx_rtmp ; sudo chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; sudo wget -q https://lofertech.com/xui/GeoLite2.mmdb -O/home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; /home/xtreamcodes/iptv_xtream_codes/start_services.sh

What is Xtream UI Default Login?

Xtream UI logins can be admin/admin or admin/cxadmin.

Best Xtream UI On Demand Probesize?

Suggested is 256000 and 128000 but for faster zap try 512000.

What is Xtream UI Backup Location?

It will be “/home/xtreamcodes/iptv_xtream_codes/adtools/backups/”

How To Find Xtream UI Network Interface (Input and Output Data)?

On putty root, type

ifconfig

and there you can see the your network interface ID.

Xtream UI M3u Import not working solution:

  1. Run Command:
    sudo /etc/init.d/mysql restart
  2. Run Command:
    /home/xtreamcodes/iptv_xtream_codes/start_services.sh

What is my Xtream UI MAG Portal?

Your Xtream UI MAG Portal URL will be http://yourmainserverIP:broadcastport/c or http://abc.com:25461/c . You can remove /c on old devices.

We tried sharing the most common issues fixes and hope you liked them. You can comment down bellow if you’ve any issue, suggestion or get our Telegram (@lofertech) paid services.

Helping Links

I’m offering paid services on Telegram (@lofertech), get your services fixed by me.

Xtream UI Panel – A Complete Guide

Xtream UI Mirrors

Best Streaming Dedicated Servers For IPTV

Installing Xtream UI Admin Panel properly (common issues and fixes)

Installing / Adding Xtream UI new loadbalancer or new server (common issues and fixes)

Xtream UI Tips

Xtream UI VS Xtream Codes

Firestick IPTV Tutorial & Download APK