safeshare

module
v1.5.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 27, 2026 License: MIT

README

SafeShare

Tests Go Report Card

Self-hosted file sharing that gets out of your way. Upload a file, get a link, share it. Files auto-expire when you want them to. No accounts required.

Version: 1.5.4

SafeShare Main Interface Drag-drop upload, QR codes, dark mode, and installable as a PWA

Admin Dashboard Optional admin dashboard for file management and system configuration


Get Running

One command
docker run -d -p 8080:8080 \
  -v safeshare-data:/app/data \
  -v safeshare-uploads:/app/uploads \
  --name safeshare \
  fjmerc/safeshare:latest

Visit http://localhost:8080 and start sharing files.

With encryption and admin dashboard
docker run -d -p 8080:8080 \
  -e ENCRYPTION_KEY="$(openssl rand -hex 32)" \
  -e ADMIN_USERNAME=admin \
  -e ADMIN_PASSWORD="YourSecurePassword123!" \
  -v safeshare-data:/app/data \
  -v safeshare-uploads:/app/uploads \
  --name safeshare \
  fjmerc/safeshare:latest

This gives you AES-256 encryption at rest and an admin dashboard at /admin/login.

# docker-compose.yml
services:
  safeshare:
    image: fjmerc/safeshare:latest
    ports:
      - "8080:8080"
    environment:
      - ENCRYPTION_KEY=${ENCRYPTION_KEY}       # openssl rand -hex 32
      - ADMIN_USERNAME=admin
      - ADMIN_PASSWORD=${ADMIN_PASSWORD}
      - QUOTA_LIMIT_GB=100
      - DEFAULT_EXPIRATION_HOURS=24
      - TZ=America/New_York
    volumes:
      - safeshare-data:/app/data
      - safeshare-uploads:/app/uploads
    restart: unless-stopped

volumes:
  safeshare-data:
  safeshare-uploads:
export ENCRYPTION_KEY=$(openssl rand -hex 32)
export ADMIN_PASSWORD="YourSecurePassword123!"
docker compose up -d
Without Docker
wget https://github.com/fjmerc/safeshare/releases/latest/download/safeshare-linux-amd64
chmod +x safeshare-linux-amd64
./safeshare-linux-amd64

What You Get

  • Drag-and-drop uploads with automatic expiration and download limits
  • Password-protected files for sensitive shares
  • QR code generation for easy mobile sharing
  • End-to-end encryption in the browser (server never sees your files)
  • Resumable uploads and downloads for large files
  • AES-256 encryption at rest for everything stored on disk
  • Metadata stripping removes EXIF, GPS, and author info from uploads
  • Anonymous mode redacts all IP addresses from logs and database
  • Tor hidden service support for maximum anonymity
  • Admin dashboard for file management, user administration, and system config
  • User accounts with invite-only registration, MFA, and SSO (optional)
  • API with tokens for programmatic access and integrations
  • Webhook notifications for file lifecycle events
  • PostgreSQL and S3 backends for production scale
  • ~26MB Docker image, starts in under a second, runs on ~15MB RAM
  • Installable PWA with offline support

Deployment Modes

SafeShare can serve very different purposes depending on how you configure it:

ANONYMITY                                                              SECURITY
Protect users from the system                    Protect the operator from users

  [GHOST]           [STANDARD]           [HARDENED]           [FORTRESS]
Mode For What it means
Ghost Whistleblowers, journalists, activists Tor hidden service, no IP logging, E2E encryption, metadata stripping
Standard Personal use, small teams Secure defaults out of the box, minimal config
Hardened Enterprises, internal tools Auth required, MFA, webhooks, full audit logging
Fortress Regulated industries (HIPAA, SOC2) PostgreSQL, SSO, automated backups, compliance-ready

Each mode comes with a complete docker-compose example and configuration guide. See Deployment Modes for details.


Documentation

Topic Guide
Choosing a deployment mode DEPLOYMENT_MODES.md
Production deployment PRODUCTION.md
API reference API_REFERENCE.md
Security and compliance SECURITY.md
Reverse proxy setup REVERSE_PROXY.md
SSO / MFA setup SSO_SETUP.md / MFA_SETUP.md
Backup and restore BACKUP_RESTORE.md
Tor hidden service TOR_DEPLOYMENT.md
E2E encryption E2E_ENCRYPTION.md
Monitoring (Prometheus) PROMETHEUS.md
Architecture ARCHITECTURE.md
Troubleshooting TROUBLESHOOTING.md
All documentation docs/

Contributing

Contributions welcome. See CONTRIBUTING.md for guidelines and VERSION_STRATEGY.md for the branching strategy. PRs go to the develop branch.

License

MIT License - See LICENSE for details.

Support

Directories

Path Synopsis
cmd
import-file command
migrate-chunks command
safeshare command
internal
auth/sso
Package sso provides Single Sign-On authentication providers.
Package sso provides Single Sign-On authentication providers.
backup
Package backup provides functionality for creating and restoring SafeShare backups.
Package backup provides functionality for creating and restoring SafeShare backups.
handlers
Package handlers provides HTTP request handlers for the SafeShare application.
Package handlers provides HTTP request handlers for the SafeShare application.
repository
Package repository provides interfaces for data access.
Package repository provides interfaces for data access.
repository/mock
Package mock provides mock implementations of repository interfaces for testing.
Package mock provides mock implementations of repository interfaces for testing.
repository/postgres
Package postgres provides PostgreSQL implementations of repository interfaces.
Package postgres provides PostgreSQL implementations of repository interfaces.
repository/sqlite
Package sqlite provides SQLite implementations of repository interfaces.
Package sqlite provides SQLite implementations of repository interfaces.
storage
Package storage provides abstraction for file storage operations.
Package storage provides abstraction for file storage operations.
storage/filesystem
Package filesystem implements the StorageBackend interface for local filesystem storage.
Package filesystem implements the StorageBackend interface for local filesystem storage.
storage/mock
Package mock provides a mock implementation of the storage.StorageBackend interface for testing.
Package mock provides a mock implementation of the storage.StorageBackend interface for testing.
storage/s3
Package s3 implements encrypted storage for S3 using SFSE streaming encryption.
Package s3 implements encrypted storage for S3 using SFSE streaming encryption.
utils
Package utils provides utility functions for SafeShare.
Package utils provides utility functions for SafeShare.
webauthn
Package webauthn provides WebAuthn/FIDO2 authentication support for SafeShare.
Package webauthn provides WebAuthn/FIDO2 authentication support for SafeShare.
sdk
go module

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL