Skip to content
aeon022Public

About

Orbiter on any PHP host — admin, live API, backups and signed one-click updates (PHP 8.1+, SQLite, no Node)

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

Lander

Lander — Orbiter on any PHP host


License: MIT PHP SQLite Part of Orbiter

Orbiter on ordinary PHP hosting. Orbiter stays in orbit (Node). Lander sets down on any web host with PHP 8.1+ and SQLite: the same admin, the same SQL file (.pod), no Node, no build server.

orbiter.sh/lander · Docs · Orbiter

The Lander admin in Station mode


Why Lander?

Orbiter is a single-file CMS for Astro that runs on Node. A lot of real-world hosting (shared hosts, cPanel, World4You, Strato, IONOS) offers PHP only. Lander gives editors the same admin there, while your site reads the content from a live API: edit, save, it is on the site. No rebuild for anything the site fetches at runtime.

The content lives in one SQL file (content.pod, a plain SQLite database, only renamed). Copy it between Orbiter and Lander and the site moves with it.

Features

  • The real Orbiter admin: Station mode, themes, dock, editor and media library, served as static files and backed by a PHP API with the same paths and JSON shapes.
  • Live read API: /api/public/<collection>[/<slug>] with CORS for your sites and a short cache (10 s by default). Image, file and media fields are resolved to { id, url, alt, type }.
  • Image variants: /api/public/media/<id>?w=800&ar=16:9&fmt=webp, resized, cropped around the focal point and re-encoded (GD), cached on disk. Sizes, ratios and formats snap to fixed sets, so the cache stays bounded.
  • Markdown import: .md with frontmatter through Admin → Import or bin/lander import-md.
  • Media as files: uploads go to public/media/ (this folder is not part of the release ZIP, so unpacking a release over your install cannot overwrite your uploads; never "replace" the folder by hand) (JPG, PNG, WebP, GIF, AVIF, PDF, audio and video; real file type checked, PHP execution blocked there).
  • Music and video: MP3, M4A, AAC, OGG, WAV, FLAC, MP4, WebM and MOV upload as media files and are served with range requests (Safari can seek). New installs allow 40 MB per upload (max_upload_mb).
  • Made for phones and tablets: dock labels, drawers as floating panels, list rows with a "⋯" menu and swipe actions, 44 px touch targets, a pulsing unsaved dot, preview in a sheet, an installable admin (web-app manifest, iOS meta tags, safe areas). The admin is German by default (Settings → Admin language).
  • Preview: meta site.preview (for example {"events": "/events/?vorschau={slug}"}) and site.url: a Preview button in the editor opens the real page of your site, drafts included while you are signed in.
  • Quick-create and copy: the "new entry" dialog asks for the list columns and can publish right away; Copy with a new date duplicates an entry and renames its slug. Relation fields can be single-choice (multiple: false) and show a dropdown.
  • Editor role: editors get a short dock (no schema, users, build, import); the server refuses those actions with 403.
  • A dock that glides, and quick pages: one glass pill follows the cursor (spotlight, aurora ring on the active item), draft badges, pages swap in place with a soft transition, the dock is drawn from a cached answer, scripts and styles carry ?v= and are cached for a year (needs mod_rewrite + mod_headers; works without), "recently visited" in the command palette.
  • Installer: open install.php once. It detects subfolder or domain root, writes the config, creates the first admin and deletes itself.
  • Subfolder or subdomain: example.at/lander/ works as well as redaktion.example.at.
  • Backup, restore, move: automatic weekly backups, download as SQL file or ZIP with media, restore with validation, bin/lander backup for cron.
  • One-click update: the admin tells admins when a newer release is out and can install it with one click. Every release ZIP is signed (Ed25519) and checked against the key built into Lander before anything is written. A backup of the pod and the code is saved first (data/update-rollback/). Needs the PHP zip and sodium extensions; otherwise you replace the files by hand.
  • Users: admins add editors and admins in the admin (Users page): create, change role, reset password, delete.
  • Inbox: form submissions server-to-server with a token.
  • Two-factor sign-in (TOTP): Settings → Security. Works with Google Authenticator, 1Password, Aegis; eight one-time recovery codes; codes cannot be replayed; failed codes are throttled per account.
  • Digi-ID (DigiByte wallet) sign-in: link a DigiByte address under Account, then scan the QR code on the login page. Passwordless and bound to your domain; the password login stays. Needs the PHP gmp or bcmath extension and a public HTTPS address.
  • Webhooks and build trigger: on publish, Lander can call a build webhook (Netlify, Vercel, GitHub Actions: Settings → Build) and any number of signed webhooks (publish, delete; HMAC-SHA256, delivery log). Your Astro site rebuilds itself when an editor publishes.
  • Strict Content-Security-Policy on the admin: the admin pages are served through PHP with a one-time nonce on every script and a policy that blocks injected scripts and inline handlers.
  • Hardened: CSRF origin check, login throttling, escaped output, validated uploads, admin-only meta writes, request size limits. Sessions are HttpOnly, SameSite=Strict cookies.

Quick start

On a web host

  1. Upload the folder to your host, either into a subfolder of your site (example.at/lander/) or onto a subdomain whose document root is public/.
  2. Open install.php in the browser (example.at/lander/install.php). Pick the admin name and password. The installer checks PHP, detects where it lives, writes lander.config.php, creates the pod and adapts the admin paths. Then it deletes itself.
  3. Sign in at /login.html under that location. Done.

In a subfolder, the .htaccess in the Lander folder routes everything to public/, so src/, data/ (the SQL file) and lander.config.php are never reachable from the web. This needs Apache with mod_rewrite and AllowOverride All, which almost every host has. On Nginx, block everything outside public/ yourself.

Locally with Docker

cp lander.config.example.php lander.config.php
docker compose up -d                       # PHP 8.3 + Apache on http://127.0.0.1:8088
docker compose exec -u www-data lander php bin/lander user <name> admin
docker compose exec -u www-data lander php bin/lander collection blog "Blog"

Connect your website

// Runtime, always current:
const events = await fetch('https://redaktion.example.at/api/public/events').then(r => r.json());

// Build time (SEO, Astro): fetch the same URL in the page frontmatter.
// Responsive image from the media library:
//   https://redaktion.example.at/api/public/media/<id>?w=800&ar=16:9&fmt=webp

Add your site's origin to public_origins in the config so browsers may read the API.

Backup, restore, move

  • Automatic: after an admin signs in, Lander writes data/backups/auto-<date>.pod when the newest one is older than auto_backup_days (7) and keeps auto_backup_keep (8). No cron needed.
  • Cron or by hand: php bin/lander backup [--media] [--keep=N] (--media makes a ZIP with the images).
  • In the admin: Settings → Pod → Backup & restore. Restore checks the file (SQLite, integrity, required tables, at least one admin), keeps the current pod as data/before-restore-*.pod (last three), unpacks media (images and PDF only, real file type checked) and rewrites media paths for the new host. You are signed out afterwards.
  • Moving: restore on the new host, or install fresh and restore. Switching between subfolder and subdomain: php bin/lander rebase /lander (or rebase / for the root).
  • Backups contain password hashes: keep them private. Restore is limited by max_restore_mb and by PHP's upload_max_filesize / post_max_size.

Command line

Command What it does
bin/lander user <name> [admin|editor] create a user (password from the prompt or LANDER_PASSWORD)
bin/lander passwd <name> set a new password
bin/lander collection <id> <label> [singleton] create a collection
bin/lander import-md <collection> <folder> [--overwrite] import Markdown files with frontmatter
bin/lander import-media <folder> <media-folder> add files to the media library
bin/lander backup [--media] [--keep=N] write a backup to data/backups/
bin/lander rebase [/subfolder] adapt the admin paths to a folder

Configuration

lander.config.php (the installer writes it; lander.config.example.php is the template). It lives outside public/.

Key Meaning
pod path of the SQL file (Orbiter format)
data_dir rate-limit files, backups, image cache
media_dir, media_url where uploads are stored, and their public path or full URL
base_path '' for a domain root, '/lander' for a subfolder
max_upload_mb, max_restore_mb upload and restore limits (new installs: 40 MB uploads, for music and video)
auto_backup_days, auto_backup_keep automatic backups (0 days = off)
public_cache_seconds how long browsers and proxies may reuse /api/public/... answers (default 10; 0 = no cache): edits go live after at most this long
update_check ask GitHub (at most every 12 h) whether a newer release exists, show a hint and the “Update now” button in the admin; false = never connect and no update button
form_token accepts form submissions (POST /api/form/{id}, header X-Lander-Token)
public_origins sites that may read /api/public/... from the browser (CORS)

Lander and Orbiter

Orbiter Lander
Runtime Node (Hono) PHP 8.1+ (PDO SQLite)
Hosting VPS, local, desktop app any PHP shared host
Media in the pod or S3 files in a folder
Passwords scrypt PHP password_hash (an Orbiter admin needs bin/lander passwd after a move)
Admin, editor, import, inbox, backup, users (admin/editor), 2FA (TOTP), Digi-ID yes yes
reviewer role, per-collection limits, review workflow, analytics, form builder yes not yet

Lander is young and in use on a first live site. Expect rough edges and a growing feature list. Issues and pull requests are welcome.

Part of Orbiter

Lander is the PHP port of the Orbiter admin. The UI comes from Orbiter and the .pod schema never diverges, so a pod moves between the two. Docs live at orbiter.sh/docs, Lander's page at orbiter.sh/lander.

If it saves you time, you can support the project.

License

MIT. See LICENSE.

About

Orbiter on any PHP host — admin, live API, backups and signed one-click updates (PHP 8.1+, SQLite, no Node)

Topics

Resources

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages