Repository navigation
Installation
This page installs ownpanel on a Linux server with systemd: one command downloads a release, checks it, installs ownpaneld and Caddy as services and prints how to open the panel.
The installer, the setup steps, publishing, updates and backup/restore have been tested on a real server (Ubuntu 24.04, amd64) and in systemd containers (arm64). ownpanel is still early: try it on a throwaway machine first.
- A server with Debian 12+ or Ubuntu 22.04+, systemd, amd64 or arm64, and a public IPv4 and/or IPv6 address.
- To build sites on the server: Debian 12+ or Ubuntu 24.04+ and at least 12 GB of free disk space (see Building sites). On other systems everything else works and the panel says why builds are not available.
- Root access.
- Ports 80/tcp and 443/tcp reachable from the Internet.
- A domain you control, for the panel itself (optional) and for your sites.
curl -fsSL https://raw.githubusercontent.com/danielgtmn/ownpanel/main/install.sh | sudo bashWhen it is done, the installer prints:
- the address to open,
https://<public address of the server>/. The panel has no domain yet, so it uses a self-signed certificate: accept the browser's warning once. - the one-time setup code. Enter it in the panel, create the first administrator, then follow the setup steps: they ask for the panel's domain, the server's public addresses and the e-mail address for certificates.
The setup code is only valid until the first administrator exists. Show it again with sudo cat /var/lib/ownpanel/setup-code.
On an upgrade or a second run, once an administrator exists, the installer just tells you to open the panel at its usual address: the domain set in the panel (or with --panel-domain, which it then names), and https://<server address>/, which leads there.
To set everything up front without the browser, pass the options (all optional):
curl -fsSL https://raw.githubusercontent.com/danielgtmn/ownpanel/main/install.sh \
| sudo bash -s -- --panel-domain panel.example.com --server-ip 203.0.113.5 --acme-email you@example.comThe installer never asks questions, except to confirm --uninstall --purge.
| Option | Meaning |
|---|---|
--channel stable|nightly |
Release channel, see below. Default stable; upgrades keep the channel you chose. |
--version vX.Y.Z |
Install exactly this release. Wins over --channel. |
--panel-domain HOST |
Serve the panel on https://HOST. Sets -panel-domain. |
--server-ip ADDR |
Public IPv4/IPv6 address domains should point at. Repeat it or separate with commas. Sets -server-ip. |
--acme-email ADDR |
Contact address for the certificate authority. Sets -acme-email. |
--from-dir DIR |
Install from an unpacked release directory instead of downloading, e.g. on a server without Internet access. |
--no-builds |
Do not set up building sites on this server; upgrades keep it off. Stops the build service if it runs. |
--builds |
Set it up again after --no-builds. |
--build-disk SIZE |
Disk space reserved for builds, e.g. 20G. Default: 15 % of the disk, at least 8 GB, at most 32 GB, and never so much that less than 4 GB stay free. Changing it later makes a new build disk (the build caches are lost). |
-y, --yes
|
Do not ask for confirmation (only --purge asks). |
--uninstall |
Remove services and binaries, keep data and settings. |
--purge |
With --uninstall: also delete all data, settings, the users and the group ownpanel-mail-web. |
-h, --help
|
Show the options. |
| Channel | What it is |
|---|---|
stable |
Versioned releases (v1.2.3), made when main is merged into the release branch. The default. |
nightly |
An automatic build of main, made after every merged pull request that changes the program. For testing, not for production. |
Both are built by the Publish workflow (.github/workflows/release.yml) with scripts/package.sh and published as GitHub releases: stable releases under their tag, the newest one marked "latest", the nightly as the prerelease nightly, which is replaced by every new build. Each release has an archive per architecture, ownpanel_<version>_linux_<arch>.tar.gz, and checksums.txt. The installer refuses an archive whose SHA-256 does not match checksums.txt. How releases are made: Development.
Switch channels by running the installer with the other --channel; it is stored in /etc/ownpanel/release.
Download the archive for your architecture and checksums.txt from the releases, check and unpack it, and run the installer that comes in it:
sha256sum --ignore-missing -c checksums.txt
tar -xzf ownpanel_v1.2.3_linux_amd64.tar.gz
sudo ./ownpanel_v1.2.3_linux_amd64/install.sh --from-dir ./ownpanel_v1.2.3_linux_amd64To build an archive yourself: make package VERSION=v1.2.3 (or scripts/package.sh v1.2.3 amd64) writes it to dist/. It needs Go, Node.js and curl; Caddy is downloaded from its official release and checked against a pinned SHA-512.
- Open
https://<server address>/. Until the panel has a domain, Caddy serves it there with a certificate from its own internal authority, so the browser warns once; accept it. Plainhttp://redirects tohttps://. - Enter the setup code and create the first administrator.
- The setup steps ask for the panel's domain, the server's public addresses (the machine's own addresses are suggested) and an optional e-mail address for certificates. They are saved in the panel and take effect at once. The step shows whether the domain already points at the server and whether a trusted certificate is served for it.
- Finish the setup. With a domain set,
https://<server address>/(andhttp://) from then on redirect tohttps://<panel domain>/. Without a domain the panel stays reachable by address, with the self-signed certificate.
Values given as installer options (--panel-domain, --server-ip, --acme-email) become flags and win: the panel shows them as locked. Admins can change all other values later in the panel settings.
| Item | Details |
|---|---|
User caddy
|
system user, home /var/lib/ownpanel-caddy/home, shell /usr/sbin/nologin; added to the group ownpanel-mail-web
|
User ownpanel
|
system user, home /var/lib/ownpanel, shell /usr/sbin/nologin; added to the groups caddy and ownpanel-mail
|
User ownpanel-mail
|
system user with its own group, home /var/lib/ownpanel-mail, shell /usr/sbin/nologin
|
Group ownpanel-mail-web
|
system group of the mail service's web socket; caddy is a member (and ownpanel-mail.service through SupplementaryGroups=) |
/usr/local/bin/ownpaneld, /usr/local/bin/caddy
|
the binaries (mode 0755); an existing /usr/local/bin/caddy is replaced |
/etc/systemd/system/ownpaneld.service |
the panel daemon, runs as ownpanel
|
/etc/systemd/system/ownpanel-caddy.service |
Caddy, runs as caddy
|
/etc/systemd/system/ownpanel-mail.service |
the mail service, runs as ownpanel-mail
|
/var/lib/ownpanel-mail |
the mail service's data (created by systemd), owned by ownpanel-mail, mode 0700 |
/var/lib/ownpanel |
data directory, owned by ownpanel (0755). Root never creates or changes anything in it during an install or update (see Security) |
/var/lib/ownpanel-caddy |
Caddy's own directory, owned by caddy, mode 0700: certificate storage in storage, its home in home
|
/etc/ownpanel/caddy-bootstrap.json |
Caddy's start configuration (only the admin socket) |
/etc/ownpanel/ownpaneld.env |
the daemon's flags, see below |
/etc/ownpanel/release |
installed version and channel |
/usr/local/lib/ownpanel/ |
update.sh, a copy of install.sh (update.sh uses its functions) and ownpanel-update, the root-side worker for updates from the panel |
/etc/systemd/system/ownpanel-update.{path,service,timer} |
updates from the panel and automatic updates, see Updating |
/var/lib/ownpanel-update |
the updater's directory, owned by root (0755) |
/var/lib/ownpanel-update/requests |
root:ownpanel, mode 1770: update requests from the panel and the update status |
/var/lib/ownpanel-update/backups |
root only: the backups made before each update (the last three) |
User ownpanel-build
|
system user with its own group and 65536 subordinate user and group ids (/etc/subuid, /etc/subgid), home /var/lib/ownpanel-build/home; ownpanel is in its group. Only when builds are set up |
/var/lib/ownpanel-build |
root (0755): home (the build user's, 0700), disk.img (the build disk, root 0600) and work (its mount point) |
/etc/systemd/system/ownpanel-build-setup.service, ownpanel-build.service
|
the root unit that mounts the build disk and sets the packet filter for builds, and the build service (runs as ownpanel-build), see Building sites
|
/etc/systemd/system/ownpanel-build-resolvers.{path,service} |
sets the packet filter and the name servers for builds again when the server's name servers change |
/etc/systemd/system/nftables.service.d/ownpanel-build.conf |
puts the packet filter for builds back when nftables restarts |
/etc/ownpanel/build.env |
the build settings (Configuration) |
/etc/ownpanel/builds |
whether builds were set up, and why not; the panel reads it |
Versions before this layout kept Caddy's directories, the update requests and the backups inside /var/lib/ownpanel. The first update or install of a version with this layout moves them to the places above and leaves links at the old names, so a rollback to the previous version still finds them; nothing run as root uses those links.
The services are enabled and started. The installer waits until the panel answers on 127.0.0.1:8600; if it does not within 60 seconds, it shows the daemon's log and fails.
Caddy's admin API is a Unix socket, never a TCP port, because on TCP every local user could rewrite the web server's config.
-
ownpanel-caddy.servicehasRuntimeDirectory=ownpanelwith mode 0750, so systemd creates/run/ownpanelascaddy:caddy. -
caddy-bootstrap.jsonmakes Caddy create the socket/run/ownpanel/caddy-admin.sockwith mode 0660, owned by the groupcaddy. - The user
ownpanelis a member of the groupcaddy, so ownpaneld can connect. Other local users can neither enter the directory nor open the socket. - Caddy's own data directories are 0700, so the group membership gives
ownpanelnothing else.
The mail service's admin socket works the same way: /run/ownpanel-mail/admin.sock in a directory of the group ownpanel-mail (0750), socket mode 0660, and ownpanel is a member of that group.
The mail service has a second socket for Caddy: /run/ownpanel-mail-web/web.sock, where Caddy passes the mail server name's account pages (and later calendars and contacts). ownpanel-mail.service creates the directory with RuntimeDirectory= (0750); the service, a member of the group ownpanel-mail-web (SupplementaryGroups=), hands the directory and the socket (mode 0660) to that group (-web-group). Only caddy is a member of that group otherwise. Caddy is not in the group ownpanel-mail, so it can never reach the admin socket.
Both units set PrivateTmp, ProtectSystem=full and ProtectHome=true; ownpaneld.service also sets NoNewPrivileges. Caddy gets CAP_NET_BIND_SERVICE to bind ports 80 and 443. Caddy is started with --resume, so after a restart it serves the last config until ownpaneld pushes the current one. ownpanel-mail.service is hardened further (see the unit file).
Sites will be built on the server from their source (#58). The installer sets up the environment they run in; how it keeps builds away from the panel, other sites and the server is described in Security.
- It installs Podman (rootless containers),
uidmap,slirp4netns,nftables,quotaande2fsprogsfrom the distribution's packages. Debian 12 ships Podman 4.3, Debian 13 5.4, Ubuntu 24.04 4.9. Ubuntu 22.04 ships 3.4, which is too old: there the panel is installed as usual and builds are reported as unavailable. - It needs control groups version 2, user namespaces and loop devices. A server that is itself a container usually has no loop devices; builds are then unavailable.
- It creates the user
ownpanel-buildwith a range of subordinate ids, and/etc/ownpanel/build.envwith settings chosen from the server's disk and memory: one or two builds at a time, 4 GB of disk space per build (2 GB on small disks). -
ownpanel-build-setup.service(root) makes the build disk: a file of the chosen size in/var/lib/ownpanel-build, reserved in full, formatted and mounted with quotas. That space is taken from the server's disk at once, whether builds run or not. It also puts the packet filter for builds in place. -
ownpanel-build.service(userownpanel-build) then fetches the build images in the background (a few hundred MB); the panel shows "Getting ready to build sites" until they are there. It looks up the registry's name through the server's real name servers (behind systemd-resolved's local stub, which builds may not reach); when the registry cannot be reached at all, the panel says so and the journal (journalctl -u ownpanel-build) has the cause.
Nothing here can stop the install: if a step fails, the panel is installed and the reason is written to /etc/ownpanel/builds and shown in the panel's settings, under Building sites. Run the installer again after fixing it.
An update from the panel installs the packages through systemd-run, because the updater's own sandbox does not allow installing programs with set-user-ID bits (newuidmap).
Check it on the server:
systemctl status ownpanel-build-setup ownpanel-build
/usr/local/lib/ownpanel/ownpanel-build-setup status # packet filter and quotasownpaneld reads its flags from /etc/ownpanel/ownpaneld.env, the variable OWNPANELD_ARGS. A fresh install writes:
OWNPANELD_ARGS=-tls acme -caddy-admin unix:///run/ownpanel/caddy-admin.sock -mail-admin unix:///run/ownpanel-mail/admin.sock -mail-web unix:///run/ownpanel-mail-web/web.sock
(Upgrades of installs from before e-mail get -mail-admin added, those from before the mailbox sign-in page -mail-web.)
plus -panel-domain, -server-ip and -acme-email if you gave the matching options. The service starts /usr/local/bin/ownpaneld -data /var/lib/ownpanel $OWNPANELD_ARGS. See Configuration for all flags.
You can edit the file; apply a change with systemctl restart ownpaneld. The installer keeps your edits on upgrades and only replaces the flags you pass as options again.
If ufw is active, the installer allows 80, 443, 25, 465, 587, 993 and 4190 over TCP and says so. Otherwise it only reminds you; open them in your provider's firewall if it has one.
| Port | Used for |
|---|---|
| 80/tcp | HTTP: redirects to HTTPS, and certificate validation |
| 443/tcp | HTTPS for your sites, the panel domain, and the panel on the server's address during setup |
| 25/tcp | mail from other mail servers; also outgoing, which many providers block until asked ([[E-Mail |
| 465/tcp, 587/tcp | mail programs sending mail |
| 993/tcp | mail programs reading mail |
| 4190/tcp | mail programs editing the mailbox's filters ([[E-Mail |
Do not open port 8600; the panel listens on the loopback address only and Caddy reaches it from the same machine.
Point the panel domain at the server with an A record (IPv4) and/or AAAA record (IPv6), for example:
panel.example.com. A 203.0.113.5
panel.example.com. AAAA 2001:db8::5
The installer prints these records for the addresses it knows. The certificate is requested automatically as soon as the domain points at the server; nothing else to do.
If the installer finds no public address (for example behind NAT), it prints an SSH tunnel instead. On your computer:
ssh -L 8600:127.0.0.1:8600 root@<server address>Keep it open and browse to http://127.0.0.1:8600.
There are three ways, all ending in the same steps: look up the release, download and verify it, back up, install, restart, check, and roll back if the new version does not come up.
Settings → Updates shows the installed version and channel, the newest version of each channel with a link to its release notes, and a button Update to vX.Y.Z. For nightly builds the date is when the build was made. Before asking you to confirm, the panel looks for the newest version again, so it names the build that will be installed. After you confirm, the page shows the progress; the panel restarts in the middle, the page waits for it and reloads itself with the new version. Other open tabs of the panel reload themselves too as soon as they hear from it, before asking you to sign in again. Switching to the other channel works the same way; if that would install an older version (e.g. from a nightly build back to the last stable release), the panel says so and asks again.
The panel looks for new versions on GitHub at most every 30 minutes. If GitHub cannot be reached it says so, and nothing else is affected. Check for updates looks right away (at most once a minute) and the page shows when it last looked.
Updating from the panel only works for installations made with install.sh. In development (no /etc/ownpanel/release) the page explains that.
In the same place, turn on Install new versions automatically and choose a time window (server time, may cross midnight, e.g. 23:00–02:00). Once a day inside the window, a newer version of the installed channel is installed, with the same backup and rollback. Automatic updates always follow the installed channel; switching channels in the panel moves them along. Each result shows up in the activity log (update.result, marked "automatic").
sudo /usr/local/lib/ownpanel/update.sh # newest version of the installed channel
sudo /usr/local/lib/ownpanel/update.sh --check # only show installed and available
curl -fsSL https://raw.githubusercontent.com/danielgtmn/ownpanel/main/update.sh | sudo bash -s -- --yesInstallations made before the updater existed have no local update.sh and no update button yet: run the curl line once; it updates and sets up the updater, and from then on the panel can update itself.
| Option | Meaning |
|---|---|
--channel stable|nightly |
Channel to update from; default the installed one. |
--version vX.Y.Z |
Exactly this release (wins over --channel). |
--check |
Print the installed and the available version. Exit code 0: up to date, 10: an update is available, anything else: error. |
-y, --yes
|
Do not ask. When the script is piped in (curl … | sudo bash) it never asks and updates right away. |
--force |
Reinstall even if that version is installed. |
--from-dir DIR |
Update from an unpacked release directory (offline, tests). |
--status-file FILE |
Write the progress as it goes (the panel uses this). |
--no-rollback |
Leave a failed update in place (tests only). |
It refuses to run where ownpanel is not installed and never asks setup questions. The steps:
- Look up the release through GitHub's API (
/releases/latestfor stable,/releases/tags/nightlyor/releases/tags/vX.Y.Z) and print the version it holds. Nothing to do if that is the installed version. - Download
checksums.txtand the archive for this machine by asset id from that same answer, and check the archive againstchecksums.txtand itsVERSIONagainst what GitHub reported. Two builds are never mixed. The nightly is replaced in place by every new build: if its files disappear during the download, the nightly is looked up again and the build it holds now is downloaded instead (for a few minutes at most, then "try again in a few minutes"). With--version nightly-…the update fails instead and says that this build is no longer available. A connection that does not open within 15 seconds, or a download slower than 1 KB/s for 30 seconds, is given up after two retries instead of hanging. -
ownpaneld backupinto/var/lib/ownpanel-update/backups/(root only; the last three are kept). The database is copied by a process running asownpanel, so root never opens it. - Keep the current binaries, unit files,
caddy-bootstrap.json,ownpaneld.envandreleaseas*.previous. - Run the new release's
install.sh --from-dir <unpacked> --yes, so the file layout is only ever defined byinstall.sh. - Check that
ownpaneld versionprints the new version and the panel answers on its address within 60 seconds. - If not: put the
*.previousfiles back, restart, and report "rolled back" (exit code 3; 4 if even that failed, then restore the backup).
The database is not restored on a rollback: a new version may have migrated it. If the previous version does not work with it, restore the backup (Backup and Restore).
The update that converts the database. The first version that keeps the panel's data with ablage converts ownpanel.db once when it starts: ids become text (an existing record keeps its number, 42 becomes "42", so links and bookmarks keep working), times are kept in microseconds, and a few tables get new keys. Sign-in data (the auth_* tables) is taken over as it is: people stay signed in, and passwords, e-mail addresses, failed-attempt counts and reset links carry over. Before it changes anything it writes a copy of the database as it was, ownpanel.db.pre-ablage-<UTC time> (mode 0600, e.g. ownpanel.db.pre-ablage-20261126T120000Z), next to it in the data directory. The conversion runs in one transaction: if it fails, the database stays as it was and the next start tries again. Older versions cannot read the converted database, so a rollback past this version needs that copy: stop ownpaneld, remove ownpanel.db, ownpanel.db-wal and ownpanel.db-shm, rename the copy to ownpanel.db (owner ownpanel) and start the older version. Changes made after the update are lost then. Once the new version runs well, the copy can be deleted.
The panel runs as the unprivileged user ownpanel and never gets root. It only writes a small request into /var/lib/ownpanel-update/requests/request.json. ownpanel-update.path notices it and starts ownpanel-update.service (root), which runs /usr/local/lib/ownpanel/ownpanel-update: it moves the request out of the panel's reach, accepts exactly {"id": <32 hex digits>, "channel": "stable"|"nightly"} or {"id", "version": "vX.Y.Z"} and nothing else, and runs update.sh --yes --status-file /var/lib/ownpanel-update/requests/status.json with those values. ownpanel-update.timer starts the same service every 15 minutes for automatic updates, which reads auto.json (written by the panel) through the same strict checks. See Security.
On the server, journalctl -u ownpanel-update shows what the updater did.
An update may take at most 30 minutes; then systemd stops it. Whenever update.sh ends without a result (stopped, or an unexpected error) it reports the update as failed, so the panel never keeps showing it as running. Should even that not happen (the process was killed outright), the panel shows an update that has been running for more than 35 minutes as failed.
Running the installer again upgrades as well, without the backup and rollback of update.sh:
curl -fsSL https://raw.githubusercontent.com/danielgtmn/ownpanel/main/install.sh | sudo bashIt installs the newest release of your channel and lists what changes (version, Caddy, unit files, flags) before it stops both services, replaces the files and starts them again; sites are offline for a few seconds. If nothing changed, it leaves the services running. Your data in /var/lib/ownpanel and your ownpaneld.env are kept, except for flags you pass as options. The database schema is migrated when the daemon starts.
An early installer wrote OWNPANELD_ARGS=-tls acme (Caddy admin API on TCP); that is replaced by the current default, and a Caddy config saved by that version (autosave.json without a unix// address) is deleted, since ownpaneld pushes the full config again.
Back up before upgrading (Backup and Restore).
curl -fsSL https://raw.githubusercontent.com/danielgtmn/ownpanel/main/install.sh | sudo bash -s -- --uninstallThis stops and removes the services, the updater (ownpanel-update.* units and /usr/local/lib/ownpanel) and /usr/local/bin/ownpaneld and /usr/local/bin/caddy. It also removes the build service, its packet filter and the build disk /var/lib/ownpanel-build/disk.img (it only holds build caches and images). It keeps /var/lib/ownpanel (sites, database, certificates, secret key), /etc/ownpanel and the users, so installing again brings everything back. Podman and the other packages installed for builds are kept; remove them with apt-get remove if nothing else uses them.
To delete everything, add --purge. Run from a terminal it asks for confirmation; piped in (curl … | sudo bash) it needs --yes:
curl -fsSL https://raw.githubusercontent.com/danielgtmn/ownpanel/main/install.sh | sudo bash -s -- --uninstall --purge --yesThis deletes /var/lib/ownpanel, /var/lib/ownpanel-build and /etc/ownpanel and removes the users ownpanel, ownpanel-mail, ownpanel-build (with its subordinate ids) and caddy (the latter only if it was created for ownpanel). Back up first. Firewall rules and DNS records are not changed.
ownpanel: https://github.com/danielgtmn/ownpanel. This wiki is generated from the wiki/ folder in the repository; edit the files there, not in the wiki.
ownpanel
Get going
Using ownpanel
- Sites and Publishing
- GitHub Action
- GitHub
- Git repositories
- Users and Access
- DNS
- Redirects
- MCP
- API
- Backup and Restore
Background