Booking (easyappointments)
Booking on a Self Host Wizard box: the easyappointments piece, served at book.<apps domain>, forward sign-in, memory limit 145 MB.
At a glance
| Field | Value |
|---|---|
| Address | https://book.<apps domain> |
| Sign-in | forward: Caddy asks Authelia before the app sees a request (forward auth) |
| Memory limit | 145 MB (ram_mb: measured peak × 1.3) |
| Database | mariadb |
| Needs | lldap, authelia, mariadb |
| Needed by | nothing |
| Containers | easyappointments |
Image: easyappointments | alextselegidis/easyappointments:1.6.1@sha256:6d3a927dc16db11827018bcbc708e6ee7d4be7f577e5d0967e90a1b08b71e2e0 |
| Open without sign-in | /index.php /index.php/booking /index.php/booking/* /index.php/booking_confirmation/* /index.php/booking_cancellation/* /index.php/captcha /index.php/captcha/* /index.php/localization/* /index.php/consents/* /index.php/privacy/* /assets/* |
| Set-up script after start | scripts/post-up.sh, every 5m |
| Licence (from the README) | GPL-3.0 |
| Upstream (from the README) | https://easyappointments.org |
Turn it on
thx enable adds easyappointments and everything it needs to the box's state; thx apply then installs it. Apps are applied only once site_domain is set.
sudo thx enable easyappointments
sudo thx apply
Engineering notes (pieces/easyappointments/README.md)
Easy!Appointments 1.6.1, GPL-3.0. Customers book an appointment
with a provider for a service on a public page. Staff manage calendars, services, working plans and
customers. Image alextselegidis/easyappointments:1.6.1 (Apache + mod_php), pinned by index digest
sha256:6d3a927d…2e0, which is also latest and 1.6.1-php2shell-fix. The index has
linux/arm64 (docker buildx imagetools inspect, 2026-11-25). We pull the upstream image
unmodified and ship compose plus four scripts.
The public booking link is **https://book.<apps_domain>/index.php/booking**. The bare / cannot
be public (docs/pieces.md), so it goes to the staff login.
How it is wired
- Login: Caddy forward auth (
auth = "forward"), with the booking pages public (forward.public_paths). Easy!Appointments has no OpenID Connect. Its own LDAP login binds to LLDAP directly, so it would skip the box's suspension (Authelia's job);scripts/Thx.phpforces it off. Staff sign-in:
scripts/Login.phpreplaces the app's Login controller (bind-mounted read-only):- It reads
Remote-User,Remote-Email,Remote-NameandRemote-Groups, and signs that person in. - It finds them by username: org members already have the provider record
thx convergemade (below). Anyone else is created at their first sign-in with a random password nobody knows. LLDAPadminsbecome admins; everyone else becomes a provider with the company's default working plan. - It refuses
<uid>+booking(a box admin's booking record, below) with 403. - Name, e-mail and role are re-synced at every sign-in.
- The password form's endpoint (
login/validate) answers 403. - Trusting the headers is safe only because Caddy replaces them and no other piece shares this
piece's network (docs/pieces.md §4). Caddy strips client-sent
Remote-*on the public paths, and the test proves a forged header gets nobody in.
- It reads
Entrypoint:
scripts/entry.shruns through/bin/sh, because scripts/ lands 0644.- It runs the image's own entrypoint minus its last line, which writes
config.phpandemail.phpfrom the environment. If upstream ever changes that last line, it refuses to start. - It runs the app's
console migrateaswww-data, retrying for a minute while MariaDB starts. The schema therefore exists before Apache answers, and nobody ever sees the web installer. - It runs
index.php thx settings(scripts/Thx.php, CLI only). This sets company name, e-mail, link and time zone from the box, but only while they are empty, so the admin's edits stick. It also keeps LDAP login off. It needs no LLDAP, so Apache never waits for it. - It execs Apache.
- It runs the image's own entrypoint minus its last line, which writes
- post_up (
scripts/post-up.sh, every 5 minutes and after each apply): runsindex.php thx convergein the container, which issettingsplus the people sync below. The LDAP bind (THX_LDAP_*) is passed to that onedocker compose exec, not kept in the container's environment. It printschangedonly when it changed something. - Mail:
THX_SMTP_HOST:THX_SMTP_PORTwith no auth and no TLS, fromTHX_MAIL_FROM("Booking"). Confirmations go to the customer and the provider. - Storage: MariaDB from the box (
db = "mariadb"). Onlystorage/uploadslives inTHX_DATA. Sessions, logs and cache stay in the container: a bind mount would hide the image's deny-all.htaccessin those folders, and the test proves they answer 403. A recreate therefore signs staff out (they are signed straight back in from Authelia) and drops the app log. XDEBUG_MODE=off: the image ships Xdebug.
Who is bookable
The booking page works out of the box. Before anyone signs in, thx converge reads LLDAP with the
read-only bind and:
- Creates the service "30-minute meeting" (30 min, price 0, 1 attendant, 15-min slots) once.
Setting
thx_default_serviceremembers it. An admin who renames, edits or deletes it is not overridden. - Makes every **member of any
org-<org>group** bookable. People who are only inorg-*-adminsorteam-*are not. Neither are members ofsuspendedorlldap_strict_readonly, noradminorthx-readonly. Each gets a provider record with the company working plan (Easy!Appointments' default: every day 09:00–18:00, break 14:30–15:00; change it in Settings → Business) and the default service, once. - Gives a box admin (LLDAP
admins) who is an org member a second, provider-only record<uid>+booking: they sign in as an Easy!Appointments admin, and admins are never bookable. Nobody signs into it (+is not allowed in a box uid, and Login.php refuses it). It has their name and e-mail, so booking mail reaches them, and their admin login sees its calendar. - Adopts a provider whom Login.php created earlier, and gives them the default service if they have no service at all.
- Takes a person who leaves every org, is suspended or is deleted from LLDAP *off the booking
page*. It removes their service assignments and remembers them, so they come back if the person
returns. Their record and appointments stay. Deleting a provider in Easy!Appointments would
delete their appointments (foreign key
ON DELETE CASCADE), so thx never deletes one. - Keeps name and e-mail of its provider records in step with LLDAP, as Login.php does at sign-in.
- Leaves alone what the admin changed: a provider's services are assigned once and never again. A provider record the admin deleted, or whose role the admin changed, is never recreated.
The state is in setting thx_people (username → bookable, parked service ids, or left alone).
A role change in LLDAP shows at the person's next sign-in, as before. Until then, a former box admin who still has an admin record is reported on stderr and not made bookable.
How far org separation got
Not at all, by decision: one company per box. Easy!Appointments is single-company: one booking page, one company name, and one set of services and providers. The members of every org appear on the same public page, all with the same default service. Orgs are not mapped to anything (service categories would only group services, not providers). A box whose companies each want their own booking page needs one instance per company, which the piece model does not offer.
Other limits:
- Providers see only their own calendar, and admins see everything. A secretary role exists in the app, but no LLDAP group maps to it.
- A role changes at the person's next sign-in, not before.
- The app's REST API (
/index.php/api/v1/*) sits behind forward auth, so it cannot be used from outside. - Logging out of Easy!Appointments does not log out of Authelia, and the next visit signs the person
back in. Log out at
auth.<apps_domain>.
Test (./test.sh)
HEAVY_CLASS=check ~/.cache/run-heavy.sh 2G pieces/easyappointments/test.sh. The limit bounds only
the test process. testkit/thxtest.py is the lane stack: LLDAP, Authelia, Caddy with a test CA and
the box's forward-auth route, public paths with the Remote-* strip, MariaDB, and Mailpit as
stalwart. scripts/ lands 0644 as on the box.
It proves:
- The container gets healthy, the installer redirects away (the app is installed), the thx settings are in place, and no user exists before post_up.
- The first post_up prints
changed, and the second prints nothing. Before anyone signs in, alice, ann, bob (org members) andboss+booking(box admin boss) are providers with the default service and a working plan. sue (suspended), nemo (no org) and the bind user are not, and nobody else exists. The public page's data lists exactly that service and those providers. An anonymous customer books ann, who never signs in. A forged sign-in asboss+bookinggets 403. storage/sessions,storage/logsandstorage/cacheanswer 403.- Without an Authelia session,
/, the calendar, the login and the API go to Authelia, and forgedRemote-*headers do not help. The booking page answers 200. The password form endpoint goes to Authelia too. - boss (admins) becomes admin and alice becomes provider, on the same record post_up made for her (no duplicate). Once signed in, the password endpoint answers 403, and alice cannot open the services admin.
- boss creates a service and assigns it to alice.
- An anonymous customer gets free hours and books. The confirmation page answers 200, the row is in
the database, and mail reaches the customer and alice from
THX_MAIL_FROM. - boss renames the default service and has replaced alice's services. post_up is quiet and changes neither.
- ann is suspended, bob leaves beta and nemo joins it. post_up drops ann and bob from the public page (records and ann's appointment kept). It adopts nemo, whose record Login.php made when he signed in before joining, and gives him the default service. When bob rejoins, his services come back.
- boss deletes the default service and nemo's record. post_up recreates neither.
uploadsis inTHX_DATA.- 24 parallel visitors load the booking page 72 times while a post_up runs (quiet).
- There is no OOM kill.
Measured
RAM, dev PC (amd64), measured over the whole test. Sampled from the cgroup every 0.25 s, page cache excluded.
- Without the parallel burst, peaks were 43, 35 and 39 MiB. Apache prefork forks a child per concurrent request, so a one-at-a-time test under-measures it.
- With the burst of 24 parallel visitors, three runs (office3 lane, 2026-11-25) peaked at 100, 107 and 96 MiB.
- With a post_up (
thx converge, one PHP CLI process in the same cgroup) running during that burst, three runs (home2 lane, 2026-11-25) peaked at 104, 100 and 111 MiB.
ram_mb = 145 (111 × 1.3, rounded up), with mem_limit: 145m. The final run under 145m passed
with no OOM kill.
Apache allows up to 150 workers by default, so a much larger burst could exceed the limit. The kernel would then kill one Apache child, not the container. Re-measure on the box under real traffic.
Known gaps
- Single company per box (above).
- Google/CalDAV calendar sync is not configured (it needs per-provider OAuth credentials).
- The booking page's captcha is off (the app default). Turn it on in Settings → Booking if bots appear.