JotNotes JDrive

Installing and upgrading

This is the short installation guide for a hosting company. The complete guide is docs/INSTALL.md inside the download.

Requirements

Use Ubuntu 22.04, 24.04 or 26.04, or Debian 12 or 13, with systemd. JDrive requires Node 20 or newer. Give the service a domain name, an HTTPS reverse proxy, and an SMTP service before you sell accounts.

JDrive keeps code in /opt/jdrive, customer data and backups in /var/lib/jdrive, and configuration in /etc/jdrive. An upgrade replaces the code directory but does not touch the data or configuration directories.

Verify the download

Download the archive, its .sig and .sig.txt files, and verify-release.js, and put them in one directory. Run:

node verify-release.js jdrive-0.1.0.tgz

The verifier checks the signed release statement and its SHA-256 value. Do not extract the archive unless it prints JDrive release verified.

Install

tar -xzf jdrive-0.1.0.tgz
cd jdrive-0.1.0
sudo ./server/tools/install.sh

The installer creates a non-login jdrive system account, prepares the directories and signing secret, installs dependencies, starts the systemd service, and asks for the first owner account. It is safe to run the installer again: it keeps the existing secret and data.

Put nginx and HTTPS at the front door

JDrive listens on 127.0.0.1:9990 and does not terminate TLS. Allow ports 80 and 443 through the firewall, obtain a certificate, and proxy the public domain to that loopback address.

The nginx location must use HTTP/1.1 and pass X-Forwarded-For, X-Forwarded-Proto, X-Real-IP, and Host. Set client_max_body_size at least as high as MAX_UPLOAD_MB, which defaults to 2048. Long uploads also need suitable proxy read and send timeouts. The full nginx example is in docs/INSTALL.md inside the download.

Set JDrive's public address and restart it:

sudo nano /etc/jdrive/jdrive.env
sudo systemctl restart jdrive

Set PUBLIC_BASE_URL=https://files.example.com. Password-reset mail and published addresses use this value.

Configure mail

Without SMTP, JDrive writes mail files to /var/lib/jdrive/data/mail-spool; no message leaves the server. Set these values in /etc/jdrive/jdrive.env, then restart JDrive:

SettingPurpose
SMTP_HOSTMail server. Leaving it unset keeps mail in the spool.
SMTP_PORTPort. The default is 587.
SMTP_SECUREtrue or false. When unset, port 465 is secure and other ports are not.
SMTP_USERSMTP user, if required.
SMTP_PASSSMTP password, if required.
MAIL_FROMSender address. Set this to an address your mail server accepts.

Mail is required for address confirmation, password resets, and account-move notices.

Install a licence

Sign in as the hosting-company owner and open Console → Licence. Paste the signed key there. A key is checked on the server. A new server runs for 30 days in evaluation before new accounts and uploads stop. Existing files remain available.

Upgrade

Take a backup first. Use the upgrader from the installed version:

sudo /opt/jdrive/server/tools/upgrade.sh /path/to/jdrive-0.1.1.tgz

The upgrader verifies the new archive before extracting it, runs the new installer in upgrade mode, installs the new code and dependencies, rebuilds the interface, and restarts the service. It leaves /var/lib/jdrive and /etc/jdrive alone. Database migrations run when the new service starts.

Update notices

Once a day, JDrive reads a signed release notice from https://jdrive.jotnotes.com/releases/latest.json. Only the hosting-company operator sees the notice. JDrive marks security updates and links to release notes, but never installs an update itself.

Set JDRIVE_UPDATES_URL=https://example.com/latest.json to use a mirror, or JDRIVE_UPDATES_URL=off to stop update checks. A mirror's notice must still have a valid signature.

Back up and restore

Back up /var/lib/jdrive and /etc/jdrive/jdrive.env together. Stop the service while copying the SQLite database:

sudo systemctl stop jdrive
sudo tar -C /var/lib -czf jdrive-$(date +%F).tar.gz jdrive
sudo cp /etc/jdrive/jdrive.env jdrive-env-$(date +%F).bak
sudo systemctl start jdrive

To inspect and restore one of JDrive's own backups, stop the service and use the installed restore tool:

cd /opt/jdrive/server
sudo -u jdrive node --env-file=/etc/jdrive/jdrive.env tools/restore.js --list
sudo -u jdrive node --env-file=/etc/jdrive/jdrive.env tools/restore.js --verify <backup id>
sudo systemctl stop jdrive
sudo -u jdrive node --env-file=/etc/jdrive/jdrive.env tools/restore.js --from <backup id> --force
sudo systemctl start jdrive

The environment file points the tool at the installed data directory. A restore refuses a backup that does not verify. It moves the displaced data aside and signs everyone out. The full guide also covers S3-compatible offsite copies.

Usage reporting

Once a day, a Hosting server reports its version, random server ID, licence fingerprint, account total, stored bytes, and transfer bytes for the last 30 days. It does not report names, email addresses, or files. The response can renew a free licence and provide the All my servers totals shown on Overview.

To stop reporting, set this in /etc/jdrive/jdrive.env and restart JDrive:

JDRIVE_LICENCE_SERVER=off

A free licence stops renewing when reporting is off.

See docs/INSTALL.md inside the download for embedding, restricted browser origins, container installation, uninstalling, offsite-backup settings, and troubleshooting.