10 Owner and Administrator Guide
liquibyte edited this page 2026-11-27 18:07:51 -06:00

Owner and Administrator Guide

Running a site day to day: letting people and build nodes in, reviewing packages, settings, the forge, undoing mistakes, the site's key, and what to do after a break-in. If the site is not set up yet, start with the Owner Install Guide.

Almost everything here is a command typed on your own computer and sent to the site over SSH, or a button in the Desktop Program. A few things are done on the server itself; those say so. Every command, with who may use it, is in the Command Reference.

Looking and changing. A command that only looks works with plain ssh: ssh folio@dur.example.org admin log. A command that changes anything must come as a request signed with your GPG key, so you give it with the folio command, folio admin role NAME maintainer, or a button in the desktop program. Plain ssh refuses it. The site checks both keys: the SSH key says which account came in, the signature says that this account's person asked for exactly this command, at this site, now. A stolen SSH key alone changes nothing. folio comes with the package folio-client; the Owner Install Guide says how to set it up the first time. This page writes folio for every change and ssh for looking.

Who is who

Every person on a site has one account, and every account has one role.

Role Who May
member everyone, to start with import their own projects, vote, comment, flag, ask for things
maintainer members trusted with the reviewed part also decide requests, let in projects found on a forge. Their new packages start in the reviewed part, where each upload waits for an administrator or the owner to approve it
administrator people who run the site with the owner also everything on this page, except what is marked owner only. They approve uploads for the reviewed part (their own too, but never the owner's), and what they upload there needs no approval, except to a package of the owner's: that waits for the owner
owner exactly one account, made when the site was set up everything. Nobody else can change the owner's account. What the owner uploads needs no approval, and only the owner approves the owner's work

Two more words:

  • A package's maintainer is the account that looks after that one package; its co-maintainers help. That is not the same as having the role maintainer.
  • A site's packages are in one of two parts of its archive: main, the reviewed part, where an upload is published only after an administrator or the owner approved it (or the owner uploaded it, or an administrator did to a package that is not the owner's), and unsafe, the unreviewed part, where it is published at once.

What an administrator cannot touch:

  • the owner's account: its role, whether it may vouch, suspending it, its GPG key;
  • the owner's packages, for: importing into them, their keywords and co-maintainers, taking a flag off that someone else set, approving an upload to them, building them again, deciding requests about them, moving them between the parts, and removing their builds;
  • an upload the owner made, wherever: only the owner approves it;
  • an upload to the owner's package, even their own as a co-maintainer of it: it is published into main only once the owner approves it;
  • the owner's comments;
  • with admin undo, what only the owner may do: a change the owner made (a comment, an approval, a move, anything else), and a change of the owner's account, of the owner's comments, or of the meta or the upload of one of the owner's packages (its approval, its part, its co-maintainers, keywords, flag and source), whoever made it. A package counts as the owner's when its maintainer is the owner now, or was before or after the change. folio-audit holds every undo to the same rule.

An administrator can still undo other changes about the owner's packages (a member's vote or comment on one, say).

People

Nobody can sign up. A new person is let in by someone already on the site who may vouch for them. Vouching makes the account and ties it to the person's two keys: their SSH key, which lets them in, and their GPG key, which signs every change they ask for.

To Type
let someone in cat their-key.pub their-key.asc | folio vouch NAME
set the GPG key of an account that has none, or whose person lost theirs folio admin pgp NAME < their-key.asc
allow a member or maintainer to vouch folio admin voucher NAME on (off to stop)
change someone's role folio admin role NAME maintainer (or member, administrator)
lock an account out folio admin suspend NAME why
let it back in folio admin unsuspend NAME
see everyone ssh folio@dur.example.org accounts

Letting someone in

  1. On their computer, they install the package folio-client and make their two keys, if they have none:

    folio-mykeys
    

    It makes the SSH key ~/.ssh/id_ed25519 (secret, it stays there) with ~/.ssh/id_ed25519.pub (public), and a GPG key in their keyring. Then they write the GPG public key to a file:

    folio-mykeys export > their-key.asc
    

    The Member Guide tells them this too.

  2. They send you both public files, the one ending in .pub and the .asc file, and the account name they want. A name is 3 to 32 lower-case letters, digits, ., _, + or -, not starting with . or -.

  3. On your computer, with the files saved as their-key.pub and their-key.asc:

    cat their-key.pub their-key.asc | folio vouch NAME
    

    The command reads the one line of the SSH key first, then the GPG key block. You should see Account NAME created (vouched for by YOUR-NAME), with the GPG key FINGERPRINT. Check that the fingerprint is the one the person sees with folio-mykeys show: from now on, the site takes from that account only what this key signed.

    If it says Then
    folio: you are not in the group that may vouch; ask an administrator you may not vouch yet
    folio: that key belongs to an account or a build node already the person sent an SSH key that is in use; they need a key of their own
    folio: send both of the new person's keys: the one line of their SSH .pub file, then their PGP public key (cat KEY.pub KEY.asc | folio vouch NAME). Without a PGP key an account could only look only the SSH key came. Send both files, in that order
    folio: that is not an SSH public key (send the one line of their .pub file first, then their PGP public key: cat KEY.pub KEY.asc) the files came the other way round, or the first is not a .pub file
    folio: that is a private key. It never leaves your computer: send the public keys, the one line of the file ending in .pub, then the PGP public key one of the files was a secret key. Tell the person: that key should now be thought of as seen by you, and made again
  4. On their computer, they check that they are in:

    ssh folio@dur.example.org whoami
    

    The first time, ssh shows the fingerprint of the server's key and asks whether to trust it; they answer yes if it is among those on the site's home page (see Checking the site's key). They should see account: NAME, role: member and their key on the pgp: line. Then they set up the folio command for changes, as the Member Guide says.

  5. If they are to review, or to let others in, give them that now: folio admin role NAME maintainer, folio admin voucher NAME on.

Who may vouch

The owner and administrators always, by their role. Members and maintainers only in the vouching group, after admin voucher NAME on. Each new account starts as a member, however it was let in.

Every place says who may vouch, and why. whoami has the line may vouch: yes (as the owner), yes (as an administrator), yes (in the vouching group) or no; accounts has the same in its fourth column, and the desktop program in its May vouch column. admin voucher NAME on for an administrator or the owner is allowed, but changes nothing now: they may vouch in any case. The answer says so, and the flag counts only if their role later becomes member or maintainer. In the desktop program, May vouch and May not vouch are greyed out for them, with a tooltip that says why.

Changing a role

admin role NAME ROLE sets member, maintainer or administrator. You should see NAME is now: ROLE. The site is never left without an administrator: the owner is one, and cannot be made something else or suspended. To make someone the owner, see Handing the site over.

Changing a role does not move the person's packages between the parts; admin move does (see Packages).

Suspending

Suspending locks an account out without deleting anything. Use it for a key that may be stolen, or someone who misbehaves.

folio admin suspend NAME the reason, in a few words
  • The reason is required, at most 300 bytes. It is written into the record, which anyone can read.
  • The account's keys stop working at once: the person sees Permission denied (publickey).
  • Its page is removed, its comments are hidden, and it is left out of accounts for everyone but administrators. Nothing is deleted from the record.
  • New commits of the packages it maintains are no longer imported until it is let back in.
  • The owner cannot be suspended.

admin unsuspend NAME lets it back in; you should see NAME may come in again.

To remove an account and its name for good, see Erasing from the history.

GPG keys

Every account has a GPG key on the site: pgp = FINGERPRINT in its facts and the public key in the record as accounts/NAME/pgp.asc. The site checks every request the account sends against that key. The same key also checks the account's signed commits when it imports.

A person changes their own key with folio-mykeys export | folio pgp set, signed with the key it replaces, as every change is. When they no longer have that key, they cannot, and an administrator sets the new one:

folio admin pgp NAME < their-key.asc

You should see NAME's GPG key is now FINGERPRINT: changes are signed with it from now on. The person is notified that their key was set (by mail, if they turned mail on), so that someone who did not ask for it hears of it. Before you set a key, make sure it is really the person's: whoever holds that key can change everything the account may. Ask them in a way that is not the e-mail the key came by, and compare the fingerprint.

What happened What to do
an account has no GPG key (made before keys were needed, or after pgp remove) it can look and nothing more; whoami says note: your account has no GPG key, so it can only look (see: help). Nobody can set their own first key, since a stolen SSH key would be enough for that. The person makes one (folio-mykeys pgp) and sends its public key (folio-mykeys export); you run folio admin pgp NAME < their-key.asc
a person lost their GPG key the same: they make a new one, and you set it
a person's GPG key was stolen set their new key at once (folio admin pgp NAME): from then on the site takes nothing the stolen key signs. If their SSH key may be stolen too, suspend the account first (folio admin suspend NAME ...), then look through admin log for changes they did not make
a person's GPG key ran out the site refuses everything it signs, with your GPG key FINGERPRINT has run out .... They renew it on their computer (gpg --quick-set-expire FINGERPRINT 2y; when it is the part that signs that ran out, also gpg --quick-set-expire FINGERPRINT 2y '*') and send you the renewed public key; you set it with folio admin pgp NAME. The fingerprint stays the same
a person's GPG key was revoked the site refuses everything it signs. They make a new key, and you set it
the owner wants another GPG key, and still has the old one the owner runs folio pgp set < new.asc, or folio admin pgp OWNER < new.asc on their own account: either is signed with the owner's current key, so the two are the same. Only the owner can: an administrator who tries is told OWNER owns this site; only OWNER can change that account
the owner lost their GPG key, or had it stolen nobody else can change the owner's account (an administrator who tries is told OWNER owns this site; only OWNER can change that account), and the owner can no longer sign. The owner sets the new key on the server: sudo -u folio /usr/lib/folio/folio-setup --owner-pgp KEY.asc /srv/folio. See A site made before changes were signed

A stolen GPG key alone gets nobody in: the request must also come with the account's own SSH key. A stolen SSH key alone changes nothing. Both together, stolen from the same computer, are as good as the person: suspend the account, look at what was changed (admin log, and undo what they did not ask for), and set their new GPG key. Once let back in, the person adds a new SSH key and removes the stolen one (folio key add < NEW.pub, folio key remove NUMBER), signed with their new GPG key.

Packages

To Type
see every package ssh folio@dur.example.org packages
approve an upload for the reviewed part folio approve PACKAGE
move a package between the parts folio admin move PACKAGE main (or unsafe)
see open requests ssh folio@dur.example.org requests
carry a request out folio accept PACKAGE ID
turn one down folio reject PACKAGE ID
see a package's comments with their IDs ssh folio@dur.example.org comments PACKAGE ids
remove a comment folio admin remove-comment PACKAGE ID
  1. Which part a package is in is decided once, when it is first imported, by who imported it: a member's goes to unsafe; a maintainer's, an administrator's and the owner's go to main. A project let in from a watched forge (admit) always goes to unsafe, whoever let it in. Promoting a person later does not move their packages; admin move does.

  2. Approving. In the reviewed part (main), an upload is held back until an administrator or the owner approves it. Approval is for one upload: every new commit of that package waits again. Until then, the version published before stays in the archive. Look at what was imported first: the package's page links to its files and to where the project lives. The page "Waiting for review" lists what is waiting. Who may approve:

    Upload by Needs approval in main Who may approve it
    the owner no the owner
    an administrator, to a package that is not the owner's no the owner; an administrator too (their own included)
    an administrator, to a package of the owner's (as its co-maintainer) yes the owner
    anyone else, to a package of the owner's yes the owner
    anyone else yes an administrator or the owner

    Maintainers do not approve, not even someone else's upload; they are told only an administrator or the owner can approve an upload. An administrator who tries to approve the owner's work is told that upload is the owner's; only OWNER can approve it. An approval counts while whoever gave it is still an administrator (or the owner): take that role away, and what they approved that is not published yet waits again. Asking for a build again (rebuild) is not approving: the build is still the upload of whoever imported it. You should see PACKAGE VERSION is approved.

  3. Moving. admin move changes where the package's builds go, and what is published of it moves along at once, where it may be published there: into unsafe always (What is published of it moved along.); into main only an upload that is approved, or was the owner's, or an administrator's to a package that is not the owner's. Otherwise it says What is published of it stays in unsafe until its newest upload is approved (approve PACKAGE) and built., and it moves when that is done.

  4. Requests. Anyone with an account can ask for a package to be freed for adoption (orphan), removed (delete) or folded into another (merge). requests lists them with the ID to use.

    • Accepting an orphan takes the maintainer and co-maintainers off; anyone may then adopt it.
    • Accepting a delete or merge takes the package off the pages and out of the archive. A merge also gives its votes to the other package. The project's source is untouched: it lives on its forge.
    • Nobody but an administrator may accept their own request.
    • A request can be turned down by a maintainer or administrator, by whoever asked, or by the package's own maintainer. Only the owner decides requests about the owner's packages.
  5. Comments. admin remove-comment takes a comment off the pages. It stays readable in the record's history; to take it out of that too, see Erasing from the history.

Projects found on a watched forge

If the site looks at a whole forge (admin watch-forge, see Forge Setup), every public project found there is listed as waiting. Nothing is fetched or built until one is let in.

To Type
see what is waiting ssh folio@dur.example.org found
let one in folio admit OWNER/PROJECT
let it in under another package name folio admit OWNER/PROJECT NAME
turn one down folio decline OWNER/PROJECT why
  • Maintainers can do these too.
  • A project let in has no maintainer until someone adopts it (adopt PACKAGE), and is in unsafe. You should see OWNER/PROJECT is let in as PACKAGE. Its new commits are imported and built from now on.
  • A declined project stays in found, marked declined, and can still be let in later. Declining is not written into the record.
  • Not listed: the site's own repositories, projects the site imports already, and projects under an account a member watches. When nothing is waiting, the page Found on the forge says why, with what the last look saw: Nothing is waiting. The last look at the forge (DATE) saw 14 projects: 11 are imported already, 2 are this site's own, 1 is under an account a member watches. found says the same, on one line, when it lists nothing.
  • A project that was removed from the site (an accepted request NAME delete, or a merge) is not imported again by itself, even under an account a member watches. It is listed as waiting again, marked waiting (removed from this site on DATE: REASON): admit brings it back, decline keeps it out.

How much an import may be

Whoever can push to a followed repository, or to a watched account or forge, decides what the site fetches next. So every import, typed or timed, is bounded before the site reads it:

  • source-limit-mb (2000): the repository fetched, and the project's files unpacked. A fetch that brings in more is stopped while it comes in, and the site keeps no copy of it.
  • source-limit-files (50000): files, links and folders in the newest commit's tree. A repository of a few kilobytes can name millions of files; the site stops reading the list at the limit.
  • source-limit-seconds (300): the time the site spends reading one commit.
  • Fixed: a file at most 20 MB, a commit's own text (author, message, signature) at most 1 MB, a path at most 4096 characters.

Set them with folio admin set source-limit-files 100000 and the like. A commit the timed import turns down for a limit is noted (imports shows it) and not fetched again until the repository has a new commit. The commit's signature is checked first, from the commit alone, before any of its files are listed or read: where signatures = required, an unsigned project, or one signed by a key of nobody who may push it, is refused unread.

What reads a project's files runs in a sandbox, which needs the server to allow user namespaces (as Devuan does by default). Where it does not, no project is read: each is refused with the project is not read: this computer cannot make the sandbox ..., which says how to allow them. Only if that cannot be done, the owner (and only the owner) may choose folio admin set import-sandbox off, which weakens the site: projects are then read without the sandbox, as the user folio, with only the limits above; the activity log says the upload of NAME is read without a sandbox, as the setting import-sandbox = off allows each time, and admin verify warns while it is set. folio admin set import-sandbox, with nothing after it, turns the sandbox back on.

A timed import imports at most import-per-pass (5) repositories new to the site from the watched accounts, and begins none after 10 minutes; the rest wait for the next import, by turns between accounts, the one seen first coming first. The site's own packages are looked at before any new repository and are not counted. The site's lock is let go of after each repository, so doors and builds wait at most for one, and one timed import runs at a time.

Builds and build nodes

A build node is a computer that builds the site's packages. It asks the site for work, builds in a throwaway system, and hands the result back. A site needs at least one.

To Type
see the newest builds ssh folio@dur.example.org builds (or builds PACKAGE)
build something again folio rebuild NUMBER
take a build off the list folio admin build remove NUMBER (several numbers may follow)
see the build nodes ssh folio@dur.example.org nodes
let a node in, with both its keys cat folio-node.pub folio-node.asc | folio admin node add NAME
let it in for other kinds of processor cat folio-node.pub folio-node.asc | folio admin node add NAME arm64
give a node its GPG key, or a new one folio admin node key NAME < folio-node.asc
switch a node off folio admin node disable NAME
switch it on again folio admin node enable NAME

Letting a node in

  1. On the node computer, whoever runs it sets it up as the Build Node Guide says, and makes the node's two keys as the build user: an SSH key, which lets it in, and a GPG key of its own, which signs every claim and result it sends (step 3 there). Both have no passphrase, because the node runs unattended. The node's settings name the site's pages (web = https://dur.example.org): the node fetches the site's SSH keys from there and connects only to a server that shows one of them.

  2. They send you both public keys, folio-node.pub and folio-node.asc, and a name for the node: 3 to 32 lower-case letters, digits, ., _, + or -. The SSH key must be new: not one an account or another node has. Compare the GPG key's fingerprint with theirs, in a way that is not the mail the key came by.

  3. On your computer, both keys on standard input, the SSH key's line first:

    cat folio-node.pub folio-node.asc | folio admin node add NAME
    

    You should see The build node NAME may come in (it builds for: amd64), and signs with the GPG key FINGERPRINT. For other kinds of processor, name them after the node's name: ... | folio admin node add NAME arm64, or amd64 arm64 for both. Without the GPG key the site refuses: send both of the build node's keys: ....

    A node let in before nodes had GPG keys has none: the site takes neither its claims nor its results, and tells its node so. Once they have made its key, set it:

    folio admin node key NAME < folio-node.asc
    

    You should see The build node NAME signs with the GPG key FINGERPRINT from now on. The same gives a node a new key after its old one ran out, was lost, or the node was stolen (switch it off first: folio admin node disable NAME).

  4. On the node computer, as the build user, they check:

    ssh -i ~/.ssh/folio-node folio@dur.example.org help
    

    They should see You are the build node NAME (for: amd64). Commands:. Then they start folio-node run.

  5. On your computer, nodes lists it as enabled. Waiting builds for its kinds of processor start within a minute or so.

What to know about builds and nodes

  1. A node's keys can do three things: take a build, say it is still at it, and hand in the result. They cannot vote, import or change anything. Each claim and result is a request signed with the node's GPG key, kept beside its build (claim-request, result-request, and the archive it signed, result.tar); publishing a build names that result in its job (published-result = build NUMBER request NONCE node NAME FINGERPRINT). A build handed in before nodes signed their results is not published: not published: it was handed in before build nodes signed their results (rebuild it).

  2. A node builds only for the kinds of processor it was let in for. There is no command to change them or to remove a node: switch it off, and let it in again under a new name with a new key (the old key stays taken).

  3. Switching a node off stops its key at once and puts whatever it was building back in the queue.

  4. rebuild NUMBER works on a finished build of a package's newest upload. It is built again for the same release and kind of processor. rebuild PACKAGE builds the newest upload again for every release and kind of processor, as an import does: for a package with no builds, after a restore for example. Either way the build stays the upload of whoever imported it: an administrator's asking does not publish an unapproved upload in main. Only a package's own maintainers build the owner's packages again; an administrator is told PACKAGE is the owner's; only its maintainers can build it again. Mail about the result goes to the uploader and to whoever asked (once each, if they turned mail on), and says It was built again, asked for by NAME. The build's facts and its page say who asked (rebuilt-by).

  5. A build that ends three times in a node's own trouble (error), or with no word from its node for 15 minutes, is failed: tried 3 times without a result; last: .... Until then its note says how many tries are left. Switching a node off, or a node that starts again, gives a build back without that counting. rebuild NUMBER tries it again from none.

  6. When a node cannot install what a build needs, the site decides between two states, and the build's note says which and why:

    • failed, when the release lacks something that no package of this site builds for it: needs NAME, which RELEASE does not have. It can never build there. Also failed when the release has it but it still cannot be installed; the note then says what the node found.
    • waiting, when one of this site's own packages builds what is missing and is not published yet: waiting for NAME, from this site, to be published for RELEASE; it is built again once it is. The build is queued again by itself as soon as that package is published where it may use it. Nothing needs to be done.

    A package in the reviewed part builds against the reviewed part only, so it waits for a package of this site in main (the note says for RELEASE in main), and cannot use one that is only in unsafe.

  7. Each build's page has its full log.

  8. Removing a build takes it off the Builds page and the package's page, and deletes its log and files. It is for clearing away builds that only confuse: an early failure that was fixed since, or a queued build nobody wants. A build that is being built right now cannot be removed, nor one that is published (that one is what the archive offers). It cannot be undone. Builds are not part of the record, so this is noted in the activity log, not on the Changes page.

Settings

ssh folio@dur.example.org admin settings
folio admin set KEY VALUE

The first shows every setting; the second changes one, and admin set KEY with no value removes it. Every setting is explained in the Settings Reference.

Releases: new ones, ended ones, other distributions

Once a day the site asks the mirror of each distribution it builds for which releases it has now, and mails the owner and the administrators once when there is a new release, when one the site builds changed (the day testing becomes stable), and when one has gone from the mirror (its life has ended). The site changes nothing by itself: you decide, with a signed command, and the mail gives it.

To Type
see what the mirrors say now ssh folio@dur.example.org admin releases
build for a new release as well: every package's newest upload is queued for it at once folio admin set suffix-gryphon +devuan8, then folio admin set releases daedalus excalibur freia ceres gryphon
stop building an ended release, and take its packages out of the archive folio admin set releases excalibur freia ceres gryphon
build for Debian's trixie too folio admin set distribution-trixie debian, folio admin set suffix-trixie +deb13, then add trixie to releases
for another distribution, first its mirror and the package of its keys folio admin set mirror-ubuntu https://archive.ubuntu.com/ubuntu, folio admin set keyring-ubuntu ubuntu-keyring

Build nodes need the keyring package of each distribution they build for (debian-archive-keyring for Debian). The details are in the Settings Reference.

The forge

The forge is where the projects live. Pointing the site at projects, keeping the record, pages and packages on the forge, and the forge's package list are all in Forge Setup. The commands, for reference:

To Type
list every public project on the whole forge as waiting to be let in folio admin watch-forge https://forge.example.org
stop looking at the forge folio admin unwatch-forge
keep the record, pages and archive on the forge: first see the forge server's SSH host key folio admin publish-to ssh://git@forge.example.org/you
then, after comparing its fingerprint with the forge server's own, confirm it (nothing is sent before) folio admin publish-to ssh://git@forge.example.org/you SHA256:...
see the key the forge must let in, and the forge's host key the site trusts ssh folio@dur.example.org admin publish-key
send what changed now, and see what happened folio admin publish-now
stop sending folio admin publish-off
also fill the forge's package list folio admin registry-to https://forge.example.org/you
give the access token for that folio admin registry-token < token-file
stop that, and delete the token folio admin registry-off

Mirrors

A mirror is a copy of the site kept on someone else's server. apt checks every list of packages against the site's key, so a mirror cannot change what people install. Listing a mirror only puts it on the site's Mirrors page.

To Type
list a mirror folio admin mirror add NAME https://mirror.example.net
take it off the list folio admin mirror remove NAME

The site's Mirrors page tells people how to make one and how to install from one.

Seeing and undoing changes

The record is everything the site knows, kept as a git repository on the server. Every change to accounts, packages, votes, comments, requests, mirrors, nodes and settings is one entry in it, with who made it, signed with the site's key. The Changes page shows the newest 300 to everyone.

Not in the record, because they are not decisions of a person: builds, publishing into the archive, and declining a project found on a forge. Mail addresses and the forge's token are kept out of it on purpose.

Each change keeps the request that asked for it. A change made with folio or the desktop program carries, in its commit message after Acted-by: NAME, the signed request itself: a line Request: NONCE, the seven lines of the request between -----BEGIN FOLIO REQUEST----- and -----END FOLIO REQUEST-----, and the person's signature. The site's key signs the commit as before, so the request is bound to it. Anyone with a copy of the record can check each request with gpgv and public keys alone: the signer's key is accounts/NAME/pgp.asc in the commit before. Imports a request caused (follow, watch, fetch, admit) carry the same request; a build asked for with rebuild keeps it beside the build. Every request the site took is also kept on the server, in /srv/folio/private/requests/NONCE and NONCE.asc; that covers the changes outside the record (mail, decline, admin registry-token, admin build remove, admin publish-now). A change the site makes by itself carries no request of its own, and names instead what authorised it: the timed import, Authorised-by: request NONCE (the signed follow, watch or admit that set it up, earlier in the record); a new signing key taking over on its day, Authorised-by: key-change FPR. A change the owner makes on the server (with folio-key, or folio-setup --owner-pgp) says Acted-by: OWNER (on the server). folio-audit checks all of this from a copy of the record, with the same rules of roles the door keeps, the owner's protections included (see Auditing a Site). After a restore or a move, the record's copy of the site's public key must be the key the server holds, or folio-audit checks with the wrong one: folio-backup restore sees to it, and after bringing the record back from the forge alone, the owner runs sudo -u folio /usr/lib/folio/folio-key record (see Backup and Restore).

To Type
see the latest changes ssh folio@dur.example.org admin log (20 of them; admin log 100 for more, at most 500)
take one change back folio admin undo CHANGE
check that nobody tampered with the record ssh folio@dur.example.org admin verify
  1. admin log shows each change with a short code, the time in UTC, who made it, and what it was. admin undo with that code (at least 7 characters of it) reverses that one change; you should see Undone: and what the change was. The undoing is itself recorded.

    • The very first change, which made the site, cannot be undone.
    • The undoing is a change of yours, so it is signed and its request kept, as any other.
    • A change that later changes build on cannot be undone by itself: folio: that change cannot be undone by itself: later changes build on it.
    • What only the owner may do, only the owner may undo: an administrator is refused (folio: that change is the owner's (made by OWNER, or of OWNER's account, comments or packages); only OWNER can undo it) a change the owner made, or one of the owner's account, comments, or the meta or upload of the owner's packages. See Who is who above.
  2. admin verify checks the signature on every change. It reports:

    Line Means
    signed by the site's key as it should be
    signed by a signing key of the site that has been replaced since (while it counted) as it should be, after a change of signing key or after one ran out: the key signed them while it counted (see The site's key). Only shown when there are such changes
    not signed made before the site had its key, or by hand on the server. (While the signing key has run out, the site takes no changes at all, so none is made unsigned)
    signed by a key this server does not have, so they cannot be checked the key they were signed with is gone from the server: the old site key after a restore from the forge alone. Listed by their codes. Only shown when there are such changes; admin verify does not fail for them
    signed by a signing key that was later revoked as stolen, before it was revoked after an emergency: these may be the site's, or the thief's with an earlier date. Each is listed with its code, its date, who made it, what it was and the files it changed:. admin verify fails until the owner has looked at each and accepted it (admin verify accept CODE...; see If the server was broken into)
    signed by a signing key that was later revoked as stolen, before it was revoked, and accepted by the owner since (verify/accepted) the owner looked at these and accepted them. Listed by their codes. admin verify does not fail for them
    with a signature that does NOT hold someone changed the record after the fact, or signed it with a key that no longer counted. admin verify fails. The codes follow one of: signed by a stolen signing key, after it was revoked:, signed by a signing key after it was revoked or had run out:, signed by a key that is not the site's:, or look at: (a signature that is plainly wrong). See Troubleshooting

    Last, it shows the site's key, its signing key and when that runs out (renewal is due from DATE), and anything that is due about the key, as folio-key show says it.

What the site is doing right now. On the server:

sudo tail -F /srv/folio/private/activity.log

Every command that arrives is one line, with what was refused and why, what was imported, what the nodes did, and what was sent to the forge. tail -F keeps showing new lines; Ctrl+C stops it. Each entry is cut to 500 bytes (...(N bytes) says how long it was), and every control character in it is written out as text (\n for a line end, \033 for an escape, and so on), so that what someone typed can neither make a line that looks like the site's own nor act in your terminal. A command typed over plain ssh longer than 4096 bytes is refused, and noted by its size alone. The log is started again by itself once it is larger than 5 MB: the older lines are kept in activity.log.1 (the one before that goes), so the two take at most about 10 MB. An erasure takes what it erases out of both.

Erasing from the history (owner only)

Removing a comment or suspending an account leaves it readable in the record's history. When something must go for good (someone asks for their personal data to be removed, or a password was posted by mistake), the owner can erase it from the history itself.

folio admin erase comment PACKAGE ID why
folio admin erase account NAME why
folio admin erase package NAME why

The comment's ID is from comments PACKAGE ids. The reason is required (at most 300 bytes) and is published. You should see Erased from the record's history: ....

Before you can:

  • an account must look after no package, as maintainer or co-maintainer (free or remove its packages first);
  • a package must already be removed (a delete request, accepted);
  • the owner's own account cannot be erased.

What happens:

  1. Every change in the record is made again without the erased thing and signed again. The old history is thrown away on the server. For an account, its name becomes (erased) wherever it stood.
  2. An erased account is gone: its keys no longer get in, and its page is removed.
  3. The lines about it are taken out of the activity log (for a package: the commands that act on it and what came of them, not every line that mentions its name).
  4. The site's working copy of what it publishes is thrown away, and the next publishing replaces the SHORT-site repository on the forge instead of adding to it, so the old pages are no longer in its history. The SHORT-record repository is replaced too.
  5. For an account: its mail address, its waiting mail and its name on builds go. For a package: the site's working copy of its source, its packaging files, its builds with their logs, a refused import's note, and what its packages were found to need.
  6. The Changes page lists that something was erased, when, by whom and why. It says "a comment on PACKAGE", "an account", or "the removed package NAME". It never says what the comment said or which account.
  7. The signed requests in the history. A request kept in a change's message cannot be changed: its signature would no longer hold. So a request that names what is erased (the account's name as a word), or came with it (an erased comment, found by its sha256), is taken out whole, and the line Request-erased: it named what was erased (see erasures/) stands in its place. Every other request stays byte for byte, and can still be checked. The erasure's own file in erasures/ counts them: requests-erased = N. The copies kept on the server (private/requests) and beside builds that name it are deleted too.
  8. Your own admin erase account request names the account, so it is not written into the record either: the change that records the erasure says Request: NONCE (withheld: it names what was erased; the site keeps it). The site keeps it in private/requests.

What it cannot reach:

  1. Backups made before. Make a new backup afterwards and destroy the older ones.
  2. Mail that was already sent.
  3. Copies other people made: a mirror (its pages follow at its next refresh), someone's clone of the forge repositories.
  4. The forge itself may keep the replaced commits internally until it tidies up. Ask the forge's administrator if it matters.
  5. Build logs of other packages that happen to mention the name.
  6. A project's own repository on its forge, and the names in its commits.

It cannot be undone.

Handing the site over (owner only)

There is always exactly one owner. To make someone else the owner:

  1. They need an account on the site that is not suspended, with their GPG key set (ssh folio@dur.example.org accounts lists the accounts; their whoami shows the key on the pgp: line). If they have no account, let them in first (People); if their account has no GPG key, set it first (folio admin pgp NAME < their-key.asc): once they own the site, it can only be set on the server (folio-setup --owner-pgp).

  2. On your computer:

    folio admin role NAME owner
    

    You should see NAME now owns this site. You are an administrator.

  3. From now on only NAME can change their account or hand the site on.

The site's key

The site has one key of its own. It signs the apt archive's lists, so that people's computers can check every package came from the site, and it signs every change in the record. It has three parts:

  • the master, which only vouches for signing keys. It is the site's identity: the key people's apt trusts. It is made on your own computer and stays there; it never comes to the server;
  • a signing key for the archive, which signs the apt archive and nothing else;
  • a signing key for the record, which signs the record's changes and the site's copy on the forge, and nothing else.

Each signing key runs out after a year (the setting signing-key-lifetime) unless you renew it. The master says in each signing key which of the two it is, and admin verify and folio-audit count a change of the record signed with the archive's key as not holding; apt is given the archive's signing keys only, so the record's cannot sign an archive it takes.

On the server the signing keys are held by the site's signer, a user of its own (folio-sign, its folder /var/lib/folio-sign). The user folio, which runs the doors, the imports and the publishing, holds no key: it can only ask the signer for a signature, through one sudo rule (/etc/sudoers.d/folio), and the signer signs only an apt Release file with the archive's key and only a commit of the record or of the site's copy with the record's key. It writes every signature into /var/lib/folio-sign/sign.log (when, what, the sha256 of what it signed, which key), which folio can read and not change. The signer also holds the key the site writes to its forge with, and the forge's access token, and does the sending itself, to the address the record names only.

People's computers learn about the key from the site's keyring package, WORD-archive-keyring (for example dur-archive-keyring), which the site's setup.sh installs and apt keeps up to date like any other package. Each time the key changes (new signing keys, renewed ones, revoked ones), the site publishes a new version of it. A computer that upgrades as usual gets it, and nobody needs to run setup.sh again. The one exception is an emergency (below).

How every change of the key is made. On your computer, with the package folio-client, folio-site-key makes the change with the master and writes a bundle: the public key as it is now, and, when there are new signing keys, their secret parts (never the master's). You copy the bundle to the server and give it to folio-key import, which hands the signing keys to the signer, publishes the keyring package and writes the change into the record. Then you delete the bundle on both sides.

  1. On your computer:

    folio-site-key ACTION
    

    folio-site-key asks for the master's passphrase. It says the name of the bundle it wrote, for example folio-key-renew-20261126-101500.bundle.

  2. Copy it to the server:

    scp folio-key-renew-20261126-101500.bundle root@dur.example.org:
    
  3. On the server, as root:

    sudo /usr/lib/folio/folio-key import folio-key-renew-20261126-101500.bundle
    
  4. Delete it, on both: shred -u folio-key-renew-20261126-101500.bundle.

folio-site-key uses the GnuPG folder ~/.gnupg, or the one you give with --home DIR (best: a folder of its own, on a computer that is seldom on a network). Keep a copy of that folder, with the master's revocation certificate (DIR/openpgp-revocs.d/FINGERPRINT.rev), in two places that are not on any network.

What is due. folio-key show (on the server: sudo -u folio /usr/lib/folio/folio-key show) says where each part is and what is due, on lines that start with Due:. The same lines are at the end of admin verify. The owner is mailed (if they set a mail address) when the signing key is due to be renewed, when a new signing key takes over by itself, and once if the master is still on the server. The home page shows the site's key and when its signing key runs out, and says so when it is due to be renewed.

Making the site's key

This is done once, on your own computer, before the server is installed: see the Owner Install Guide. In short: folio-site-key init DUR makes the master and the two signing keys, and the bundle that folio-install takes (FOLIO_SITE_KEY=FILE).

Moving the master off a server of an older site

A site made by an older Folio has every key on the server, held by the user folio, its master too. folio-key show then says Master part: ON THIS SERVER, admin verify and folio-audit say so too, and the owner is mailed once. It goes on working as it is until you move its keys; an upgrade of the packages never does it by itself. Do it once, with the server's package up to date:

  1. On the server, as root, give the site its signer and write the master out for you:

    sudo /usr/lib/folio/folio-install --migrate /root/site-master.asc
    

    This makes the user folio-sign and its sudo rule, hands it the signing keys, the forge's key and the token, and writes the whole key with the master's revocation certificate into the file (for root alone). You should see Done on the server: the site's signer (folio-sign) holds its signing keys. The master is still on the server until step 4.

  2. On your computer, take the file and keep it:

    scp root@dur.example.org:/root/site-master.asc .
    folio-site-key adopt site-master.asc
    

    It puts the master and its revocation certificate into your GnuPG folder, asks for a passphrase for the master, and shows a code: sudo -u folio /usr/lib/folio/folio-key master-gone XXXX-XXXX-XXXX-XXXX.

  3. On your computer, copy the GnuPG folder to your two offline places.

  4. On the server, with that code:

    sudo -u folio /usr/lib/folio/folio-key master-gone XXXX-XXXX-XXXX-XXXX
    

    You should see The master part of the site's key is deleted from this server. and The master's revocation certificate is deleted from this server.

  5. On both, delete the file: shred -u site-master.asc (on the server: sudo shred -u /root/site-master.asc).

  6. Make a new backup now, and destroy every older one: an older backup holds the master. See Backup and Restore.

A site that ran folio-key master-out FILE before has its master in that file already: take it with folio-site-key adopt FILE (step 2), and run folio-key master-gone CODE (step 4), which removes the revocation certificate that stayed on the server. Then run step 1 too, so that the signing keys go to a signer. The site's older single signing key goes on signing both the archive and the record until the next change of signing keys, which gives it one of each.

Nobody who installs from the site needs to do anything: the key they trust is the same.

Changing the signing key (routine)

Change the signing keys now and then (once a year is plenty). If they were stolen, or if you are unsure who could reach them (an old backup that went astray, a server you no longer trust), make an emergency instead: see If the server was broken into. A routine change counts what the old record key signed before it was replaced as holding, and someone who has a copy of it could have signed changes the record then shows as the site's own; an emergency has you look at each of them first. It takes three steps, two weeks apart; computers that use the site notice nothing, as long as they upgrade at least once in those two weeks.

  1. On your computer, make the new signing keys, and bring the bundle to the server (as above):

    folio-site-key new-signing-key
    

    On the server, folio-key import BUNDLE says 1. A new signing key is published: with its fingerprint, and the record's (and one for the record:). The keyring package now holds the new key beside the old one, and computers get it at their next upgrade. The old keys still sign. folio-key show shows the new ones as New signing key: and says when they take over: signing-key-overlap days later (14 unless set).

  2. Nothing to do: on that day the new signing keys take over by themselves, and the owner is mailed The new signing key signs from now on. This needs no master. To make them take over earlier, on the server:

    sudo -u folio /usr/lib/folio/folio-key switch
    

    You should see 2. The new signing key (...) signs the archive and the record from now on. Computers that did not upgrade since step 1 can no longer check the archive; they need setup.sh run again. That is why step 2 waits.

  3. On your computer, once folio-key show says Old signing key: (and not before), revoke the old ones, and bring the bundle:

    folio-site-key revoke-old
    

    It revokes exactly the keys that counted when step 1 made the new ones, as step 1 wrote them in your key folder (folio-change-MASTER), never picked by the keys' creation times (a computer whose clock was behind would make the new keys look older). If that file is not there (a change begun with an older folio-site-key), it refuses (this folder ... does not say which signing keys are the new ones); name the new ones as folio-key show lists them: folio-site-key --new ARCHIVE --new RECORD revoke-old. And new-signing-key refuses to make keys while your computer's clock is before the newest key's time (this computer's clock (...) is before the time a signing key under MASTER was made).

    On the server you should see 3. The old signing key (...) is revoked. and So is the record's (...). The keyring package that says so is published; computers that upgrade no longer trust the old keys. The signer deletes their secret parts, but for the old archive key it keeps a copy taken before the revocation: for 90 days (or until the key runs out, if that is sooner), the archive is signed with it beside the new key (Until DATE the old key signs the archive beside the new one), so that a computer that missed step 1 still takes the keyring package with the revocation. folio-key show lists it as Outgoing:.

    Once a change signed by the new record key is in the record, nothing the old one signs holds any more, whatever date it carries; and a change dated before the change before it is taken as made at that one's time. So a copy of the old record key cannot add changes dated back.

Each step refuses to come before the one it needs, and says what to do instead (the messages are in Troubleshooting). Running a step again does no harm: folio-site-key new-signing-key gives the same new keys again while the old ones still count, and the server says that a step is done. A bundle that would revoke a signing key that signs now is refused: that bundle revokes the signing key FINGERPRINT, which signs now.

admin verify afterwards counts the changes the old key signed as "signed by a signing key of the site that has been replaced since (while it counted)". That is correct.

Renewing the signing key

The signing keys run out after signing-key-lifetime days (365 unless set). From 60 days before (or a quarter of the lifetime, if that is less), renewal is due: folio-key show says Due: The signing key runs out on DATE, in N days: renew it now, with the master (on the owner's computer: folio-site-key renew, then on the server: folio-key import BUNDLE), so that computers get the renewed key before then., and the owner is mailed.

  1. On your computer, renew them, and bring the bundle:

    folio-site-key renew
    

    With a signing-key-lifetime other than 365, give it: folio-site-key --lifetime 200 renew. On the server you should see The signing key (...) now runs out on DATE. and Computers that upgrade before OLD-DATE get it, and notice nothing.

A site made before signing keys ran out has one that never does, and folio-key show says Due: The signing key never runs out, so a stolen one would count for ever: give it a lifetime, with the master (...). Renew it once, as above.

Do not let it run out. A computer can only fetch the renewed key while it can still check the archive. Once the signing key has run out:

  • the site publishes nothing: folio-publish: the site's signing key FINGERPRINT ran out on DATE; nothing was published. Renew it with the master, on the owner's computer: folio-site-key renew, then on the server: folio-key import BUNDLE (see: folio-key show);
  • the site takes no changes: every command that would change the record is refused before it changes anything, with folio: the site's signing key ran out on DATE, so the site takes no changes until the owner renews it (on the owner's computer: folio-site-key renew, then on the server: folio-key import BUNDLE). Commands that only read (packages, comments, admin log, admin verify and the like) still work. The timed import brings nothing in, and notes once each run in the activity log nothing was imported: the site's signing key ran out on DATE, ...; the copy for the forge waits too. Nothing is ever recorded unsigned, and the signer signs nothing with a key that ran out;
  • computers that use the site cannot update from it.

Renew it then as above. The import says It had run out on DATE and that every computer that uses the site needs its setup.sh run again. From then on the site takes changes again, and the timed import brings in what waited.

The site is frozen the same way while its signing key has been revoked and no other signs after it: folio: the site's signing key has been revoked and none signs after it, so the site takes no changes until the owner makes a new one (...); folio-site-key emergency makes the new ones (below).

Every change of the key (new signing keys, the switch, revoking the old ones, a renewal, an emergency) is written in the record, in verify/key-changes, as a change signed with the record's signing key that signs afterwards: admin log shows it as the site's key: the signing key FINGERPRINT is renewed; it runs out on DATE, for example.

On a site of the older kind whose master is still on the server, the same steps run on the server instead (sudo -u folio /usr/lib/folio/folio-key new-signing-key, revoke-old, renew, emergency), as they always did, until you move the master off (above). A master's file is never brought back to the server.

If the server was broken into

Someone who broke in as folio could ask the signer for signatures while they were in, but could not carry the signing keys away; someone who broke in as root had the signing keys and every other secret on the server. Nobody had the master: it is on your computer. They did not have anyone's GPG key either: those stay on people's own computers. But the server itself checks the requests and signs the record, so a thief on the server could make changes without any request. Such a change has no valid signed request in its message, and that is what to look for when you check the record (step 4). The signer's log (/var/lib/folio-sign/sign.log) lists every signature it made. Stolen signing keys must stop counting at once: whoever has them can sign an archive that people's computers accept.

If you cannot trust the server any more, set the site up on a clean one from a backup you trust first (Backup and Restore, and Troubleshooting for checking the record), and do the steps below there. Bring new signing keys only to a server you know to be clean: on one that is still broken into, the thief gets them too.

What a break-in as folio left in the site's folder does not come along with a restore: the restore refuses a backup with a link or a name that leads out, drops the record's git settings and hooks and GnuPG's settings, which could make git or gpg run a program, and names what it dropped. The signer's part goes straight to the signer, and only what Folio writes there. Check the backup on a computer that does not hold the master first (Backup and Restore). Give the restore your own copy of the site's key (FOLIO_SITE_KEY_PUBLIC=FILE, from gpg --armor --export MASTER): if you already made the emergency below before restoring, a backup from before it would otherwise know nothing of it. The restore also merges what the forge's record knows of the key, and says loudly when a key the backup signs with is revoked there; the restored site then signs nothing with it, and needs the emergency's new keys again (step 1). It takes no signed request made before the restore, and never sends its record over a newer one on the forge. Without a backup you trust, see restoring from the forge alone: the forge's record is checked against the site's key before it is taken.

  1. On your computer, revoke every signing key the server held, as stolen, and make new ones; then bring the bundle (as above):

    folio-site-key emergency
    

    No secret on the server is needed for it. On the server you should see The signing keys that were on this server are revoked, as stolen: with their fingerprints, and A new signing key signs the archive and the record from now on:.

  2. Tell everyone who uses the site. Their copy of the key knows only the stolen archive key. So that the revocation reaches them by itself, the signer still holds the stolen key's secret part, as it was before the revocation came in (on the same server, or on one restored from the backup), and for 90 days (or until the stolen key runs out, if that is sooner) the archive is signed with it beside the new key. The import says Until DATE, the archive is signed by the stolen key too, beside the new one. A computer that upgrades from the site in that time (apt-get update, then apt-get upgrade) takes the keyring package with the revocation, and from then on refuses the stolen key. What remains open:

    • until a computer has upgraded, whoever has the stolen key can sign an archive it accepts, and can keep a computer that reaches the archive through them (a mirror, setup.sh --from, a network in between) from ever seeing the site's own;
    • a computer that does not upgrade in those days, or a site restored without the signer's part (the import then says Computers that use this site's apt archive now FAIL to update from it), fails to update (NO_PUBKEY) until the site's setup.sh is run on it once more:
    curl --proto '=https' -fsSLO https://dur.example.org/apt/setup.sh
    sudo sh setup.sh
    

    setup.sh installs exactly the keyring package the site serves, down from a higher version a thief may have made with the stolen key, and only if its key file is the site's key byte for byte.

  3. Replace the other secrets the break-in exposed:

    • the forge key: on the server, as root, delete /var/lib/folio-sign/forge/key and key.pub; on your computer, run ssh folio@dur.example.org admin publish-key, which makes a new one and prints it; on the forge, remove the old key and add the new one;
    • the forge access token: delete it on the forge, make a new one, and on your computer run folio admin registry-token < FILE;
    • the server's SSH host keys, which every person's folio command, the desktop program and every build node trust through the site's pages (https://dur.example.org/ssh-host-keys): as root, rm /etc/ssh/ssh_host_* then ssh-keygen -A, restart sshd, and write the pages again (sudo -u folio folio-generate /srv/folio/record /srv/folio/site), which puts the new keys beside them. Never copy the old server's host keys onto the new one after a break-in. Write down the new fingerprints (ssh-keygen -lf /etc/ssh/ssh_host_ed25519_key.pub) and give them to everyone, by a way the thief does not control;
    • the https certificate's key, which vouches for those pages, for the host keys and for the archive key the nodes take: make a new key and certificate (for Let's Encrypt, certbot certonly --force-renewal --reuse-key=no or delete and request again), and revoke the old certificate (certbot revoke --cert-path OLD.pem; for a site's own certificate authority, a new certificate from it, and the old one on its revocation list);
    • the mail password the site sends with, if it has one;
    • make a new backup and destroy the older ones.

    Then each person's folio command, when the server shows the new key, fetches the site's keys again from its pages, shows the new fingerprints beside the old ones and asks (Trust the new keys? Type yes); without a terminal it says to run folio --site NAME --host-keys. The desktop program asks the same in a window. A build node stops (the site's pages (...) list other SSH keys than the ones this node trusts for it) until its owner runs folio-node trust-host-keys and answers yes. Each of them compares the fingerprints with the ones you gave; none takes new keys by itself.

  4. Check the record: admin verify. Changes signed with the stolen key before the emergency are listed as "signed by a signing key that was later revoked as stolen, before it was revoked". They may be the site's own, or the thief's with an earlier date. Until you accept them, admin verify fails. Each is listed with what it changed:

      3 signed by a signing key that was later revoked as stolen, before it was
        revoked. The thief can date a change back, so these do NOT hold until the
        owner has looked at each (compare it with a copy of the record from before:
        a backup, or the forge's copy) and accepted it: admin verify accept CODE...
        1a2b3c4  2026-11-20 09:12  member  comment hello
          changed: packages/hello/comments/20261120T091200Z-member
    

    Compare each with a copy of the record from before the break-in (a backup, or the forge's copy). A change a person asked for carries their signed request, which you can check with gpgv against their key in the commit before (see Seeing and undoing changes); a change with no request, or one that does not hold, was not asked for by anyone, unless it is one of the timed jobs' imports or publishing. Undo one that is not the site's own (admin undo CODE). Then accept those that are, as the owner:

    folio admin verify accept 1a2b3c4 5d6e7f8
    

    You should see Accepted as the site's own, by OWNER: and each change again. admin verify accept all accepts every change that is listed, and lists each one it accepted. The acceptance is written in the record, in verify/accepted (one line per change: the change, the key that signed it, who accepted it and when), as a change signed with the new signing key. admin verify counts only acceptances that the site's key signed while it counted, made by whoever owned the site then. Only the owner can accept (folio: only the owner can accept changes that admin verify doubts). An undone change stays in the history, so it is still listed: accept it too once its undoing is recorded. "Accept" means "the owner has reviewed this change", not "this change is fine": for a forged change you undid, accepting it says you looked at it and its undoing is recorded. The record still shows it, and the undoing after it.

    A change signed with the stolen key after the emergency counts as NOT holding, for good: it cannot be accepted (folio: CODE was signed with a stolen signing key after it was revoked: it never holds, and cannot be accepted). See Troubleshooting.

    Until admin verify passes, admin erase is refused: erasing signs every change again with the site's key, which would make the doubtful ones look like the site's own.

Backups and moving the site

This has a page of its own, because it must be exactly right: Backup and Restore. In one line each:

  • sudo -u folio /usr/lib/folio/folio-backup save /srv/folio/backup.tar puts the site into one file, made so that nobody else can have made it first. Run as root (sudo /usr/lib/folio/folio-backup save ...) it holds the signer's keys too. Unless you give --encrypt-to KEY, the file holds them unencrypted: keep it as safe as the server. It never holds the master.
  • sudo FOLIO_RESTORE=/root/backup.tar /usr/lib/folio/folio-install on a server with the package installed and no site yet brings it back. Where a site exists, it stops and changes nothing; move the old folder away first (sudo mv /srv/folio /srv/folio.old).
  • The forge copy is not a backup of the private folder.

Where things are on the server

Folder What
/srv/folio/record the record: accounts, packages, votes, comments, requests, mirrors, nodes, settings (a git repository; every change is a signed commit)
/srv/folio/site the pages; written again after every change
/srv/folio/apt the signed apt archive
/srv/folio/builds every build: its facts, its log, its files
/srv/folio/source for each package, the packaging files its page shows
/srv/folio/guides the guides shown under Help
/srv/folio/cache/fetched the site's working copies of the projects it imports; made again from the forges if deleted
/srv/folio/cache/published.git the site's working copy of what it sends to the forge; fetched again from the forge if deleted
/srv/folio/cache/found projects found on a watched forge, and which were declined. Not made again: deleting it forgets the declines
/srv/folio/cache/needs what each built package needs to run, for its page
/srv/folio/private what must stay private; readable by folio only. Back this up, and keep it secret
/srv/folio/private/gnupg the site's public key (on a site of the older kind, its signing keys too)
/srv/folio/private/key-state which signing key signs, and where a change of signing key stands
/srv/folio/private/keyring the site's keyring package, as last made
/srv/folio/private/reprepro the archive's index
/srv/folio/private/mail people's mail addresses
/srv/folio/private/outbox mail waiting to be sent
/srv/folio/private/forge the forge's confirmed host key (on a site of the older kind, also the key and the access token the site uses on the forge)
/var/lib/folio-sign the site's signer: gnupg (the signing keys) and forge (the forge key and token), readable by the user folio-sign only; sign.log, every signature it made, readable by all
/srv/folio/private/sshd/authorized_keys who may come in; sshd reads this; written from the record
/srv/folio/private/requests every signed request the site took, as NONCE and NONCE.asc, also for the changes outside the record
/srv/folio/private/nonces the nonces of the requests of the last 20 minutes, so that none counts twice
/srv/folio/private/activity.log everything that reached the site (the lines before, once it passed 5 MB: activity.log.1)
/etc/folio/folio.conf where the site's folder is, and how its signer is reached (signer, signer-home)
/etc/sudoers.d/folio the one rule by which folio asks the signer (folio-signer)
/var/lib/folio/installed copies of what folio-install wrote outside the site, so that an upgrade updates the files nobody changed
/etc/cron.d/folio the timed jobs
/etc/nginx/sites-available/folio the web server's settings for the site
/etc/ssh/sshd_config.d/folio.conf the SSH settings for the user folio

The timed jobs

Every What Program
2 minutes import new commits and new repositories from the forges; note new projects on a watched forge; mail the owner when the signing key is due to be renewed, and let a new signing key take over when its day has come /usr/lib/folio/folio-fetch --all
2 minutes, right after send what changed to the forge (record, pages, archive, package list) /usr/lib/folio/folio-mirror
5 minutes send waiting mail /usr/lib/folio/folio-mail

To run one by hand and see what it says, on the server: sudo -u folio /usr/lib/folio/folio-mirror now. The others are in the Command Reference.