LibrePortal
Sponsor Get started

Installed it yourself? Link your app

You ran the one-line install command on your own server or a computer at home. This page takes you from the end of the install to the LibrePortal app on your phone or computer, signed in, and then to inviting the people you share it with.

On this page
  1. Step 1: Run the install command
  2. Step 2: What you see at the end
  3. Step 3: Open the WebUI and sign in
  4. Step 4: Make a pairing code
  5. Step 5: Add the server in the app
  6. Step 6: Invite the people you share it with
  7. If it doesn't work
  8. The code ran out
  9. The app can't reach the server
  10. A firewall is in the way
  11. A computer at home, behind a router
  12. Still stuck

Plenty of people put LibrePortal on a server they already have by typing the install command themselves. That works just as well as letting the app do it. The only thing the app has not done for you yet is meet your server, so this page joins the two up. It takes about five minutes.

If you have not installed anything yet and would rather not use a terminal at all, the app can do the whole install for you: see Install LibrePortal.

Step 1: Run the install command#

On the server, as root, run:

curl -fsSL https://get.libreportal.org/install.sh | sudo bash

It checks the machine, updates it, installs Docker and starts the WebUI. Leave it running until the finished card appears. Install from the command line explains each step while you wait, and the options for putting data on another disk.

Step 2: What you see at the end#

The install ends with a card like this one. Yours has its own username, port and addresses.

✅  LibrePortal installation complete! <3

🔐  WebUI Credentials
    Username   qhzmwtrkbsle
    Password   run: libreportal webui login show

🌐  Open the WebUI at

    This network    http://192.168.1.50:4821   (this network only)
    Anyone          http://203.0.113.5:4821    (anyone with the password)

Two lines matter now:

  • The addresses under Open the WebUI at. This network works from a phone or computer on the same Wi‑Fi or cable as the server. Anyone is the server's public address, and is there on a rented server. A computer at home usually shows only This network.
  • The password. If the card says run: libreportal webui login show instead of a password, that is on purpose: the install command feeds the installer through a pipe, so it keeps the password off the screen and out of the log. Print it like this:
Advanced Do this from the command line
sudo -u libreportal libreportal webui login show

New to the command line? How to run LibrePortal commands →

Put the username and password in your password manager now. You need them once, in the next step.

Step 3: Open the WebUI and sign in#

Type one of the addresses into a browser, exactly as the card shows it, port and all. Sign in with the WebUI username and password.

The first time, a short setup wizard asks a few questions before anything is installed. Go through it, or come back to it later. First login and setup walks through every page of it.

The odd port number

The WebUI sits on a port picked at random between 3000 and 9999, not on one of the usual ones. Bots knock on the usual ports all day, so one they don't expect is one fewer thing for them to find.

Step 4: Make a pairing code#

A pairing code is a one-time door for the app. You make it on the server, the app uses it once, and the server gives that phone or computer a key of its own. You never type the WebUI password into the app.

  1. In the WebUI, open the account menu at the top and choose Connect the app.
  2. Pick how long it stays open. Valid for starts at 10 minutes, which is the safe choice. Pick longer only if the device is not with you yet.
  3. Keep the window open. It shows a QR code, a link with Copy link, and a short code that looks like ABCD-EFGH-JKMN. A countdown shows how long is left, and New code makes a fresh one.

Or do it in the terminal you installed from. It prints the same QR code, the code and the addresses the app can try:

Advanced Do this from the command line
sudo -u libreportal libreportal app pair

Add --for 1h (or 1d, 2d, 7d) for a code that stays open longer, and libreportal app pair stop cancels an open code at once.

New to the command line? How to run LibrePortal commands →

The code works once. Anyone who has it while it is open could connect a device as you, so keep it to yourself and use it straight away.

Step 5: Add the server in the app#

You need the LibrePortal app on your phone or computer.

  1. Press Add a server on Home, or Add at the top of the list on the left.

  2. Choose Everything on What's this server for?

  3. Choose Use a server I have on Where should it go?

  4. Choose With a pairing code on Connect a server.

    The Connect a server page with three rows: From my hosting account, By its address and With a pairing code.
    Connect a server. With a pairing code is the one for a server you installed yourself.
    The Connect a server page with three rows: From my hosting account, By its address and With a pairing code. Shown at phone width.
    Connect a server. With a pairing code is the one for a server you installed yourself.
  5. Give it the code. On Paste your pairing link, press Paste to drop in the link you copied, then press Pair. On a phone, Scan a QR code reads the QR code from the WebUI or the terminal instead. No link to hand? Press Manual setup and type the server's address from the card (for example 192.168.1.50:4821) and the short code.

    The Pairing page with a Paste your pairing link card holding a Pairing link box with a Paste button and a Pair button, a Where do I get a pairing link? card, and a Manual setup row.
    Paste your pairing link. Manual setup is for typing the address and the short code instead.
    The Pairing page on a phone, with the Paste your pairing link card, the Where do I get a pairing link? card and a Manual setup row.
    Paste your pairing link. Manual setup is for typing the address and the short code instead.
  6. Wait a moment. The app finds the server, gets its own key and, if LibreVPN is installed, joins the server's private network. When it says Paired, it lists what you can now do there. Press Next.

  7. Finish. Your server is ready offers Add your first app and Invite your family. Press Open and the server's name to go to it.

    The Your server is ready page with Next, if you like, offering Add your first app and Invite your family, and an Open Home server button.
    Your server is ready.
    The Your server is ready page with Next, if you like, offering Add your first app and Invite your family, and an Open Home server button. Shown at phone width.
    Your server is ready.

If you opened Connect the app on the same computer or phone as the app, pressing the link opens the app on the right page by itself.

What happens for you: the app signs in to the server with its own key, adds the server to your list and to LibreVPN, and from then on opens the WebUI already signed in when you press Open panel. What you do: make a code, paste it, press Pair.

Step 6: Invite the people you share it with#

Each person gets their own login, their own apps and their own password vault. You never pick or see their password. Make each of them an invite link from the app. Invite your family on the last page starts the same thing.

  1. Open the server in the app and go to People, then press Invite a person. Or press Add at the top of the list on the left and choose Invite someone.
  2. Type a name you will recognise. No email is needed. Press Next.
  3. Choose the apps they get and press Make the invite.
  4. Send them the link with Send with a message app or Copy the link. Send it privately; it works once.

They install the app, open the link and choose their own password. People and invites has the details, including what a member can and can't see, and the page to send them: Join with an invite.

Your own second phone or laptop doesn't need an invite. Make another pairing code for it, as in step 4.

If it doesn't work#

The code ran out#

The app says That code ran out of time. Make a new one: New code in the WebUI's Connect the app window, or libreportal app pair again. A code that was used once is spent too, so a second device always needs a code of its own.

The app can't reach the server#

The app says Couldn't reach the server. Check, in this order:

  • Is the device on the right network? A This network address only works from the same Wi‑Fi or cable as the server. Turn mobile data off on the phone for the pairing, or use the Anyone address on a rented server.
  • Is the address exact? It needs the port from the card, for example 203.0.113.5:4821. Open the same address in the phone's browser: if the WebUI sign-in page doesn't load there, the app can't reach it either.
  • Is the code still open? The countdown in the WebUI shows it.

If you have forgotten the address, sudo -u libreportal libreportal webui login show prints every address the WebUI answers on.

A firewall is in the way#

The installer opens the server's own firewall for SSH and the WebUI, so that one is not the problem. Many hosting companies have a second firewall in their control panel, in front of the server. If yours does, let these in:

  • The WebUI's port (TCP), the number after the colon on the card. That is what the app pairs over.
  • UDP port 51830, for the private network that LibreVPN uses. The server's VPN page shows the port if it is a different one.

sudo -u libreportal libreportal system check lists the ports LibrePortal needs and whether anything else is already using them.

A computer at home, behind a router#

At home, pair while the phone or computer is on the same network as the server, using the This network address. That always works, and the app keeps the server from then on.

To reach it when you are out, your devices need a way in from the internet. Either forward UDP port 51830 on your router to the server, so LibreVPN can reach it from anywhere, or use LibreConnect if you can't open a port. If your server is at home behind a router explains both. You never need to open the WebUI's port on your router.

Still stuck#

Connect the app explains pairing in more depth, including signing a device out. Troubleshooting covers the problems people meet most.

Next steps