A self-hosted file sharing platform and a secure alternative for WeTransfer.
10K+
For more informations -> https://github.com/Simthem/PrivCloud_Sharing
PrivCloud Sharing is a self-hosted, end-to-end encrypted file sharing platform for private uploads as alternative for WeTransfer, reverse shares, team workspaces, WebDAV imports and eIDAS-oriented PDF signing.
This public edition is designed for open-source self-hosting. Collaboration limits are controlled by instance configuration, not by hard-coded tiers.
See contractor access and evidence and document preview behavior for their security boundaries, configuration and limits.
Files are encrypted client-side using AES-256-GCM through the Web Crypto API.
#key=...), which
browsers do not send to the server. The key only passes through the server
when the owner chooses to include it in the recipient e-mail. The link
e-mailed to a reverse-share owner after a deposit carries no key.SHARE_DEK_V1).
The browser generates a 256-bit key for the share, the recipient
link carries that key only, and the server stores it wrapped by the owner's
master key with the share id authenticated. A master key rotation only
rewraps it, so files are never re-encrypted and recipient links keep
working.FILE_META_V1), padded to 64-byte steps
and bound to the share and file ids. The share title and description are
then encrypted the same way. The server, its logs and its database only see
a neutral encrypted-file-<id> name and no title, and database triggers
refuse a readable name for such a file or a readable title next to an
encrypted one. Recipients and owners get the real values back in the
browser. For a signature request on such a PDF, the owner discloses its
name for that request only.The current web app uses per-share keys and encrypted names whatever the flags below say, and the backend accepts them from every client that writes v2. The flags still decide it for older clients, and select the accounts whose reverse-link names and team request subjects are encrypted. For every account:
- SHARE_DEK_V1_WRITE=true
- SHARE_DEK_V1_CANARY_USERS=*
- FILE_META_V1_WRITE=true
- FILE_META_V1_CANARY_USERS=*
- FILE_META_V1_TEAM_WRITE=true
- FILE_META_V1_REVERSE_SHARE_WRITE=true
Existing shares keep their key and their file names. Turning a flag off later only affects new shares: a share created with encrypted names keeps encrypting the names of the files added to it.
The share.contentV2Writes and share.contentV2Floor settings, with their
deployment defaults E2EE_CONTENT_V2_WRITES and E2EE_CONTENT_V2_FLOOR
(both false), only concern older clients. With writes on, the backend
refuses their v1 uploads with e2ee_content_v2_required. Turning a setting
off never makes v2 content unreadable and never lifts the floor of a key.
Deployment order and rollback:
docs/E2EE_CONTENT_V2_ROLLOUT.md.
The current web app encrypts the file names of new E2E uploads, and the title
and description of new personal shares, with the key of their share, Team
(K_team) or reverse share (K_rs). Team file request subjects and notes use
K_team when FILE_META_V1_TEAM_WRITE is selected for their creator. Upload
link names use K_rs when FILE_META_V1_REVERSE_SHARE_WRITE is selected for
the link owner. Existing readable metadata is not automatically converted.
The server still reads account and recipient addresses, team membership, team and team folder names, sizes, counts and dates, and document names explicitly submitted for signing. Server-generated team alerts, push messages and team audit emails use generic text and opaque navigation identifiers. Browser- encrypted notification details are opened only by their recipients. Team access logs do not record an IP address. Authentication and signature evidence retain their own IP handling.
Access grants combine X25519 and ML-KEM-768 when the recipient has an active ML-KEM-768 key. Recipients without that key keep the X25519 path. This grant choice is independent from the team's optional hybrid notification setting. Old grants remain readable. Team key rotation stages encrypted share titles and request subjects and commits them atomically with the new key. A failed or incomplete metadata rotation prevents completion and can be resumed.
Direct S3 download URLs are temporary authorizations to fetch an object. They are unrelated to electronic document signatures. For E2E files they contain a neutral file identifier and a generic content type, never a readable file name or decryption key. The storage provider still sees sizes and transfers.
Deploy migrations 20261002120000_extend_file_meta_v1 and
20261002140000_e2e_metadata_hardening before starting the updated backend.
The latter also replaces names in older server-generated team notifications
with generic text. Convert any legacy signing P12 as documented before deployment.
Signing URLs are public no-login recipient flows. Standard requests verify mailbox control with a short-lived e-mail code; reinforced requests bind the decision to an authenticated account and a fresh WebAuthn assertion over the exact displayed document, versioned consent and action. PrivCloud's reinforced profile implements an advanced electronic signature in accordance with the requirements of Article 26 of the eIDAS Regulation and produces an exportable, platform-signed evidence bundle. It is not a qualified electronic signature (QES). Signing API and PDF responses set no-store and noindex headers to reduce accidental indexing and caching.
Companion can upload file bytes directly to S3 using the existing direct-upload configuration and a share-scoped token. The API checks authorization, quotas, part lengths and finalization. It does not receive the WebDAV credentials or the E2E key. File names are encrypted locally when FILE_META_V1 is selected. Local storage and older or relay-only servers retain the established upload route. Small WebDAV download packets are combined into bounded native frames.
Install the updated Companion together with the updated API. Package builders
and Linux installers include its new direct-upload.mjs runtime module.
WebDAV imports run locally through PrivCloud Companion. The application server never contacts the WebDAV target and never receives its credentials.
PrivCloud Companion runs locally on the user's device. It receives a local browser token and a short-lived share-scoped Bridge upload token, never the web app cookies. WebDAV credentials are kept in memory for the active job.
docker-compose.yaml.APP_URL to the public URL of your instance.docker compose up -d
By default the compose example binds the application to
127.0.0.1:3000. Put a reverse proxy such as Caddy, Nginx or Traefik in front
of it for public HTTPS traffic.
Compose persists its SQLite database in the repository-level
./data/pingvin-share.db. A plain npx prisma migrate deploy launched from
backend/ targets the separate development database at
backend/data/pingvin-share.db. To migrate the Compose database explicitly,
use the unambiguous root command:
npm run db:compose:migrate
docker compose build
docker compose up -d
The default Dockerfile uses OpenSSL/Node builder cache images pinned by
registry manifest digest. The cache registry for this repository is
simthem/privcloud-sharing. Refresh the caches from Dockerfile.full-build, whose
exported stages contain verified OpenSSL 3.5.9 LTS and Node.js 24.22.2 builds
and upgraded Debian packages:
docker buildx build --platform linux/amd64 --pull --no-cache \
-f Dockerfile.full-build --target openssl-builder \
--build-arg BUILD_JOBS=4 --provenance=false --load \
-t simthem/privcloud-sharing:openssl-builder-cache .
docker buildx build --platform linux/amd64 \
--no-cache-filter node-source-builder,node-builder \
-f Dockerfile.full-build --target node-builder \
--build-arg BUILD_JOBS=4 --provenance=false --load \
-t simthem/privcloud-sharing:node-builder-cache .
trivy image --scanners vuln simthem/privcloud-sharing:openssl-builder-cache
trivy image --scanners vuln simthem/privcloud-sharing:node-builder-cache
BUILD_JOBS bounds parallel C/C++ compilation (default: 4). Both caches
start from clean Debian stages, without the compiler dependencies. The Node
cache includes its shared OpenSSL libraries and checks its version and linkage.
Rebuild the exported stages without cache to refresh Debian security updates.
After reviewing the scans and publishing the two cache images, retrieve their
registry manifest digests with docker buildx imagetools inspect. Update
OPENSSL_BUILDER_SHA256 and NODE_BUILDER_SHA256 and the OpenSSL/Node version assertions in Dockerfile
together. A local image ID is a configuration digest and cannot replace a
registry manifest digest. Republishing a tag alone does not update a pinned build.
To build the complete application directly from source, use:
docker build -f Dockerfile.full-build -t privcloud-sharing:full-build .
Cache-stage validation does not replace building and testing the final application image after updating its cache references.
Use Node.js 24.15 or later, Python 3, OpenSSL and Google Chrome. Install the locked dependencies before running checks:
npm ci
npm --prefix backend ci
npm --prefix frontend ci
npm --prefix docs ci
npm --prefix scripts ci
npm --prefix verification/contractor ci
npm run test:release
npm run security:audit
npm run lint
npm --prefix backend run build
npm --prefix frontend run build
npm --prefix docs run build
npm run build:client-tools -- --base-url https://files.example.org
The release suite creates disposable SQLite databases and synthetic HTTPS fixtures. The verification suite includes CPU-intensive measurements. It does not connect to an operator's application or publish release artifacts.
Common environment variables:
| Variable | Description | Default |
|---|---|---|
APP_URL | Public URL used in emails, signing links and integrations | (required for production) |
TRUST_PROXY | Set to true when the container is behind a reverse proxy | false |
CADDY_DISABLED | Disable the built-in Caddy reverse proxy | false |
TEAM_MAX_MEMBERS | Max members per team, 0 means unlimited | 30 in compose example |
TEAM_MAX_OWNED_TEAMS | Max teams a user can own, 0 means unlimited | 0 |
TEAM_MAX_FOLDERS | Max shared folders per team, 0 means unlimited | 10 in compose example |
TEAM_MAX_EXTERNAL_SEATS | Max active or pending contractor accesses per team, 0 means unlimited | 0 |
TEAM_MAX_SHARE_SIZE | Max bytes per team share, unset or 0 means unlimited | (none) |
TEAM_TOTAL_STORAGE_BYTES | Total bytes per team, unset or 0 means unlimited | (none) |
NODE_MAX_OLD_SPACE_SIZE | Backend V8 heap size in MB | 3072 |
UPLOAD_MAX_CHUNK_BYTES | Process-wide upload chunk safety ceiling | 50000000 |
UPLOAD_ANONYMOUS_MAX_CHUNK_BYTES | Max accepted upload chunk body size without an authenticated account | 35000000 |
UPLOAD_AUTHENTICATED_MAX_CHUNK_BYTES | Max accepted upload chunk body size for authenticated users | 50000000 |
S3_PROXY_URL | Optional dedicated proxy for public S3 endpoints; NO_PROXY remains authoritative | (none) |
S3_MAX_CONCURRENT_UPLOADS | Adaptive global UploadPart ceiling | 6 |
S3_MIN_CONCURRENT_UPLOADS | Minimum upload window under resource pressure | 2 |
S3_MAX_CONCURRENT_PER_FILE | Maximum slots one otherwise-idle file can borrow | 6 |
S3_MAX_CONCURRENT_DOWNLOADS | Adaptive global S3 range-read ceiling | 6 |
S3_MAX_CONCURRENT_PER_DOWNLOAD | Maximum range reads for one large download | 6 |
S3_HTTP_SOCKET_BUFFER_BYTES | Bounded high-water mark for the explicit production proxy transport | 1048576 |
AWS_REQUEST_CHECKSUM_CALCULATION | SDK request checksum policy; WHEN_REQUIRED avoids the optional single-threaded CRC32 transform | WHEN_REQUIRED |
AWS_RESPONSE_CHECKSUM_VALIDATION | SDK response checksum policy; required checks remain enabled without optional CRC validation | WHEN_REQUIRED |
S3_DIRECT_BROWSER_UPLOAD_ENABLED | Authorize short-lived, exact-length browser UploadPart URLs and fall back idempotently to the Nest relay when the endpoint/CORS is unavailable | false |
S3_DIRECT_BROWSER_UPLOAD_ADDRESSING_MODE | Browser upload addressing: path, virtual-host or dual | path |
S3_DIRECT_BROWSER_CONNECTIONS_PER_ORIGIN | Maximum HTTP/1.1 upload requests assigned to each browser-visible S3 origin | 6 |
S3_DIRECT_BROWSER_MAX_CONCURRENCY | Safety ceiling across all direct upload parts in one browser page; the effective value is also bounded by the available origins | 32 |
S3_DIRECT_BROWSER_UPLOAD_ENDPOINTS | Up to four optional comma-separated, browser-visible HTTPS S3 endpoints/CNAMEs that target the same account and bucket | (none) |
S3_DIRECT_BROWSER_URL_TTL_SECONDS | Lifetime of one exact-part signed URL (bounded to 60-900 seconds) | 300 |
S3_DIRECT_BROWSER_DOWNLOAD_ENABLED | Authorize one-object direct browser GETs while keeping access checks, counters, notifications and Team audit in Nest | false |
S3_DIRECT_BROWSER_DOWNLOAD_MAX_CONCURRENCY | Maximum direct S3 ranges fetched concurrently, bounded to six per signed origin and by the browser buffer | 24 |
S3_DIRECT_BROWSER_DOWNLOAD_PART_BYTES | Direct-browser range size; E2E ranges are aligned to encryption records | 33554432 |
S3_DIRECT_BROWSER_DOWNLOAD_THRESHOLD_BYTES | File size from which the streaming direct-browser path uses parallel ranges | 67108864 |
S3_DIRECT_BROWSER_DOWNLOAD_MAX_BUFFER_BYTES | Hard cap for completed out-of-order ranges in browser memory | 201326592 |
S3_DIRECT_BROWSER_DOWNLOAD_URL_TTL_SECONDS | Lifetime of a resumable direct GET URL (bounded to 60-3600 seconds) | 900 |
S3_ALLOW_OPTIONAL_CHECKSUMS | Explicit opt-in required before optional SDK checksums can be enabled | false |
S3_ADAPTIVE_PRESSURE_SAMPLES | Consecutive CPU/event-loop pressure samples required before reducing the window | 3 |
S3_PARALLEL_DOWNLOAD_ENABLED | Aggregate ordered S3 ranges for large full-file downloads | true |
S3_DOWNLOAD_PART_BYTES | S3 download range size | 16777216 |
S3_HEALTH_TIMEOUT_MS | Timeout for the readiness probe using the real S3 data-plane client | 10000 |
S3_DOWNLOAD_MAX_BUFFER_BYTES | Per-flow download prefetch memory ceiling | 134217728 |
S3_MULTIPART_RECOVERY_ENABLED | Recover multipart state from S3 after an application restart or replacement | true |
S3_MULTIPART_STALE_ABORT_HOURS | Minimum S3 age before a demonstrably orphaned multipart may be aborted | 48 |
SIGNING_CERTIFICATE_PATH | Path to P12/PFX signing certificate | (none) |
SIGNING_CERTIFICATE_PASSWORD | Password for the signing certificate | (none) |
SIGNING_TSA_URL | RFC 3161 timestamp authority URL | optional |
SIGNING_TSA_TRUSTED_LIST_URL | Trusted List checked every day for the pinned TSA certificate authority, trace e-mailed to the administrators | (none, check disabled) |
SIGNING_TSA_LOTL_URL | EU List of Trusted Lists that must authorize the signer of that Trusted List | https://ec.europa.eu/tools/lotl/eu-lotl.xml |
SIGNING_TSA_REQUIRE_QUALIFIED_STATUS | true refuses to timestamp unless a recent check confirmed the TSA as a granted qualified service | false |
SIGNING_TSA_TRUSTED_LIST_MAX_AGE_DAYS | Maximum age of that confirmation | 7 |
SIGNING_EVIDENCE_RETENTION_YEARS | Finalized PDF/evidence retention after source deletion (1-30) | 10 |
SHARE_DEK_V1_WRITE | true lets the selected accounts create personal E2E shares with their own random key from an older client. The current web app always does | false |
SHARE_DEK_V1_CANARY_USERS | Accounts selected for SHARE_DEK_V1_WRITE: comma-separated user ids or e-mail addresses, * for all | (none) |
SHARE_DEK_V1_ROLLOUT_PERCENT | Additional stable share of accounts (0-100), from a hash of their id | 0 |
SHARE_DEK_V1_READ | false stops serving wrapped share keys to owners, recipient links keep working | true |
FILE_META_V1_WRITE | true also encrypts file names and folder paths of those shares from an older client, for the selected accounts | false |
FILE_META_V1_CANARY_USERS | Accounts selected for FILE_META_V1_WRITE, which must also be selected for SHARE_DEK_V1 | (none) |
FILE_META_V1_ROLLOUT_PERCENT | Additional stable share of accounts, independent of the SHARE_DEK_V1 one | 0 |
FILE_META_V1_TEAM_WRITE | true encrypts team file request subjects and notes, and the names of E2E team folder uploads from an older client, with the team key, when the creator is selected for FILE_META_V1_WRITE | false |
FILE_META_V1_REVERSE_SHARE_WRITE | true encrypts upload link names, and the names of uploads to an E2E reverse share from an older client, with its key, when its owner is selected for FILE_META_V1_WRITE | false |
E2EE_CONTENT_V2_WRITES | Default of share.contentV2Writes: true refuses v1 uploads from older clients with e2ee_content_v2_required | false |
E2EE_CONTENT_V2_FLOOR | Default of share.contentV2Floor: true makes intermediate clients create keys that only accept v2 | false |
HTTP_PROXY / HTTPS_PROXY | System proxy for outbound traffic | (none) |
GLOBAL_AGENT_HTTP_PROXY | Node.js global-agent proxy URL | (none) |
GLOBAL_AGENT_NO_PROXY / NO_PROXY | Hosts that bypass the proxy | (none) |
PrivCloud Sharing is a fork of
Pingvin Share. The original
project is licensed under the
BSD 2-Clause License.
Don't want to have a self-hosted instance ? -> PrivCloud Sharing
None found
Content type
Image
Digest
sha256:726f8cfdc…
Size
234.7 MB
Last updated
5 days ago
docker pull simthem/privcloud-sharing