• You MUST read the Babiato Rules before making your first post otherwise you may get permanent warning points or a permanent Ban.

    Our resources on Babiato Forum are CLEAN and SAFE. So you can use them for development and testing purposes. If your are on Windows and have an antivirus that alerts you about a possible infection: Know it's a false positive because all scripts are double checked by our experts. We advise you to add Babiato to trusted sites/sources or disable your antivirus momentarily while downloading a resource. "Enjoy your presence on Babiato"

IPTV | Xtream-ui+ Modded | Installation | How to

El Comandante

New member
Apr 12, 2021
16
14
3
Hello,
Sorry if post is on wrong section.

Here is tutorial how to install Xtream-ui + modded (writing this because i saw few guys asking around and no one writing it).

1. Get server with Ubuntu 18
when you got server with ubuntu 18 we can start.

How to INSTALL (Ubuntu 18.04 recommended for MAIN)
Code:
As root: apt-get update ; apt-get install libxslt1-dev libcurl3 libgeoip-dev python -y ; wget https://mirror.sctl.icu/install/install.py ; sudo python install.py

First Run MAIN and follow instructions
after it finished run again python install.py and run ADMIN follow instructions.


now you have installed MAIN server with panel xtream-ui its your IP:25500

to upgrade to modded follow next

go in the Main /etc/sudoers and modify

xtreamcodes ALL=(root) NOPASSWD: /sbin/iptables

to look like this:

xtreamcodes ALL=(root) NOPASSWD: /sbin/iptables, /usr/bin/chattr

when doing Full Remake on Main or Balance wait whenever the operation is finished to do it again (all done calm)
password cannot contain odd characters like ? or # etc etc

Code:
apt-get install unzip e2fsprogs python-paramiko -y && chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && rm -rf /home/xtreamcodes/iptv_xtream_codes/admin && rm -rf /home/xtreamcodes/iptv_xtream_codes/pytools && wget "http://xcodes.mine.nu/XCodes/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/ && rm -rf /tmp/update/XtreamUI-master && rm /tmp/update.zip && rm -rf /tmp/update  && chown -R xtreamcodes:xtreamcodes /home/xtreamcodes/ && chmod +x /home/xtreamcodes/iptv_xtream_codes/permissions.sh && /home/xtreamcodes/iptv_xtream_codes/permissions.sh && find /home/xtreamcodes/ -type d -not \( -name .update -prune \) -exec chmod -R 777 {} + && /home/xtreamcodes/iptv_xtream_codes/start_services.sh && chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb

after is finished go in panel and Servers-manage then click on options then full remake and wait it should take 1-2 min

now you have xtream-ui modded

- I rebooted the server and the panel didn't come back up

As root run: /home/xtreamcodes/iptv_xtream_codes/start_services.sh

- How to get m3u playlist?

http://ip.address:25461/get.php?username=user&password=pass&type=m3u&output=ts

- How to ADD Stream on the final step

E6eqg3p.png


- How to change BROADCAST port from 25461 to another port?

Change NEWPORT to the port you want. Eg 8080 As root run: sed -i 's/25461/NEWPORT/g' /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf ; /etc/init.d/xtreamcodes

- How to change ADMIN port from 25500 to another port?

Change NEWPORT to the port you want. Eg 8081 As root run: sed -i 's/25500/NEWPORT/g' /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf ; /etc/init.d/xtreamcodes

- Fix 500 Errors on XC v2

As root run: apt-get install e2fsprogs -y && chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; wget https://archive.org/download/geolite2_201910/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && chown xtreamcodes.xtreamcodes /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && clear && echo "If you see this message, 500 errors are probably fixed"

- How to find out what Network Interface to use on your Admin UI

As root run: route -n | awk '$1 == "0.0.0.0" {print $8}' After that, on your Admin UI, go to: Servers > Manage Servers > Edit > Advanced

That is installation with some standard issues and some how to , will write more how to when i get time

Any questions , feel free to write
 
Last edited:
- Errors AUTO Installing Load Balancers?
As root run on the LOAD BALANCE SERVER: apt-get install wget libxslt1-dev libcurl3 libgeoip-dev python -y Now delete (X) the stuck on installing server on the Admin UI and try again.

- Fix 500 Errors on XC v2
As root run: apt-get install e2fsprogs -y && chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; wget https://archive.org/download/geolite2_201910/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && chown xtreamcodes.xtreamcodes /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && clear && echo "If you see this message, 500 errors are probably fixed"

- Problem in Truncate logs then use this:
/usr/bin/mysql -uroot -p$$PASSWORD$$ -hlocalhost -Dxtream_iptvpro -e"TRUNCATE TABLE client_logs" && /usr/bin/mysql -uroot -p$$PASSWORD$$ -hlocalhost -Dxtream_iptvpro -e"TRUNCATE user_activity" && /usr/bin/mysql -uroot -p$$PASSWORD$$ -hlocalhost -Dxtream_iptvpro -e"CREATE TABLE stream_logs_new LIKE stream_logs; RENAME TABLE stream_logs TO stream_logs_old, stream_logs_new TO stream_logs; DROP TABLE stream_logs_old;"

Don´t forget change $$PASSWORD$$ for real password

- I can't enter panel due to Google 2FA
How to reset Google 2FA for a user?
Code:
UPDATE `xtream_iptvpro`.`reg_users` SET `google_2fa_sec`='' WHERE `id` = 'id_of_user';

or

Code:
UPDATE `xtream_iptvpro`.`reg_users` SET `google_2fa_sec`='' WHERE `username` = 'username_of_user';

How to disable Google 2FA in admin settings?

Code:
UPDATE `xtream_iptvpro`.`admin_settings` SET `value`='' WHERE `type`='google_2factor';

- How to disable recaptcha on admin panel via sql querries?
--open terminal and, sudo mysql
Code:
UPDATE `xtream_iptvpro`.`admin_settings` SET `value`='' WHERE `type` like 'recaptcha%';
UPDATE `xtream_iptvpro`.`settings` SET `show_captcha` = 0;

- How to learn size of database tables from terminal?

sudo mysql -u root

SELECT table_name AS `Table`, round(((data_length + index_length) / 1024 / 1024), 2) `Size in MB` FROM information_schema.TABLES WHERE table_schema = "xtream_iptvpro" ORDER BY (data_length + index_length) DESC;
 
- How to change a server's http broadcast port?
--open nginx.conf with;
sudo nano /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf
--find listen 25461; and change port number,
--then save it with ctrl+s and exit with ctrl+x,
--now test it with,
sudo /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx -t
--then reload nginx if test is successfull,
sudo /home/xtreamcodes/iptv_xtream_codes/nginx/sbin/nginx -s reload
--Go to Manage Serverspage, edit the server's http broadcast port.
--restart services on servers with,
sudo /home/xtreamcodes/iptv_xtream_codes/start_services.sh

- How to get your mysql password
Code:
python /home/xtreamcodes/iptv_xtream_codes/pytools/config.py DECRYPT
 
- How to fix m3u not importing



On your main server run (as root)

Code:
sudo /etc/init.d/mysql restart

and then

Code:
/home/xtreamcodes/iptv_xtream_codes/start_services.sh.

Clear browser cache, log back in and import your m3u.



- How to clear XC UI logs using mysql



Login to XC via MySql

mysql -u root -pPASSWORD

use xtream_iptvpro;



Then run each one of these commands:

Code:
TRUNCATE panel_logs;

TRUNCATE client_logs;

TRUNCATE stream_logs;

TRUNCATE user_activity:



- How to change main server ?



1. backup your db

2. install new main server

3. restore db on new main server

4. edit ip of main server in "manage servers" page.

5. put your old nginx.conf file from old main server to new main server.

6. update "config" files in lb servers, you have to enter new main ip and new db password.



Code:
wget https://raw.githubusercontent.com/shinctl/XtreamUI/master/pytools/config.py && python config.py ENCRYPT



7. restart panel on all servers.
 
- Use Youtube/Twitch etc. sources with Youtube-dl + ffmpeg



ffmpeg can run a command to get stream link from youtube-dl. Install youtube-dl to stream server (example: x Lb server)



Code:
sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl

sudo chmod a+rx /usr/local/bin/youtube-dl



Add streams links to panel like this,

Code:
$(youtube-dl -q -f best -g https://www.youtube.com/watch?v=C34u2uPWfhM)

or

$(youtube-dl -q -f best -g https://www.twitch.tv/lirik)



or use a youtube search and select 1st result

Code:
$(youtube-dl -q -f best -g "ytsearch1:sky news live")






- Disable Image Resizing in table_search.php



if you have a slow server that can't handle this process, delete image resize request from code. find this



Code:
$rIcon = "<img src='./resize.php?max=32&url=".$rRow["stream_icon"]."' />";



and replace with this



Code:
$rIcon = "";
 
hi.
i have a problem with xtream ui if my reserller or admin want to log in it stay on login page. do not go in
 
hi.
i have a problem with xtream ui if my reserller or admin want to log in it stay on login page. do not go in
you need first create reseller user and packages for resellers. After creating reseller user you can login with as reseller. You created Admin user (admin is everything) Reseller have limited access
 
if i install it, then i need to upload movie streams? or it already have all?
 
Hello,
Sorry if post is on wrong section.

Here is tutorial how to install Xtream-ui + modded (writing this because i saw few guys asking around and no one writing it).

1. Get server with Ubuntu 18
when you got server with ubuntu 18 we can start.

How to INSTALL (Ubuntu 18.04 recommended for MAIN)
Code:
As root: apt-get update ; apt-get install libxslt1-dev libcurl3 libgeoip-dev python -y ; wget https://mirror.sctl.icu/install/install.py ; sudo python install.py

First Run MAIN and follow instructions
after it finished run again python install.py and run ADMIN follow instructions.


now you have installed MAIN server with panel xtream-ui its your IP:25500

to upgrade to modded follow next

go in the Main /etc/sudoers and modify

xtreamcodes ALL=(root) NOPASSWD: /sbin/iptables

to look like this:

xtreamcodes ALL=(root) NOPASSWD: /sbin/iptables, /usr/bin/chattr

when doing Full Remake on Main or Balance wait whenever the operation is finished to do it again (all done calm)
password cannot contain odd characters like ? or # etc etc

Code:
apt-get install unzip e2fsprogs python-paramiko -y && chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && rm -rf /home/xtreamcodes/iptv_xtream_codes/admin && rm -rf /home/xtreamcodes/iptv_xtream_codes/pytools && wget "http://xcodes.mine.nu/XCodes/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/ && rm -rf /tmp/update/XtreamUI-master && rm /tmp/update.zip && rm -rf /tmp/update  && chown -R xtreamcodes:xtreamcodes /home/xtreamcodes/ && chmod +x /home/xtreamcodes/iptv_xtream_codes/permissions.sh && /home/xtreamcodes/iptv_xtream_codes/permissions.sh && find /home/xtreamcodes/ -type d -not \( -name .update -prune \) -exec chmod -R 777 {} + && /home/xtreamcodes/iptv_xtream_codes/start_services.sh && chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb

after is finished go in panel and Servers-manage then click on options then full remake and wait it should take 1-2 min

now you have xtream-ui modded

- I rebooted the server and the panel didn't come back up

As root run: /home/xtreamcodes/iptv_xtream_codes/start_services.sh

- How to get m3u playlist?

http://ip.address:25461/get.php?username=user&password=pass&type=m3u&output=ts

- How to ADD Stream on the final step

E6eqg3p.png


- How to change BROADCAST port from 25461 to another port?

Change NEWPORT to the port you want. Eg 8080 As root run: sed -i 's/25461/NEWPORT/g' /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf ; /etc/init.d/xtreamcodes

- How to change ADMIN port from 25500 to another port?

Change NEWPORT to the port you want. Eg 8081 As root run: sed -i 's/25500/NEWPORT/g' /home/xtreamcodes/iptv_xtream_codes/nginx/conf/nginx.conf ; /etc/init.d/xtreamcodes

- Fix 500 Errors on XC v2

As root run: apt-get install e2fsprogs -y && chattr -i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb ; wget https://archive.org/download/geolite2_201910/GeoLite2.mmdb -O /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && chown xtreamcodes.xtreamcodes /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && chattr +i /home/xtreamcodes/iptv_xtream_codes/GeoLite2.mmdb && clear && echo "If you see this message, 500 errors are probably fixed"

- How to find out what Network Interface to use on your Admin UI

As root run: route -n | awk '$1 == "0.0.0.0" {print $8}' After that, on your Admin UI, go to: Servers > Manage Servers > Edit > Advanced

That is installation with some standard issues and some how to , will write more how to when i get time

Any questions , feel free to write
mine is stuck on this screen and doesn't come out anymore

1665526026406.png
 
AdBlock Detected

We get it, advertisements are annoying!

However in order to keep our huge array of resources free of charge we need to generate income from ads so to use the site you will need to turn off your adblocker.

If you'd like to have an ad free experience you can become a Babiato Lover by donating as little as $5 per month. Click on the Donate menu tab for more info.

I've Disabled AdBlock