Setting up your own Hyperdrive site

Last updated: 2023-07-02

This guide assumes your server is running Debian 12 and you have root access to it.

Installing Node.js

The version of Node.js included in the default Debian repositories is too old, so we have to install a newer version from upstream.

Add the repository to apt:

curl -fsSL | sudo -E bash -

Then install the program:

sudo apt install nodejs


Install Hyperdrive in an isolated folder

Create a folder we'll keep all of Hyperdrive's data inside:

mkdir ~/hyperdrive

Go inside that directory:

cd ~/hyperdrive

Install Hyperdrive:

HOME=/home/$USER/hyperdrive/ npm install drives

Setting the HOME variable to ~/hyperdrive ensures that all the installation files are forced inside that folder.


Making a Hyperdrive site

Because we didn't install drives locally, we'll use the npx tool, included in Node.js, to run drives directly from ~/hyperdrive.

Let's make a new Hyperdrive:

HOME=/home/$USER/hyperdrive/ npx drives touch

You'll get output like this:

Storage: /home/lethe/hyperdrive/.drives/corestore
New drive: au94ynnhkeyrjmkrhnfufi3fx6wofows3rujo5rj8ogkzij59zqy

The second line has the public key of your site.

Now we'll mirror some files into it:

HOME=/home/$USER/hyperdrive/ npx drives mirror /path/to/original/site/files MyPublicKey --live --verbose

drives will mirror your site to that Hyperdrive and automatically add any changes it sees in the original folder. The program will keep running until you press Control and C to make it quit.

made with <3 by your friends at Dead End Shrine Online
CC BY-NC-SA 4.0 © Lethe Beltane