NexgenStreamerNexgenStreamer
Docs menu

Install the main server

The main server runs the control console, the first gateway and the database. You run one command on a fresh Ubuntu server, then finish the setup in your browser. On our test server the whole install takes about five minutes.

Contents

Before you start

What you need from us

An activation key. It is 43 characters long. Keep it private: the first server that uses it becomes your licensed installation. Moving the licence to another server later needs our help.

The server

  • Ubuntu 20.04 or later. Ubuntu 20.04 works, but its standard security support has ended and the installer warns about it, so pick a newer release.
  • A 64-bit Intel/AMD (amd64) or ARM (arm64) processor.
  • Root access over SSH.
  • At least 20 GiB of free disk space under /var/lib.
  • We test on a server with 2 vCPUs and 4 GB of RAM.

A new, empty server is the simplest case. If the server already runs an XUI panel, the installer can back it up and replace it (step 4).

Firewall

When Allow inbound TCP
During setup 22 (SSH) and the web installer port. The installer picks a random port above 10000 and prints it
After setup 80, 443 and the remote server control port. The installer shows this port when it finishes. Load Balancers use it to reach the main server

Domain (optional)

You can run with only the server’s IP address, but browsers and players then show a certificate warning. With a domain you get a normal HTTPS address. Decide before you start which option you want (see step 3).

1. Run the installer

Connect to the server over SSH as root and run:

apt update && apt install -y curl && curl -fsS https://i.nexgenstreamer.com | bash

The installer asks for your activation key. Paste it and press Enter; the key is not shown on screen. It then downloads and verifies the signed release and starts the web installer. When it is ready, it prints something like this:

NexgenStreamer platform web installer is running.
  URL:          https://203.0.113.10:41873/
  Certificate:  SHA-256 82:AA:F0:07:…:79:E0:37
  Setup code:   (your one-time code)
The browser will warn about the self-signed certificate; confirm the fingerprint above before continuing.
If the selected port is not reachable, allow TCP 41873 in your provider firewall.

Your address, port and fingerprint will be different. Keep this output open for the next step.

If you cannot type into the terminal

Some automation tools run commands without a terminal. Put the key in a file that only root can read, then pass the file to the installer:

install -m 0600 /dev/null /root/nexgen-activation.key
# put the key in /root/nexgen-activation.key with any editor, then:
curl -fsS https://i.nexgenstreamer.com | bash -s -- --activation-key-file /root/nexgen-activation.key

Without a terminal the setup code is not printed. Show it with:

nexgen-installer status --show-setup-code

If the command stops with an error

Read the last line before you run it again.

  • If it ends with nothing was installed, fix the cause (for example a mistyped key) and run the command again.
  • For any other error, do not run the command again. Your key is already linked to this server, and a second run is refused. Send us the full output and we will help you continue.

2. Open the web installer

Open the URL from step 1 in your browser. The page uses a self-signed certificate, so the browser shows a warning. Open the certificate details in the browser and check that its SHA-256 fingerprint matches the one in the terminal. Continue only if it matches.

Enter the setup code and select Continue. After too many wrong codes the page asks you to wait a minute.

The installer then inspects the server. On a clean server it reports that no conflicting installation was found. If it finds an existing panel, it lists each item with the action it proposes. You must fix any item marked as blocking before you can continue.

3. Choose IP or domain

Under Network and domain, check the public IPv4 address. The installer detects it; correct it if the server is behind NAT. Then choose one option:

Option What you need Certificate
Server IP only Nothing else Self-signed. Browsers and players show a warning
Domain with manual DNS A DNS record you manage yourself Trusted (Let’s Encrypt) if you accept the certificate authority’s terms. Otherwise self-signed
Cloudflare DNS A domain on Cloudflare and an API token with Zone Read and DNS Edit for that zone Always trusted. Accepting the terms is required

Domain with manual DNS

  • For a trusted certificate, tick the certificate authority’s terms. Before you continue, point the domain’s A record at the server’s IP address. The name must reach this server directly while it installs, so turn off any proxy in front of it (for example Cloudflare’s orange cloud) until the install finishes.
  • To use Cloudflare’s proxy in Full mode, leave the terms unticked. The server keeps its self-signed certificate, and Cloudflare serves visitors with its own certificate. Anyone who connects to the server’s IP directly sees a certificate warning.

Cloudflare DNS

Paste the API token. The installer uses it once and does not save it. It shows the DNS changes it will make in your zone, including any conflicting records. Review them and select Apply DNS changes.

An IPv6 address can be set only in Cloudflare DNS mode.

Select Save network settings to continue.

4. Replace an existing panel

Skip this step on a new server.

If the server already runs a panel, the installer first backs it up. It pauses the listed services, backs up every database and restores the backup in an isolated environment to check it. It removes nothing in this step. If it asks for database administrator credentials, enter them, then select Create and verify backup.

When the backup is verified, the page shows where it is stored and lists everything that will be stopped and removed. Type the confirmation phrase exactly as shown and select Replace and install.

The installer copies the old panel’s database to /opt/nexgen/import/, so you can import it into the new console in step 6.

5. Install

Select Install. The page shows each stage: installing the control server, gateway and database, then verifying the installation. On our test server this took about two minutes.

If a step fails, the page shows the step and an error code, and the installer keeps the work already completed. Select Retry to continue from where it stopped. If it fails again, send us the step name and the code.

When the page shows Installation ready, it lists:

  • the control console address and the gateway address
  • the firewall ports to open: TCP 80, 443 and the remote server control port
  • the certificate, either publicly trusted or self-signed with a fingerprint you can check
  • your licence ID and, for a trial, when the trial ends

Open the firewall ports now. Then select Continue to the control console. The page shows a control setup code only once. Copy it before you leave the page. The web installer closes after this.

6. Set up the console

Open the control console address and paste the control setup code. The console asks how you want to start.

Start fresh

Create the first administrator with a username and password. The system starts with an empty catalogue.

Migrate an existing panel

This brings over your lines, resellers, content groups, streams and servers. XUI.one and Xtream Codes panels are supported today. Choose where the database comes from:

Source What to enter
Old main server over SSH (the default) Its address, SSH port, root user and password. The console copies the database and changes nothing on the old server. The old server’s SSH key fingerprint is shown on the import job
Upload A .sql or .sql.gz file of up to 500 MB
Server file /opt/nexgen/import/xui.sql.gz (or xui.sql) on the new server, owned by root. Step 4 puts the old panel’s database there when you replace a panel

If the import fails, the job shows the error and the partial import is rolled back. After an import, sign in with an administrator account from the old panel. If the old panel had no active administrator, the console asks you to create one.

7. Add Load Balancers

Load Balancers carry the streaming traffic. Add each one from the console:

  1. Open Servers and select Install server.
  2. Choose the Load Balancer role, give the server a name, and enter its SSH host, SSH port, the username root and the root password.
  3. Review and start. The console shows the server’s SSH host key fingerprint. Check it, then trust it.
  4. The console installs the server and shows each step: SSH connection, preflight checks, SSH key, dependencies, registration, upload, service start and verification.

On our test Load Balancer this took about one minute. The console keeps an SSH key for later updates, so you do not need the password again.

Make sure the main server’s remote server control port is open (step 5). Load Balancers cannot reach the main server without it.

8. Licence and trial

A trial key gives you a 7-day trial. It starts when the server is activated in step 1, not when you receive the key. When the trial ends, playback and channel operations stop within a few seconds and new ones are refused. You can still sign in to the console and see your data, but changes need a paid licence. Lines, catalogue items, settings and media stay on the server, and stopped channels start again once the licence is active.

When you buy a licence, we update it on our side. To apply it straight away, run this on the main server as root:

/opt/nexgen/bin/nexgenctl license refresh --config /etc/nexgen/control.json

Check status and fix problems

On the main server, nexgen status shows the version, console address, licence and update state:

Version:   v0.12.11 (commit 28d1bf4)
Console:   https://panel.example.com/<access code>/
Licence:   valid, paid tier, licensee "Example Ltd", expires 2027-11-22, management allowed
Schema:    5 of 5 migrations applied
Updates:   up to date
  control    v0.12.11  current
  gateway1   v0.12.11  current
  admin      v0.12.11  current

During setup, nexgen-installer status shows the installer’s phase, the setup URL and its certificate fingerprint. After the install it also shows the remote server control port.

Problem What to do
Web installer does not load Allow the web installer port (shown in step 1) in your provider’s firewall
Lost the setup code Run nexgen-installer status --show-setup-code as root
Setup code refused Check the code. After too many attempts, wait a minute
Fingerprint does not match Stop. Do not enter the setup code. Contact us
Install step failed Select Retry. If it fails again, send us the step and the code
Installer command failed Run it again only if the error ends with nothing was installed. Otherwise send us the output
Certificate warning on your domain You chose a self-signed certificate. Use Cloudflare’s proxy in Full mode, or ask us how to switch to a trusted certificate
Load Balancer install fails Check that the root password is correct and that the main server’s remote server control port is open

To contact us, message @NexgenStreamerManagerBot on Telegram.