Skip to content

Repository files navigation

Fenfa · Self-hosted app distribution platform

LicenseOpenPRX

中文文档


Fenfa (分发, "distribute" in Chinese) is a self-hosted distribution platform for iOS, Android, macOS, Windows, and Linux apps. Upload builds, get install pages with QR codes, and manage releases through a clean admin panel.

Part of the OpenPRX ecosystem — open-source infrastructure for development teams.

Features

  • Multi-platform — iOS (IPA), Android (APK), macOS, Windows, Linux
  • Smart upload — auto-detect app metadata (bundle ID, version, icon) from packages
  • iOS UDID binding — device registration flow for ad-hoc distribution
  • Product pages — public download pages with QR codes and platform detection
  • Admin panel — manage products, variants, releases, devices, and settings
  • S3/R2 storage — optional S3-compatible object storage (Cloudflare R2, AWS S3, MinIO)
  • Apple Developer API — auto-register devices to your Apple Developer account
  • Single binary — Go binary with embedded frontend, just run it
  • SQLite — zero external dependencies, data in a single file
  • i18n — Chinese and English UI

Quick Start

Docker (recommended)

docker run -d --name fenfa -p 8000:8000 fenfa/fenfa:latest

Visit http://localhost:8000/admin, login with token dev-admin-token.

Production — use custom tokens and persistent storage:

docker run -d \
--name fenfa \
--restart=unless-stopped \
-p 127.0.0.1:8000:8000 \
-e FENFA_ADMIN_TOKEN=your-secret-token \
-e FENFA_UPLOAD_TOKEN=your-upload-token \
-e FENFA_PRIMARY_DOMAIN=https://your-domain.com \
-v ./data:/data \
-v ./uploads:/app/uploads \
fenfa/fenfa:latest

Or mount a config.json for full control:

docker run -d --name fenfa -p 8000:8000 \
-v ./data:/data -v ./uploads:/app/uploads \
-v ./config.json:/app/config.json:ro \
fenfa/fenfa:latest

Build from source

Requirements: Go 1.25+, Node.js 20+

make build # builds frontend + backend
make run # starts the server

Or manually:

cd web/front && npm ci && npm run build &&cd ../..
cd web/admin && npm ci && npm run build &&cd ../..
go build -o fenfa ./cmd/server
./fenfa

Configuration

See docs/config.example.json for all options. Full API spec in docs/api-spec.md.

KeyDescriptionDefault
server.portHTTP port8000
server.primary_domainPublic URL for manifests and callbackshttp://localhost:8000
server.organizationOrganization name in iOS profilesFenfa Distribution
server.data_dirDatabase directorydata
auth.admin_tokensAdmin API tokens["dev-admin-token"]
auth.upload_tokensUpload API tokens["dev-upload-token"]

Environment Variables

Override config values without a file:

VariableDescription
FENFA_PORTHTTP port
FENFA_DATA_DIRDatabase directory
FENFA_PRIMARY_DOMAINPublic domain URL
FENFA_ADMIN_TOKENAdmin token
FENFA_UPLOAD_TOKENUpload token

Storage

Files are stored locally by default. S3-compatible storage (R2, AWS S3, MinIO) can be configured in admin panel > Settings > Storage.

Architecture

Request → Gin Router → Auth Middleware → Handler → GORM → SQLite
cmd/server/ Entry point
internal/server/ HTTP handlers & routing
internal/store/ Database models (GORM + SQLite)
internal/web/ Embedded frontend (go:embed)
web/front/ Public download page (Vue 3 + Vite)
web/admin/ Admin panel (Vue 3 + Vite)

API

Auth via X-Auth-Token header. See docs/api-spec.md for details.

MethodEndpointAuthDescription
GET/products/:slugProduct download page
GET/d/:releaseIDDirect file download
POST/uploaduploadUpload a build
*/admin/api/*adminAdmin API

Links

Contributing

Fenfa is part of OpenPRX. Issues and pull requests welcome.

License

MIT

About

Self-hosted app distribution platform for iOS, Android, macOS, Windows & Linux. Open-source alternative to Pgyer/TestFlight.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

5 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages