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
SIGINTorSIGTERM, the server saves every open canvas before it exits.docker stopsendsSIGTERM.
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 thekeysfolder. - 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:
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:
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
- Stop the server.
- Put the files back into the data folder.
- Start the server.
For the Docker volume:
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 archipelegoList canvases
GET /api/canvases lists the canvases on the server, newest first:
curl http://localhost:1234/api/canvasesEach 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:
- Stop the server.
- Delete
<canvas id>.yjsfrom the data folder. - Delete
keys/<canvas id>.jsonif it exists. - Start the server.