Wayback Restorator

Development

Run Wayback Restorator from source and test your changes.

Get the source

git clone https://gitlab.com/restorator-labs/wayback-restorator.git
cd wayback-restorator

Work with either Docker Compose or a local Python environment.

With Docker Compose

The restorator script builds the image from your checkout and runs it. It requires Docker with Compose.

CommandPurpose
./restorator restore '<URL>' [options]Restore a capture into data/ in the repository. Accepts the CLI options.
./restorator webStart the dashboard on port 8080, storing jobs in Compose volumes.
./restorator devRun the API and the dashboard with hot reload on port 5173.
./restorator testRun the Python tests.

Each command rebuilds the image, so source changes are included. With ./restorator dev, dashboard changes reload in the browser; restart the command after Python changes.

With a local environment

Create a virtual environment with Python 3.11 or newer, activate it, and install the package in editable mode:

python3 -m venv .venv
source .venv/bin/activate
pip install -e '.[test]'

On Windows, activate it with .venv\Scripts\activate. Activate the environment again in each new terminal.

While it is active, wayback-restorator runs your checkout. The dashboard needs its frontend built into the package once, and again after frontend changes. This requires Node.js 22 or newer:

npm ci --prefix frontend
npm --prefix frontend run build

For frontend work, run npm --prefix frontend run dev next to wayback-restorator web. The development server on port 5173 forwards API requests to the dashboard on port 8080.

Run the tests

pytest -q

Or run them in Docker with ./restorator test. Merge requests run the tests on Python 3.11 and 3.13.

Documentation site

These pages live in docs/ and are built with Fumadocs. See docs/README.md for local preview and deployment.

On this page