We offer customization solutions and support ([email protected]) | Visit us on bitbyte3 for complete VOD solutions with apps.
NixStream
Guides

Storage

Local and S3-compatible storage providers

NixStream stores encoded media, uploads, thumbnails, and subtitles on configurable backends. Local disk is simplest; S3-compatible object storage scales better.

Default (local)

Docker and manual installs default to FILESYSTEM_DISK=local. Files are stored under:

storage/app/public/videos/

Typical layout per video:

videos/YYYY/MM/DD/{slug}-{uuid}/
  source/           # Original upload
  outputs/
    hls/            # HLS manifests and segments
    dash/           # DASH manifests and segments
    thumbnails/     # Poster and sprite images
    subtitles/      # VTT tracks
    transcripts/    # Whisper audio extracts

Run php artisan storage:link to symlink public/storage for web access.

Disk planning

Estimate storage as:

  • Source file size (retained unless deleted)
  • Encoded output (often 1.5 to 3x source depending on ladder)
  • Thumbnails and subtitles (small relative to video)

Monitor disk usage:

du -sh storage/app/public/videos/
df -h

S3-compatible storage

Set up S3-compatible providers (AWS S3, MinIO, DigitalOcean Spaces, Backblaze B2, etc.) in Settings > Storage:

FieldDescription
Endpoint URLS3 API endpoint
Access keyIAM or provider access key
Secret keyIAM or provider secret
BucketTarget bucket name
RegionProvider region
Path prefixOptional folder prefix inside bucket

Laravel's filesystem uses the AWS S3 SDK (league/flysystem-aws-s3-v3).

Example .env for S3

FILESYSTEM_DISK=s3
AWS_ACCESS_KEY_ID=your_key
AWS_SECRET_ACCESS_KEY=your_secret
AWS_DEFAULT_REGION=us-east-1
AWS_BUCKET=nixstream-media
AWS_ENDPOINT=                    # Leave empty for AWS; set for MinIO/Spaces
AWS_USE_PATH_STYLE_ENDPOINT=false

After changing storage settings, new uploads use the selected provider. Existing videos remain on their original disk unless migrated manually.

Storage provider selection

Set the default provider for new uploads in Settings. You can register multiple providers and switch the default without deleting old content.

Changing the default provider does not move existing files. Plan migrations before switching production storage.

Permissions

Local storage requires write access for the web server and queue worker user:

chown -R www-data:www-data storage bootstrap/cache
chmod -R 775 storage bootstrap/cache

Docker handles permissions inside the container. Manual installs must align www-data (or your PHP-FPM user) with the queue worker user.

Backup considerations

When using local storage, include storage/app/public in backups. For S3:

  • Enable bucket versioning
  • Configure lifecycle rules for old segments if needed
  • Use cross-region replication for disaster recovery
cd nixstream/nixstream
./scripts/backup.sh

Docker volumes

Docker Compose mounts storage and database as named volumes:

docker volume ls | grep nixstream

Data persists across container restarts. Use ./install.sh --reset with caution because it deletes volumes and all data.

Cleanup

Delete videos from the admin panel to remove database records and storage files. Orphaned files from failed jobs may remain; periodic cleanup scripts can scan storage/app/public/videos/ for folders without database entries.

Backups: Backup & Restore. Env vars for disks: Environment Variables. Upload flow: VOD Uploads.

On this page