Skip to content
RedAdultScript
Architecture

Built so that losing a site does not lose the fleet.

The interesting decisions are all about what each side is not allowed to do. Here they are, in the order they matter.

Hosted by us

Administration console

Every catalogue screen, every import, every job. Holds one signing key per instance and no copy of your catalogue.

Ed25519-signed
Yours
straight-tube.com
Straight
no admin panel
Yours
gallery-site.net
Galleries
no admin panel
Yours
third-site.tv
Animation
no admin panel

Reading this as a sentence: one hosted console signs each command with a keypair belonging to a single instance, and each instance — running on your own infrastructure, with no administrative interface of its own — verifies that signature before acting. Rotating a key cuts the console off from that instance at once, and a copy of its configuration signs nothing.

What a command actually is

When an operator hides a video, the console does not reach into a database. It builds a canonical description of the request, signs it, and sends it. The instance checks that signature before it does anything at all.

the signed string
RAS-ED25519-v1
<method>
<path>
<query, sorted by key>
<unix timestamp>
<single-use nonce>
<operator identity>
<sha256 of the body>

Everything that decides what the instance will do is covered. Headers are deliberately excluded — nothing carried in one may change a request's outcome.

Checked in this order

  1. 1 Remote administration enabled
  2. 2 Signing key configured
  3. 3 Protocol version
  4. 4 Key identity, in constant time
  5. 5 Timestamp inside the accepted window
  6. 6 Nonce well-formed
  7. 7 Operator identity well-formed
  8. 8 Signature verifies
  9. 9 Nonce burned — last

The nonce is spent last on purpose. Burn it earlier and anyone who can reach the port could consume nonces on the console's behalf, leaving the genuine command to be rejected as a duplicate.

How a release reaches your server

Your server runs an updater beside the site. It checks with the console every minute, and installs nothing the console has not signed — at the time one of your managers chose.

In this order

  1. 1 Offered by the console, with release notes
  2. 2 Scheduled by a manager — now, or at a chosen time
  3. 3 A running encode waited for (up to two hours) or interrupted
  4. 4 Release signature verified (Ed25519)
  5. 5 Every file checked against its checksum
  6. 6 Database snapshot taken
  7. 7 Installed, migrated and health-checked
  8. 8 Rolled back to the snapshot if a check fails

Two containers, split on purpose

The updater that talks to the console holds no Docker access. A separate helper holds it and carries out a fixed set of steps only, so a message from outside cannot become an arbitrary command on your server.

Never backwards by accident

An older release is never installed unless the console sends a sanctioned go-back — which is how a site leaves a release that was withdrawn, taking its pre-update snapshot with it.

Security fixes do not wait for ever

A security release that nobody schedules installs itself seven days after it is offered to every site. Managers are emailed beforehand with the date, and can still choose a better time.

Where the media lives

Each site chooses, and can change its mind. Both run on infrastructure and accounts that are yours — we host neither. Either way, no visitor’s download passes through PHP.

Default

On your own disks

Your server keeps the originals, encodes them with its own FFmpeg and serves the public files through nginx, straight from disk.

Optional

Your RAS-CDN media server, delivered from your R2 bucket

The originals are kept and encoded on a RAS-CDN media server you run. The site talks to it with a signing key of its own, and can reach only its own files. Public files are stripped of camera, location and author metadata, published to the site’s R2 bucket and served on its own media domain; a takedown removes them and purges Cloudflare’s cache. Originals never become public.

A move is staged: a dry run of what would be sent and what would become public, your approval, and a readiness check before delivery switches. Switching back is always allowed.

Properties, not promises

Each of these is something the code enforces.

No admin surface on the public site

The administration panel was deleted from the instance — thirteen controllers, thirty-five templates and their routes. What remains is an administration API that refuses every request the console has not signed.

Per-instance signing keys

Each deployment gets its own keypair, minted when it is registered. The instance holds only the public half, so reading its configuration reveals nothing that can sign a command.

Replay protection

Signed requests carry a timestamp and a single-use nonce, and the nonce is only spent once the signature has already verified.

The console never touches your database

Every read and write goes through the site’s own signed API, and the console keeps no copy of your catalogue. The one thing that restores your database is the updater on your own server, from the snapshot it took before an update.

Uploads are relayed, not stored

An operator’s upload moves in chunks the console forwards without keeping. A copy between two sites that share no storage passes through a temporary file, deleted once the copy is sent.

Instant cut-off

Rotating a site’s key from its edit page stops the console commanding it at once. The site accepts the new key only once its public half is installed on the site’s own server.

Signed releases

The updater on each server installs only releases whose Ed25519 signature and per-file checksums verify, and never steps back to an older version unless the console sends a sanctioned go-back.

HTTPS or nothing

Unless a site sits on the console’s own machine or a private network, its address must use HTTPS. A plain-HTTP address is refused when it is typed, and again on every call.

The stack

Boring where it should be.

Nothing exotic to hire for, and nothing that stops being maintained next year.

PHP 8.4

On a supported branch, pinned per release.

Laravel 13

Both the instance and the console.

MySQL 8.4

One database per instance, owned by the instance.

Redis

Queues, cache and rate limiting.

FFmpeg

Transcoding, posters and preview clips.

Nginx

Serves pages and media; PHP never streams a video to a viewer.

Node.js

Server-side rendering of the public site.

Docker Compose

Every release, its images checksummed in a signed manifest.

Ed25519

Request signing with one keypair per instance; releases signed by us.

Cloudflare R2

Media delivery from your own bucket, where a site uses one.