Skip to content
← All posts

Running your own tapeshelf

tapeshelf is open source under the AGPL-3.0, and the app behind tapeshelf.com is the one you’ll be able to run on your own server. The public repository and the install guide aren’t out yet. Until they are, here’s what running your own instance will look like, so you can decide whether it’s for you and plan a server.

One stack

An instance is a single Docker Compose stack:

browser ──HTTPS──► Caddy ─── the web app, security headers
                     └── /api, /ws ──► api ──► Postgres, Redis
                                       worker (ffmpeg) ──► Postgres, Redis
browser ──► S3-compatible storage: uploads, video segments, images
  • Caddy serves the web app and passes API and WebSocket traffic on. It gets and renews a Let’s Encrypt certificate by itself. If you already run a reverse proxy, Caddy can sit behind it without TLS.
  • api is everything the app does: accounts, shelves, access checks, requests and trades, temporary links, and handing out video keys.
  • worker is the same code started as a second process, in an image with ffmpeg. It cleans and converts uploads, encrypts the streaming copies, makes the frames and previews, renders edits, and sends email and notifications.
  • Postgres holds the data. Redis holds the job queues and short-lived caches.
  • A one-off migrate container runs at every start. It applies database migrations, creates the admin account from your settings, and sets up the buckets: public reads without listing for images, a cleanup rule for abandoned uploads, and CORS for your domain.
  • A backup service dumps the database into your bucket once a day and keeps the last 14 dumps.

Video never passes through the API. Browsers upload straight to storage and stream segments straight from it, so the storage needs an address of its own that browsers can reach. That’s the one part that takes some thought. You can point tapeshelf at an S3-compatible service you already use, or run storage in the same stack.

What you’ll need

  • A Linux server with Docker and the Compose plugin. Two CPU cores and 4 GB of RAM is a sensible minimum.
  • Disk space for the worker’s temporary files: about two and a half times the largest video, for each one processed in parallel.
  • A domain pointing at the server, with ports 80 and 443 open.
  • An SMTP account for email: confirmations, password resets and notifications.
  • Optionally, your own Google OAuth client for “Sign in with Google”, and Cloudflare Turnstile keys for the captcha on repeat sign-ups and new guests.

Converting video is the heavy part. H.264 video at up to 1080p that passes a few more checks only needs repackaging, which takes seconds. A full conversion on a small two-core server takes about as long as the video itself, sometimes longer. The uploader sees the progress live and can carry on using the site.

The secret you must not lose

All settings live in one environment file: the database password, session secrets, storage credentials, SMTP, and the master key from which every video’s encryption key is derived. How tapeshelf encrypts video explains it. In production, the API refuses to start with the sample values from the example file.

Put the master key in a password manager the moment you generate it. If it’s lost, none of the uploaded videos will play again, and restoring the database won’t help. Authenticator-app codes for two-step sign-in stop working too, since their secrets are sealed with it.

What’s different from tapeshelf.com

A self-hosted instance has no plans and no payments. There’s no Free or Pro, no Plan tab, no upgrade prompts and no wait page before downloads. In detail:

  • No limits unless you set them. By default there’s no cap on video size or shelf size. As the admin, you can set one limit per video and one per shelf, the same for everyone.
  • Downloads start right away, at full speed, straight from storage.
  • What’s Pro on tapeshelf.com is there for everyone. That’s the video editor, the hidden page and passwords on temporary links. Deleted videos can be restored for 90 days.
  • Anti-abuse stays. The daily request limit (30 videos by default, adjustable) and the API rate limits protect the server, so they remain.
  • Your name, your rules. The instance has its own name and contact email, and shows your terms and privacy policy from files you provide. Visitors first see a simple sign-in page.

Everything else is the same app: shelves with stacks and categories, resumable uploads, the 16-frame preview, encrypted streaming, requests and multi-round trades, exchanges with guests, temporary links, friends and chat, two-step sign-in (required for the admin), notifications, the app in 20 languages, reports, and an admin panel.

Keep in mind that an instance is its own island. People on it share and trade only with each other, never with accounts on tapeshelf.com or on other instances.

Updates and backups

Updating means pulling the new version and restarting the stack. Migrations apply on start, and a video that was being processed starts over. Take a backup before a major update all the same.

Daily database dumps land in your bucket on their own. The videos already live in storage, and their keys come from the master key. So the three things to keep safe are the bucket, the database dumps and that one key.

The license, in one paragraph

You can run tapeshelf, study it and change it. If you modify it and let other people use your modified version over a network, the AGPL requires you to offer them the source code of that version. Running it unchanged, for yourself, your family or your friends, needs nothing more than keeping the license with it.

When

Soon we’ll publish the repository, ready-made container images and an install guide covering storage, email, backups and troubleshooting. The self-host page and this blog will say so on the day, and the RSS feed is the easiest way not to miss it. Meanwhile, tapeshelf.com is the quickest way to try the app, and pricing has the details.