Open beta Leyla is free until December 31, 2026. Preorder at founders’ prices

Download

Watch away from home

People at home can always watch. For anyone else, choose one way in and save one address. There is no Leyla cloud between you and your films: the picture goes from your server to the screen and nowhere else.

Choose a way in

All three are set under Administration › This server › Network, and the setup’s Reach it from outside screen asks the same question. Each needs one address that you save there.

WayGood forWhat is open to the internet
A VPNA household and a few people you trust with a place on your networkNothing
Your own domainAnyone you invite, on any device, at an address that is easy to sayYour proxy or tunnel
A port on your routerNo extra software: Leyla opens the door itselfOne port, with Leyla’s own HTTPS

Each app is given every address it might use and takes the first that answers: the home network first, then the VPN, then the public address. Nobody has to switch anything when they walk out of the door.

A VPN

With a VPN, nothing is open to the internet. These steps use Tailscale; any VPN that gives the server a stable address works the same way.

  1. Run Tailscale on the server

    Install it on the machine Leyla runs on, and invite the people who will watch to your tailnet.

  2. Save the server’s tailnet address

    Under Administration › This server › Network, save http://<machine>.<tailnet>.ts.net:10001.

  3. Optional: give it HTTPS

    Terminal, on the server
    $ tailscale serve --bg --https=443 10001

Your own domain

Put a reverse proxy or a tunnel in front of Leyla. Use the one you already run.

Caddyfile
leyla.example.com {
  reverse_proxy <box>:10001
}
Cloudflare Tunnel
$ cloudflared tunnel --url http://<box>:10001   # then add a public hostname for it

nginx and Traefik work the same way. Then save https://leyla.example.com under Administration › This server › Network. Leyla asks which address your proxy connects from, and trusts that address to say who the visitor really is.

A port on your router

Leyla opens the port itself over UPnP or NAT-PMP where the router allows it. Where it does not, forward one port to the server by hand.

Important Turn on Leyla’s own HTTPS on the same page, so passwords never cross the internet in plain text.

Leyla can open a router port only when it sits on the home network itself. In Docker’s default bridge network it does not: see TVs and the home network below.

Test it

With the address saved, Administration › This server › Network shows a code to scan. Turn off Wi-Fi on a phone, so it is on mobile data, and scan it. If Leyla opens, the way in works for everyone you invite.

TVs and the home network

TVs find Leyla by announcements on the home network: DLNA, and the list of servers the apps show. Those announcements never cross Docker’s default bridge network, so a TV may not see a server that a browser reaches without trouble.

Give the container the host’s network. In the compose file, add network_mode: host to the leyla service and remove its ports:

compose.yaml, the leyla service
    network_mode: host
    # ports:                 remove these two lines
    #   - "10001:10001"

A macvlan network, where the container gets its own address at home, works too. Administration › This server › Network says which kind of network Leyla sees.

How sign-in is protected

Ten wrong passwords for one account lock that account’s sign-in for fifteen minutes, doubling up to four hours, whichever addresses the guesses come from. A device that has signed in before is judged by its own record, so a stranger guessing cannot lock you out of your own server.

If it works at home but not away

  • No address is saved. The apps only try addresses they were given. Save the public or VPN address under Administration › This server › Network, then run the phone test.
  • The proxy is not trusted. Behind a proxy or tunnel, Leyla must know the address the proxy connects from. The same page asks for it.
  • The router refused. Not every router allows UPnP or NAT-PMP. Forward the port by hand, or choose another way in.