# Send Encrypted File Sharing

> Simple, private file sharing with automatic expiry (Firefox Send fork).

- Category: Productivity & Collaboration
- Difficulty: beginner
- Components: send, redis
- Tags: file-sharing, send, encryption, privacy, expiry
- Source: https://docker.recipes/productivity/send-file-sharing

## Overview

Send is a privacy-focused file sharing platform that emerged as a continuation of Mozilla's discontinued Firefox Send project. This self-hosted solution provides end-to-end encryption for temporary file sharing, where files are encrypted in the browser before upload and automatically deleted after download or expiration. The encryption keys never touch the server, ensuring true zero-knowledge file sharing.

This deployment combines Send with Redis to create a robust temporary file sharing service. Redis serves as the session store and metadata cache, tracking download counts, expiration times, and file metadata without ever accessing the actual file contents. The in-memory nature of Redis makes it perfect for managing the ephemeral data associated with temporary file shares, while Send handles the encrypted file storage and browser-based encryption/decryption.

This stack is ideal for organizations, developers, or privacy-conscious individuals who need secure file sharing without relying on third-party services. Unlike traditional cloud storage solutions, this setup ensures that sensitive documents, source code, or personal files remain encrypted and automatically purged, making it perfect for temporary collaborations, secure document handoffs, or any scenario where data retention policies require automatic cleanup.

## Features

- Client-side end-to-end encryption using AES-GCM with keys generated in browser
- Automatic file expiration with configurable time limits up to 7 days
- Download count limits with files auto-deleting after specified downloads
- Maximum 2.5GB file size support for large document and media sharing
- Redis-powered session management and metadata tracking for performance
- Zero-knowledge architecture where server never sees encryption keys
- No user accounts required - anonymous file sharing with secure links
- Mobile-responsive web interface supporting drag-and-drop uploads

## Use cases

- Secure sharing of confidential business documents with automatic cleanup
- Developer collaboration for sharing source code snippets and build artifacts
- Healthcare organizations sharing patient records with HIPAA compliance needs
- Legal firms exchanging sensitive case documents with time-limited access
- Remote teams sharing temporary project files without permanent cloud storage
- Educational institutions distributing course materials with controlled access
- Personal use for sharing family photos or documents with automatic deletion

## Prerequisites

- Minimum 640MB RAM (512MB for Redis, 128MB for Send application)
- Port 1234 available for Send web interface access
- BASE_URL environment variable configured for proper link generation
- Sufficient disk space for uploaded files (considering 2.5GB max per file)
- Modern web browser supporting WebCrypto API for client-side encryption
- Basic understanding of temporary file sharing and link expiration concepts

## docker-compose.yml

```yaml
services:
  send:
    image: registry.gitlab.com/timvisee/send:latest
    container_name: send
    environment:
      - REDIS_HOST=redis
      - FILE_DIR=/uploads
      - BASE_URL=${BASE_URL}
      - MAX_FILE_SIZE=2684354560
      - MAX_EXPIRE_SECONDS=604800
      - MAX_DOWNLOADS=100
    volumes:
      - send-uploads:/uploads
    ports:
      - "1234:1234"
    depends_on:
      - redis
    networks:
      - send-network
    restart: unless-stopped

  redis:
    image: redis:7-alpine
    container_name: send-redis
    volumes:
      - redis-data:/data
    networks:
      - send-network
    restart: unless-stopped

volumes:
  send-uploads:
  redis-data:

networks:
  send-network:
    driver: bridge
```

## .env

```bash
# Send
BASE_URL=http://localhost:1234
# Max file size: 2.5GB
# Max expiry: 7 days
```

## Usage notes

- Web UI at http://localhost:1234
- End-to-end encryption
- Set download limits and expiry
- Firefox Send fork
- No account needed

## Troubleshooting

- Upload fails with 'File too large' error: Check MAX_FILE_SIZE environment variable is set to 2684354560 bytes (2.5GB) and ensure sufficient disk space
- Redis connection errors in Send logs: Verify REDIS_HOST environment variable matches the Redis service name and both containers are on the same network
- Generated file links don't work: Ensure BASE_URL environment variable is set correctly to match your domain or IP address
- Files not expiring automatically: Check Redis container has persistent storage mounted and MAX_EXPIRE_SECONDS is properly configured
- Browser shows encryption errors: Verify the client browser supports WebCrypto API and is accessing Send over HTTPS in production
- Container memory issues: Monitor Redis memory usage as it stores all file metadata and increase available RAM if handling many concurrent files

