There are 2 options to get Load balancers installation at the present:
- Fixed auto installation
- Manually install LB directly
Remember to make a backup everything in advance such as configuration files and databases, and so on.
I’m offering paid services, get your services fixed or install by me.
Fix Xtream UI Auto LB installation On Main Server
Before adding a new Load Balancers, you have to run the following command on Main Server in order to get auto installation of LB working well.
sed -i 's/xtream-ui.com/lofertech.com/g' /home/xtreamcodes/iptv_xtream_codes/pytools/balancer.py ; /etc/init.d/xtreamcodes
After that, from the navigation menu, go to Load Balancer Installation and add the following data correctly:
Server IP: This is your new dedicated server or Loadbalancer IP address.
Root Password: This is the root password of your same new load balancer.
The rest data you can add as your choice. If you want to change the ports, you can read this guide about changing ports. After adding that data, Loadbalancer should be online in 3 to 5 mins. You need to reload the manage servers page in order to see fresh data.
Install Xtream-UI Load Balancer Manually
- Get MySQL password
- Login to root via PuTTY
- Start installation script
- Select LB, yes, hit enter
- Installation completed
- Reload Manage Servers page and your LB is now online
That was the quick installation guide, please read the full guide below about Xtream-UI load balancer installation or Xtream-UI Main server installation.
Getting MySQL root password for user_iptvpro from DB xtream_iptvpro
You need to do this action only if you have not already copied and saved the main server’s MySQL password for user_iptvpro. In case you do not have this password, run the following command to get it.
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
You’ll get an output like:
Server ID: 1
Host: 127.0.0.1
Port: 7999
Username: user_iptvpro
Password: 2VlKE4eJmt8IBTs1
Database: xtream_iptvpro
So, there we got MySQL password we’ll be asked while installing the load balancer manually.
Logging to New Dedicated server (Loadbalancer)
Now login to your new load balancer dedicated server via PuTTY. If you do not know how to do it or getting errors, this article may help you.
Starting Installation For New Loadbalancer
First of all, login to your admin Panel, from the navigation menu, go to Add Load Balancer, add your dedicated server hostname/custom name or IP, then add your server IP and fill other fields if you know how to or leave the rest blank, and now it should look like this:
Finding Correct Network Interference ID
Now, to the next Advance Field, the field we must update is called Network Interference which is by default eth0
. This helps us keep showing correct and real-time upload and download data so we can keep eye on our bandwidth running out of limit or in range. To get your server’s correct Network Interference ID, run the following command.
ifconfig
Now the output data be like:
eth0
: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet ip netmask 255.255.254.0 broadcast ip.255
inet6 2-------32 prefixlen 64 scopeid 0x0<global>
Here our Network Interference ID iseth0
so, we’ll type this to the relevant field and add this new load balancer. It will look like this now:
Now get back to the navigation menu and Manage Servers. There you’ll see a new load balancer has been added but the status is offline and also you can see a disabled WiFi icon on the right upper side which indicates that one or more of your load balancers are down. It will now look like this:
Running Installation Script For Xtream UI Load Balancer
Now, get back to PuTTY of your load balancer server and from mirrors, you can run the command to get the installation menu. Like we’re gonna use our following installation script.
apt-get update ; apt-get install libxslt1-dev libcurl3 libgeoip-dev python -y ; wget https://lofertech.com/xui/install.py ; sudo python install.py
So, here you’ll get a menu having 3 or 2 options and one of these will be LB which is actually the short name of LoadBalancer.
You need to type LB and hit enter so it will start the installation process for LoadBalancer. It will now ask you for some data to be entered, following is how you can correct add the data.
Main Server IP
: Here you need to add your admin panel IP
MySQL Root Password
: This is the password of the main server MySQL password for user user_iptvpro and database xtream_iptvpro. You can get from the above method we shared to get this data.
Load Balancer Server ID
: This add ID of load balancer you can get my logging into admin panel ==> manage servers ==> relevant load balancer ID number at left side. Following is the map of where and how to add this data correctly.
Taking LoadBalancer Online
You need to reload the page Manage Servers and see if the load balancer is already online. If not run the following command on the LB server and it should be online and after that, you can use it as you want.
/home/xtreamcodes/iptv_xtream_codes/start_services.sh
Now it will be like this.
So finally you have successfully installed and make the load balancer running well. If you want to make some more and recommended changes to your load balancer you can use this guide.