Skip to content

Mini Panel v1.2.0

Choose a tag to compare

@github-actions github-actions released this 18 Nov 07:01
· 34 commits to main since this release

Added

  • Update the panel from the interface (Settings, Updates) or with mpn update -apply. Each release's SHA256SUMS is signed with minisign, and the panel accepts only a release whose signature matches the key built into the program. The signed comment names the version, so an old release cannot be passed off as a new one. The running program is kept as /usr/local/bin/mpn.prev and put back if the panel does not answer after the update.
  • Off-site backup copies now go through rclone: Google Drive, S3 (Cloudflare R2, AWS, Wasabi…), Backblaze B2, SFTP, WebDAV (Nextcloud, ownCloud) and FTP/FTPS. A connection is saved only after the panel has written, read back and deleted a test file. The form passes rclone only the fields on a fixed list, so no option can run a command or read a file of the machine.
  • An option to see visitors' real addresses when sites are behind Cloudflare (Security, or mpn security cloudflare -on -apply). nginx takes the address from CF-Connecting-IP, but only on connections from Cloudflare's published networks. Off by default.
  • Installing MariaDB or MySQL also installs phpMyAdmin, so the Databases tab can open it straight away.
  • mpn panel migrate brings a machine installed by an older version to the configuration a fresh install writes. The installer and mpn update run it.

Changed

  • The panel listens on the Unix socket /run/mpn-web/web.sock, which systemd creates and keeps (mpn-web.socket), instead of 127.0.0.1:8780. Only nginx and phpMyAdmin (group mpn-front) can connect. The socket stays while the panel restarts, so no other program can take its place. The client address in X-Real-IP is trusted only when the panel listens on that socket.
  • New Node.js and Python sites (Debian, Ubuntu) listen on the Unix socket /run/mpn-app/<site>/app.sock and open no TCP port. Only nginx can connect. The socket path is in SOCKET, and PORT holds the same path, because Node.js's listen(process.env.PORT) accepts a path. An empty port field means the socket; a port number makes the app listen on 127.0.0.1 as before. Existing sites keep their port. On the RHEL family apps still use a port.
  • The setup page /setup opens only with a link that carries a one-time key. The installer prints it, the SSH login message shows it until the account exists, and mpn web setup-link prints it again. Before, whoever opened /setup first created the account.
  • Node.js is installed only when SHASUMS256.txt carries a valid signature of a Node.js releaser. It is checked with gpgv against 29 keys built into mpn, so neither nodejs.org nor a mirror can choose the keys. gpgv is in the base packages.
  • A backup's MANIFEST holds the SHA-256 of each file and an HMAC made with the machine's own key (/etc/mpn/backup.key, mode 0600). A backup downloaded from off-site storage must be signed by this machine, and each file must match its sum.
  • A hand-written vHost may not log outside /var/log/mpn/sites/<site>/, and directives that read files or affect the whole machine (include, load_module, ssl_certificate outside the site's certificate folders, *_temp_path, *_cache_path, user, pid…) are refused. nginx opens log files as root before it switches to the worker account.
  • Laravel gets DB_HOST=localhost (over the Unix socket), as WordPress and CodeIgniter already did.
  • The two-factor QR code is drawn by the panel's own code, replacing the unmaintained go-qrcode library.
  • Commands and operations that run as root create folders inside a site's home through open folder descriptors and never follow symbolic links, so the site account cannot use a symlink to point root at another file.
  • A database cannot be created with a name that belongs more closely to another site (for example blog_shop when a site blog-shop exists).
  • When too many sign-ins are waiting to hash a password, the panel answers 429 at once instead of queueing, so a password-guessing burst cannot take all the CPU.
  • The public source includes the tests, and GitHub Actions runs gofmt, vet, the tests and govulncheck on every push.

Upgrade notes

  • Backups made with 1.1.x are not signed, so they can no longer be downloaded from off-site storage. Backups stored on the machine restore as before.
  • A site whose hand-written vHost uses include or logs elsewhere reports an error at its next apply until that part is fixed.

Full Changelog: v1.1.1...v1.2.0