docker.recipes

Gokapi

beginner

Lightweight file sharing server.

Overview

Gokapi is a lightweight, self-hosted file sharing server designed as an open-source alternative to Firefox Send after Mozilla discontinued the service. Built in Go, it weighs in at just 15MB and focuses on temporary file sharing with automatic expiration based on time limits or download counts. The application emphasizes security through optional end-to-end encryption and provides both web interface and API access for programmatic uploads. This Docker deployment creates a minimal yet complete file sharing platform that handles temporary uploads, automatic cleanup, and secure distribution without requiring complex infrastructure. Gokapi excels at scenarios where you need to share sensitive files temporarily, distribute large files with controlled access, or provide a simple upload portal for teams or clients. The containerized approach ensures consistent deployment while maintaining the application's lightweight footprint. This stack is ideal for small businesses, development teams, educational institutions, or personal use cases where commercial file sharing services are either too expensive, lack privacy controls, or don't provide the needed expiration mechanisms. System administrators who need a Firefox Send replacement will appreciate Gokapi's simplicity, security features, and the ability to self-host without vendor lock-in or monthly subscription costs.

Key Features

  • Automatic file expiration based on configurable time limits or download count thresholds
  • Optional end-to-end encryption for sensitive file transfers with client-side decryption
  • RESTful API for programmatic file uploads and management integration
  • Lightweight 15MB binary footprint with minimal system resource requirements
  • Web-based administration interface for managing uploads, users, and expiration policies
  • Hotlink protection and download tracking to prevent unauthorized file access
  • Configurable file size limits and storage quotas per upload session
  • Password protection option for individual file shares with custom expiration

Common Use Cases

  • 1Temporary distribution of sensitive documents with automatic deletion after access
  • 2Client file collection portal for agencies, consultants, or service providers
  • 3Secure software release distribution with download count limits
  • 4Educational institutions sharing course materials with time-limited access
  • 5Development teams sharing build artifacts or logs with automatic cleanup
  • 6Personal cloud alternative for temporary file sharing between devices
  • 7Business continuity solution replacing discontinued Firefox Send workflows

Prerequisites

  • Docker and Docker Compose installed on the host system
  • Minimum 512MB RAM available for container operation
  • Port 53842 available and not conflicting with existing services
  • At least 1GB free disk space for file storage and container images
  • Basic understanding of environment variables for password configuration
  • Administrative access to configure reverse proxy if external access needed

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 gokapi:
3 image: f0rc3/gokapi:latest
4 container_name: gokapi
5 restart: unless-stopped
6 environment:
7 GOKAPI_USERNAME: admin
8 GOKAPI_PASSWORD: ${ADMIN_PASSWORD}
9 volumes:
10 - gokapi_data:/app/data
11 ports:
12 - "53842:53842"
13
14volumes:
15 gokapi_data:

.env Template

.env
1ADMIN_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://github.com/Forceu/Gokapi#readme
  2. 2Access at http://localhost:53842 - admin login with ADMIN_PASSWORD
  3. 3Files auto-expire after time or download count
  4. 4E2E encryption option available
  5. 5API for programmatic uploads
  6. 6Lightweight Firefox Send alternative (15MB binary)

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 gokapi:
5 image: f0rc3/gokapi:latest
6 container_name: gokapi
7 restart: unless-stopped
8 environment:
9 GOKAPI_USERNAME: admin
10 GOKAPI_PASSWORD: ${ADMIN_PASSWORD}
11 volumes:
12 - gokapi_data:/app/data
13 ports:
14 - "53842:53842"
15
16volumes:
17 gokapi_data:
18EOF
19
20# 2. Create the .env file
21cat > .env << 'EOF'
22ADMIN_PASSWORD=changeme
23EOF
24
25# 3. Start the services
26docker compose up -d
27
28# 4. View logs
29docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/gokapi/run | bash

Troubleshooting

  • Upload fails with 'file too large' error: Increase GOKAPI_MAX_FILESIZE environment variable or check available disk space in gokapi_data volume
  • Cannot access admin interface after deployment: Verify ADMIN_PASSWORD environment variable is set and container logs show successful startup on port 53842
  • Files not expiring automatically: Check system time synchronization and verify expiration settings in admin panel configuration
  • API uploads return 401 unauthorized: Generate new API key in admin interface and ensure proper authentication headers in upload requests
  • Container restart loop with permission errors: Ensure gokapi_data volume has correct ownership and Docker daemon has write access to volume mount point

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Components

gokapi

Tags

#gokapi#sharing#lightweight#expiring

Category

Storage & Backup
Ad Space