English

Admin guide Operations

Data and backup

What the data folder holds, when the server saves, and how to back up and restore canvases.

On this page

Everything Archipelego keeps lives in one data folder. Back up that folder and you back up every canvas.

The data folder

The data folder is ARCHIPELEGO_DATA. From source the default is server/data. In the Docker image it is /data, a volume.

File What it holds
<canvas id>.yjs One canvas: its blocks, connections, post-its, layers, chat, title, version and AI router settings, as one Yjs update.
keys/<canvas id>.json The AI keys stored on the server for that canvas, encrypted. Only present when someone stored a key.
.vault.key The random master key that encrypts stored AI keys. Only present when ARCHIPELEGO_SECRET is not set.

A canvas id is the value after /canvas/ in the canvas link. It has 43 URL-safe characters.

When the server saves

  • The server saves a canvas one second after the last change.
  • It writes to a temporary file first, then renames it. A crash during a save never leaves half a file.
  • When the last person leaves a canvas, the server saves it and closes it in memory.
  • On SIGINT or SIGTERM, the server saves every open canvas before it exits. docker stop sends SIGTERM.

Each browser also keeps a copy of the canvas in IndexedDB. When the connection drops, people keep working. Their changes sync when the connection returns.

The vault key

Stored AI keys decrypt only with the master key that encrypted them.

  • If you use .vault.key, back it up together with the keys folder.
  • If you use ARCHIPELEGO_SECRET, keep the value in a password manager.

Without the master key, the canvases still open. Only the stored AI keys are lost, and people add them again.

Back up

Docker volume

Archive the archipelego-data volume into the current folder with a short-lived container:

bash
docker run --rm -v archipelego-data:/data -v "$(pwd)":/backup alpine tar czf /backup/archipelego-data.tar.gz -C /data .

The archive includes the hidden .vault.key file.

Plain folder

From source, archive the data folder:

bash
tar czf archipelego-data.tar.gz -C server/data .

Any file copy works too. For a consistent copy, stop the server first, or copy while nobody is editing.

Restore

  1. Stop the server.
  2. Put the files back into the data folder.
  3. Start the server.

For the Docker volume:

bash
docker stop archipelego
docker run --rm -v archipelego-data:/data -v "$(pwd)":/backup alpine sh -c "cd /data && tar xzf /backup/archipelego-data.tar.gz"
docker start archipelego

List canvases

GET /api/canvases lists the canvases on the server, newest first:

bash
curl http://localhost:1234/api/canvases

Each entry has an id, a title, a version, a blocks count and an updatedAt date. The list holds at most 50 canvases. Empty canvases, with no blocks, are left out.

The app shows the same list under Canvases on this server in the library dialog.

Delete a canvas

Archipelego has no delete button for a whole canvas. To delete one:

  1. Stop the server.
  2. Delete <canvas id>.yjs from the data folder.
  3. Delete keys/<canvas id>.json if it exists.
  4. Start the server.