# Self-host ArchiveBox

> A self-hosted web archiver that saves pages as HTML, PDF, screenshots, WARC and media so links never rot. Creates the admin account on first start.

- Page: https://levelrail.com/templates/archivebox/
- JSON: https://levelrail.com/templates/archivebox.json
- Category: Productivity
- Licence: MIT (Permissive license)
- Source: https://github.com/ArchiveBox/ArchiveBox
- Upstream docs: https://github.com/ArchiveBox/ArchiveBox/wiki/Docker

## Requirements
- Memory: about 1.5 GiB
- amd64: published, arm64: tested
- Needs configuration before start: no
- Pinned image tag: 0.9.76

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| archivebox | archivebox/archivebox | 0.9.76 | 5797 | data -> /data; tmp -> /tmp/archivebox |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| archivebox | ADMIN_PASSWORD | generated |
| archivebox | ADMIN_USERNAME | preset |
| archivebox | ARCHIVEDOTORG_ENABLED | preset |
| archivebox | PUBLIC_ADD_VIEW | preset |

## Deploy

### CLI

```bash
levelrail-cli templates install archivebox --name my-archivebox
```

Add --domain SERVICE=HOST to serve a service on your own domain, for example --domain archivebox=app.example.com.

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" -H "Content-Type: application/json" \
  https://levelrail.example.com/api/v1/service-templates/archivebox/install \
  -d '{
    "name": "my-archivebox"
  }'
```

Create a token in the dashboard first. Name, env and domains are the request fields.

## Questions

### Can I deploy ArchiveBox on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id archivebox for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image archivebox/archivebox:0.9.76 is what you deploy there.

Self-host ArchiveBox, ArchiveBox docker compose file, deploy ArchiveBox on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
