3.1 KiB

  1. # Memento — Nextcloud web archive server
  2. If you host snapshots of web pages on your Nextcloud, this app enables any client that speaks the
  3. Memento protocol to access these snapshots. It is part of an experiment aiming to create personal
  4. web archives.
  5. The Memento protocol ([RFC7089][]) is widely used to ask archives (such as the Internet Archive's
  6. [Wayback Machine][]) for their copies of web pages. For example, a client (e.g. a browser extension)
  7. may ask an archive whether it has a copy of `` from around July last year, and
  8. —if successful— will be redirected to the closest match.
  9. ## Snapshot format
  10. Currently this app only supports snapshots that are stored as plain html files (supporting [WARC][]
  11. files could be a future addition). It recognises a file as being a snapshot if the file contains a
  12. `<link>` to the location of the original page; such snapshots can be created using [Freeze-dry][].
  13. For example, assume you have an html file `example.html`. If this file contains a `<link
  14. rel="origin" href="">` in its `<head>`, it will be recognised as a snapshot of
  15. ``.
  16. ## Usage
  17. This app presents a Memento TimeGate at the `/timegate/{url}` route. Assuming that the
  18. `example.html` of the above example resides in a shared folder with URL `/s/123abc`, then visiting
  19. `/apps/memento/timegate/` would redirect you to
  20. `/apps/raw/s/123abc/example.html` (hence you need the [Raw][] app as well).
  21. Note that a private file will only be found if the client supplies login credentials (i.e. the
  22. session cookie). Otherwise, only files/folders for which 'Share link' is enabled will be scanned.
  23. In a typical Memento client (e.g. the [Memento Time Travel][] browser extension), you would add your
  24. archive as `https://my-nextcloud/apps/memento/timegate/` (of course first replace `my-nextcloud`
  25. appropriately).
  26. A TimeMap is also exposed, at the `/timemap/{url}` route, to list all available snapshots of a URL.
  27. For details, look at the documentation of the Memento protocol ([RFC7089][]).
  28. The app normally looks for shared snapshots of all users on the Nextcloud instance. To limit results
  29. to those of a single user, use `.../u/{userid}/timegate/...` instead of `.../timegate/...` (and
  30. likewise for `timemap`).
  31. ## Requirements
  32. Besides of course Nextcloud itself (tested on version 14), this app requires the app [Raw][] to also
  33. be installed, in order to host the snapshots.
  34. ## Installation
  35. Clone this repo into your Nextcloud installation's `/apps` (or `/custom_apps`) folder, ensuring the
  36. folder's name is `memento`:
  37. git clone memento
  38. Then log into Nextcloud as admin, find and enable it in the list of apps.
  39. This app is currently not published in the Nextcloud app store.
  40. [Memento Time Travel]:
  41. [RFC7089]:
  42. [Wayback Machine]:
  43. [WARC]:
  44. [Freeze-dry]:
  45. [Raw]: