LibrePortal
Sponsor
Install

The command line

Everything the WebUI does, you can do from a terminal on the server with the libreportal command. Here's how to run it, and the commands worth knowing, group by group.

On this page
  1. Running it
  2. When the WebUI won't load
  3. app: installing and running apps
  4. instance: more than one copy
  5. backup and restore
  6. update and updater: keeping things current
  7. system: the machine
  8. storage: disks
  9. security: who can reach what
  10. The rest

New to the command line?

You never have to use it: the WebUI does all of this. If you'd like to try, How to run LibrePortal commands walks you through it from scratch.

You never have to use the command line after installing. But it's there for everything the WebUI does, and it's the way back in when the WebUI won't load. It's also handy for scripts, and for doing ten things at once over SSH.

Running it#

LibrePortal's command is libreportal, and it only ever runs as the libreportal user. On the server:

sudo -u libreportal libreportal help

If you leave off sudo -u libreportal, it refuses: "This script should ONLY be run as: libreportal". That's deliberate. The libreportal user can only do the few jobs on the machine it's been given, so running as it keeps the command to those.

Every command starts by printing the LibrePortal banner and a couple of notices, like the operating system it detected. Then comes the command's own output.

libreportal help <group> shows the commands in one group, with a line on each. For example:

sudo -u libreportal libreportal help update
Available Update Commands:

  libreportal update                      - Interactively check for and install updates
  libreportal update check                - Refresh the out-of-date status (no install)
  libreportal update apply                - Non-interactively update to the latest version

Over SSH, avoid anything that asks a question

A few commands stop and wait for an answer, like plain libreportal update. Over SSH or from a script, nobody's there to answer, so use the version that doesn't ask (update apply), or --yes where a command offers it. And wrap long commands in timeout, so a dropped connection can't leave one hanging: timeout 900 sudo -u libreportal libreportal update apply.

Many commands don't do the work themselves: they queue a task, exactly as the WebUI does, and the task runs in the background. You'll see it on the Tasks page with its full output, the same as if you'd pressed the button.

When the WebUI won't load#

These three get you back in:

Command What it does
webui login show Print the WebUI username, password and every address it can be opened at.
webui login reset Make a new random username and password, restart the WebUI, and print them.
webui repair Put the WebUI back on plain http://, for when a browser refuses its HTTPS certificate.

And if you've locked yourself out by limiting who can reach the WebUI, security lockdown off opens it again. Troubleshooting has more.

app: installing and running apps#

Command What it does
app list available / app list installed What you can install, and what's installed with its ports and addresses.
app install <app> Install an app. Options: --access=private|public, --with=<app> for a companion, --storage=<location>, --extras=<id,id>.
app install <app> 'CFG_KEY=value' Change a setting and reinstall, like Update Configuration.
app uninstall <app> Remove an app and its data. Its backups are kept. Add --delete-images or --delete-tasks to tidy up more.
app start <app> / app stop <app> Start or stop it.
app restart <app> [service] Restart it, or just one of its services.
app status <app> Is it running?
app move <app> <location> Move its data to another disk. See Disks and storage.
app export <app> / app import <file> Make, or load, a single .lpapp file of one app.
app tool list <app> / app tool <app> <tool> List an app's tools, or run one. See Tools and add-ons.
app extras <app> / app extras <app> add|remove|set <id,id> See an app's extras, or change them. See Choosing extras.
app integrations [app] [check] Which apps work together, and check them. See Apps that work together.
app add <name> Add an app from a catalogue.

For example, installing Stalwart with its webmail companion, private to your places:

sudo -u libreportal libreportal app install stalwart --with=snappymail --access=private

instance: more than one copy#

Command What it does
instance create <app> <name> Make another copy of an app, like nextcloud_work. Add --local to keep it private, on its own port.
instance list [app] Every copy, or just one app's.
instance remove <app_name> Remove a copy, and its data.

See More than one copy of an app.

backup and restore#

Command What it does
backup all Back up every app, then LibrePortal's own settings.
backup app create <app> Back up one app now.
backup app list <app> List an app's snapshots.
backup system Back up LibrePortal's own settings only.
backup location list / backup location stats Your backup locations, and how much each holds.
backup verify Read back a sample of what's stored and check it's intact.
restore app list <app> The snapshots you can restore.
restore app start <app> [snapshot] Restore an app, from the newest snapshot unless you name one.

See Backups and restore.

update and updater: keeping things current#

update is for LibrePortal itself; updater is for your apps.

Command What it does
update check Is there a new LibrePortal release?
update apply Install it, without asking.
updater check Refresh every app's version and vulnerability data.
updater apply <app> Update one app, with a snapshot first and a rollback if it fails.
updater apply-all [a,b] Update several apps, each snapshotted first.
updater upgrade <app> Move an app to a newer version, one step at a time. --dry-run shows the plan.
updater rollback <app> Put back the snapshot from before the last update.

See Updates.

system: the machine#

Command What it does
system status A quick health check: Docker, the WebUI and crashing apps.
system check [--details] The installer's checks again: operating system, memory, disk, network and ports.
system swap [apply] Show swap, or make it match the Swap setting.
system reclaim Free disk space taken by Docker's build cache and images nothing uses.

system status is the first thing to run when something seems wrong:

Docker:       reachable
WebUI:        running, port 4821, reachable
Crash loops:  0
Checked:      2026-09-30T09:12:44+01:00

storage: disks#

Command What it does
storage scan Every disk on the machine, and whether it can hold app data.
storage list The locations you've registered, and whether each is mounted.
storage add <folder> <name> Register an empty folder on a disk.
storage remove <id|path> Unregister it, once no apps are left on it.
storage fstab-add <mountpoint> Make a disk mount itself when the machine starts.
storage relocate <system|containers> <path> Move one of LibrePortal's own folders to another disk.

See Disks and storage.

security: who can reach what#

Command What it does
security status What's open, to whom.
security app <app> private Make an app private (or public).
security confirm Confirm an access change from the new way in, so it isn't undone.
security lockdown off Turn the WebUI's access limits off, if you've locked yourself out.
security device list The devices on the LibrePortal VPN.

See Who can reach what and The LibrePortal VPN.

The rest#

Group For
https The server's HTTPS mode: https status, and switching between off, self-signed and a domain. See Domains and HTTPS.
fastpath Fast downloads: fastpath status, on, off. See Fast downloads.
domains check [name] Whether a name really points at this server.
notify test Send a test message to every notification channel you've switched on. See Notifications.
ssh SSH keys and password logins for the server.
firewall status What the firewall is letting through.
artifact Improvements: list, apply and revert them.
catalog Where catalogue apps come from.
config update Write settings without applying them. Most of the time you want app install <app> 'CFG_KEY=value' instead.

Commands in the help that aren't listed here are mostly for LibrePortal's own use, or for people working on it.

Next steps