Day to day
Run every command on this page in the deploy folder on your server.
The common tasks
Section titled “The common tasks”| To | Run |
|---|---|
| Update to the latest version | git pull && ./start.sh |
Apply a changed setting in .env |
docker compose up -d |
| See the logs | docker compose logs -f lyra |
| Stop Lyra | docker compose down |
| Start it again | ./start.sh |
Database changes that come with an update run each time Lyra starts, before the server takes any requests. Stopping Lyra keeps all data in Docker volumes, so docker compose down loses nothing. Only docker compose down -v deletes the volumes and everything in them.
Lyra writes one JSON line for anything worth knowing later, such as a sign-in, an email sent or a setting that changed. Docker keeps the last 50 MB of each container’s logs.
| To see | Run |
|---|---|
| Lyra’s log as it happens | docker compose logs -f lyra |
| The last hour | docker compose logs --since 1h lyra |
| Caddy’s log, for HTTPS problems | docker compose logs caddy |
To see more, set LOG_LEVEL=debug in .env and run docker compose up -d. Lyra then also logs each request as it starts and finishes. Monitoring explains how to send logs, errors and traces to Sentry or Datadog.
People
Section titled “People”Admins manage their own organization under Settings → People: they can change roles, remove people and invite someone by email. The commands below work from the server, for anyone on it.
| To | Run |
|---|---|
| Remove someone who left | docker compose exec lyra node --import tsx scripts/users.ts remove ada@acme.com |
| Let them back in | docker compose exec lyra node --import tsx scripts/users.ts restore ada@acme.com |
Removing someone signs them out everywhere, revokes their API tokens and connected apps, and stops them signing in again or getting emails, even while their email still works. Their pages and edits stay. Do it when someone leaves the team: until then, an emailed sign-in link or a token still works for them.
Organizations
Section titled “Organizations”| To | Run |
|---|---|
| List organizations, their people and domains | docker compose exec lyra node --import tsx scripts/orgs.ts list |
| Make someone admin, member or guest of an organization | docker compose exec lyra node --import tsx scripts/orgs.ts set-role acme ada@acme.com admin |
| Add an email domain to an organization, already verified | docker compose exec lyra node --import tsx scripts/orgs.ts add-domain acme acme.com |
orgs.ts takes an organization by its address: the part after the domain in docs.acme.com/acme. set-role adds the person if they aren’t in the organization yet.
Published pages and reports of abuse
Section titled “Published pages and reports of abuse”When ABUSE_REPORT_EMAIL is set, published pages show a Report abuse link, and reports are emailed to that address. These commands act on what you find:
| To | Run |
|---|---|
| Turn off the public link a page is published through | docker compose exec lyra node --import tsx scripts/abuse.ts unpublish <public link or page address> |
| Close an organization: nobody can open it and its public links stop | docker compose exec lyra node --import tsx scripts/abuse.ts suspend acme |
| Open a suspended organization again | docker compose exec lyra node --import tsx scripts/abuse.ts unsuspend acme |