npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

dcent-archiver

v1.2.0

Published

Archive files into a hyperdrive

Readme

Dcent Archiver

Archive files into a hyperdrive, so they can be backed-up on other devices.

Dcent archiver uses peer-to-peer connections and append-only logs to distribute the files, so it works reliably and at scale, on all networks. Notably, it works on home networks, and does not require the backuppers to be online at all times. This means you can ask friends and family to help back up your data.

Supports encryption. When enabled, the back-ups are not readable without the encryption key.

Intended for files which do not change, such as images or video.

Any seeder in the hypercore ecosystem can be used to replicate the drives. Examples include blind peer and stupid seeder.

Description

This tool adds all files in a directory to a hyperdrive. After the files are added, they can be deleted (they will remain available on the hyperdrive).

There is a delay of 10 minutes before a file is added to the hyperdrive. Once a file is added, it will never be added again. So for files which change (such as a document which is updated), only the first version will be archived. The exception is when a file is updated during the grace period of 10 minutes.

Install

npm i -g dcent-archiver

Usage

Parameters are passed in as environment variables.

The DCENT_ARCHIVER_DIR environment variable has to be set to the directory you wish to archive.

Optional parameters include:

DCENT_ARCHIVER_ENCRYPTION_KEY=mysecretkey # default not encrypted
DCENT_ARCHIVER_KEY_FILE=my/key/file # alternative way of passing in an encryption key
DCENT_ARCHIVER_CORESTORE=my/corestore/loc # Defaults to ~/.dcent-archiver
DCENT_ARCHIVER_LOG_LEVEL=debug # defaults to info. See pino docs for the options.

CLI

DCENT_ARCHIVER_DIR=/dir/to/watch/ dcent-archiver | pino-pretty

Note: piping the output into pino-pretty is optional, but shows human-readable logs. Run npm i -g pino-pretty to install it.

Docker

Replacing /my/dir/to/archive/, run:

sudo docker run --rm --network=host --mount type=bind,source=/my/dir/to/archive/,target=/home/dcent-archiver/dir/,readonly --mount type=volume,source=dcent-archiver-corestore-volume,target=/home/dcent-archiver/corestore hdegroote/dcent-archiver

Restoring

dcent-archiver-restore <drive key>

Optional parameters include:

DCENT_ARCHIVER_RESTORE_ENCRYPTION_KEY=mysecretkey # default assumes not encrypted
DCENT_ARCHIVER_RESTORE_KEY_FILE=my/key/file # alternative way of passing in an encryption key
DCENT_ARCHIVER_RESTORE_CORESTORE=my/corestore/loc # Defaults to ~/.dcent-archiver-restore
DCENT_ARCHIVER_RESTORE_TARGET=dir/to/restore/to # Defaults to ~/dcent-archiver-restore

The files are restored under a sub directory. This ensures you never accidentally overwrite other files.

For example, restoring a drive with key aaaaaa' will by default unpack it at ~/dcent-archiver-restore/aaaaaa.../

Security

Security relies on the capability system of Hypercore: only people who know its key can download the Hyperdrive.

You should share the key with other machines so they can replicate the archive, to have redundant backups.

For some use cases, the content of the Hyperdrive should not be shared with the back-uppers. For example if the backups contain private data, or if the backup machines run in publicly accessible spaces without an encrypted hard disk. For those cases: define an encryptionKey.

Knowing the key of an encrypted hyperdrives gives the capability of backing it up, but not of reading its content.

Note: the device where the dcent-archiver process runs is assumed to be secure and fully trusted (no effort is made to hide the encryption key there).

Disclaimer: in theory, encrypted drives can be safely backed up by hostile third parties, but I would recommend against such usage until the tool is more battle tested. For now, stick to friends and your own devices.