Skip to main content

Storage

Vidra's storage architecture has three layers: an Upload Path that ingests and validates incoming files, Primary Storage where transcoded files live (local disk or S3), and an optional Distributed tier (IPFS, WebTorrent) that reduces bandwidth and improves availability at scale. All three serving methods — direct HTTP, P2P, and IPFS gateway — can be active simultaneously.

Storage Architecture

Storage Backends

Primary Storage — Choose One

BackendPath / ConfigBest for
Local Filesystem./data/storage/ (default)Development, single-server deployments with sufficient disk
S3-CompatibleMinIO (self-hosted) or AWS S3Production deployments — scales independently of the API server, survives instance replacement

Distributed Storage — Both Optional

BackendPurposeWhen to enable
IPFSContent-addressed pinning — files are replicated across the IPFS networkWhen you want P2P distribution or long-term content preservation
WebTorrentP2P streaming from viewer to viewerWhen you want to reduce origin bandwidth at scale (viewers help serve each other)
IPFS CID persistence

When IPFS is enabled, the FFmpeg worker pins each transcoded file after upload and stores the resulting CIDs in PostgreSQL. If your IPFS node goes offline, the CIDs remain in the database and files are still served via direct HTTP from primary storage.

Integration Testing Ports

Integration tests run on a separate port range (19xxx) to avoid conflicting with the development Docker Compose services on their default ports.

ServiceTest PortDefault Dev Port
MinIO (S3)19100
ATProto PDS19200
ActivityPub Mock19300
Mailpit194011025
IOTA Node1950014265
PostgreSQL154325432
Redis163796379
IPFS150015001