A load balancer is one more streaming server. It hosts channels and VOD, serves your clients and shares the load with the rest of your servers. Add one when you need more capacity, or a server in another region so that clients connect to a server close to them.

A load balancer is a server of yours. Do not confuse it with a stream provider, which is an outside source of channels. If what you need is to hide the IPs of your servers, add a reverse proxy instead: see Configure the Reverse Proxy.

You can install a load balancer in two ways.

  1. Open Servers.
  2. Click Add load balancer. On engines older than 2.3.0 the button is Add Server.
  3. Fill in the form:
    • Server Name: a name to recognize the server, for example "LB-Europe-1". Your clients do not see it.
    • Server role: Load balancer (hosts channels and VOD) is already selected.
    • Server IP: the public IP of the new server, for example 203.0.113.10.
    • SSH Username: a user with sudo rights, usually root.
    • SSH Password: the password of that user.
    • SSH Port: the SSH port of the server, usually 22.
  4. Click Start Installation.

The panel connects over SSH and runs the installer. Installation Progress shows each step in real time. It can take 10 to 20 minutes, depending on the network of the server.

The panel saves the SSH login encrypted, so it can reuse it later, for example to update the server with Use stored SSH credentials.

Option 2: Install with the command over SSH

  1. Open your client area: https://xtreamai.net/client-area/products/.
  2. Open your license and copy the command in Command to Install.
  3. Connect to the new server over SSH as root.
  4. Paste the command and run it.
  5. When the installer asks for the role of the server, choose This is a loadbalancing server.

Do not choose the main role on this server. Your license has only one main server. If the current main is still online, the installer does not allow a second main. If the current main is offline, choosing main revokes it and deletes its panel data. Read the role question carefully.

What happens next

When the installation ends, the server appears in Servers with the status Online. There is nothing else to set up: the load balancer gets your channels, movies and categories from the main server on its own. You manage everything on the main server, never on each load balancer.

Then you can:

  • Assign channels and VOD to the new server from each channel or movie, or move many channels at once.
  • Open the server name to edit it in Edit Server: Domain Name, DNS hostnames, Max Clients Connected, GeoIP Load Balancing and its countries, SSL certificates and ports.

If a load balancer goes down, new clients are sent to your other servers.

Common problems

  • The installation fails at the SSH step. The server does not accept SSH from the panel. Check the firewall of your hosting, that SSH is running, and the username and password.
  • The installation fails because of nginx. The server already had nginx or another panel installed. Use a clean server, or clean it first, and try again.
  • The server shows as Offline right after the installation. Check that the engine is running on that server and that ports 80 and 443 answer from outside. Some hosting firewalls take a while to apply rules.
  • Clients do not see new content on the load balancer. The server can take a few minutes to get the latest changes from the main server.
  • I do not see Add reverse proxy, only Add Server. Your main server runs an engine older than 2.3.0. See Update the engine.