Self-host

Address, domain and HTTPS

Your customers' players connect to your own machine on self-host. This page shows where to find that address, how customers outside your network reach it, and how to use your own domain with HTTPS. Follow these steps to set up the address your customers use.

Your customer address

Right-click the M3UTool icon and look at Customers connect to, or run dontv info. That address is the server your customers put into their players.

Your customers sign in with the server address plus their username and password, in any player that supports Xtream. More in Use other players.

Customers outside your network

Customers who watch from elsewhere need to reach your machine from the internet. You have two ways:

Note: Do not forward the editor port (8081). The editor is only for you. See "Keep the editor to yourself" below.

Use your own domain with HTTPS

With your own domain, your customers connect to a name such as tv.example.com instead of a number, and HTTPS is set up by itself.

  1. Create a DNS record: At your DNS provider, create an A record for your domain that points at the public address of the machine that runs M3UTool. With Cloudflare, set the record to DNS only (grey cloud).
  2. Open the install folder: Right-click the M3UTool icon and click Open install folder. On Linux, the folder is ~/.local/share/dontv.
  3. Set your domain: Open the file .env in a text editor, change the line DOMAIN=localhost to your domain, for example DOMAIN=tv.example.com, and save the file.
  4. Apply the change: Right-click the M3UTool icon and click Update. On Linux, run dontv update.
  5. Check the address: Customers connect to now shows http://tv.example.com. Once the certificate is issued, https://tv.example.com works too.
Important: Ports 80 and 443 must reach M3UTool from the internet. This is so that the certificate can be issued: the certificate authority checks your domain over these ports before it hands out the certificate.
Tip: With Cloudflare, keep the record on DNS only. This is so that players talk to your machine directly and Cloudflare does not stand between them and your customer address.
Note: The editor moves to your domain too, on its own port: http://tv.example.com:8081. If the editor does not load on your own computer after this, run dontv link and open the link it shows with localhost in place of your domain, for example http://localhost:8081/auth/selfhost?t=….

Change the ports

M3UTool picks its ports on the first start and keeps them after that. To change one, edit the file .env in the install folder.

Setting in .envUsed forDefault
HTTP_PORTYour customers' players over http80
HTTPS_PORTYour customers' players over https, with your own domain443
EDITOR_PORTThe editor8081
  1. Open the install folder: Right-click the M3UTool icon and click Open install folder, or go to ~/.local/share/dontv on Linux.
  2. Change the port: Open .env in a text editor, change the number after HTTP_PORT=, HTTPS_PORT= or EDITOR_PORT=, and save the file.
  3. Apply the change: Right-click the M3UTool icon and click Update, or run dontv update.
Note: When the customer port is not 80, your customers must type it in the server address, for example http://192.168.1.20:8080. Customers who already use the old address need the new one.

Keep the editor to yourself

The editor port asks for your M3UTool password (and your 2-step code, if your account has one). A sign-in link also gets in, and links only come from the M3UTool program on your machine. Someone who only knows the address sees the sign-in page and nothing more.

The customer address only serves your customers' players and the web player, with the same sign-in checks and device limits as on editor.dontv.shop.

Pictures show made-up demo channels and Blender open movies (© Blender Foundation, CC BY).