# Jirafeau

> Self-hosted, open-source one-click file sharing in PHP with no database: upload a file, get a download and delete link, with passwords, expiry and optional encryption.

- **Category:** [File Sharing](https://selfhost.directory/file-sharing)
- **Licence:** AGPL-3.0
- **Source model:** Open source
- **Latest version:** 4.7.1
- **Author:** Jirafeau project
- **Platforms:** Docker, Docker Compose, Linux
- **Ports:** 80 (HTTP inside the container (lighttpd); the documented example publishes it as 8080 on the host)
- **Tags:** File Sharing, Admin Panel, File Upload, Deduplication, Docker, Php, Password protection, Expiring links, Server Side Encryption

## Docker images

- [`registry.gitlab.com/jirafeau/jirafeau`](https://registry.gitlab.com/jirafeau/jirafeau) — main application image (Alpine Linux with lighttpd and PHP)

## What is Jirafeau?

Jirafeau is a lightweight PHP web application for one-click file sharing: you pick a file, upload it, and receive a link to hand out together with a separate link for deleting the upload. It deliberately avoids a database and only needs basic PHP, which keeps the dependency list tiny. Uploads can be far larger than typical PHP limits because the HTML5 file API splits the transfer into chunks, progress is displayed during upload, and files are previewed in the browser when possible. Uploaders can protect downloads with a password (optional, mandatory or auto-generated), choose an expiry from one minute up to unlimited, or make a link self-destruct after the first download; operators can additionally gate the upload page with passwords or allowed IP ranges. Optional server-side encryption uses XChaCha20-Poly1305 and puts the decrypt key only in the download URL, while file hashing can deduplicate identical uploads to save disk space. A small administration page at /admin.php, a scripting endpoint at /script.php with a bash helper for command-line uploads, many locales, themes including a dark variant and a CLI cleanup command for cron cover the maintenance side. Self-hosting means either a git clone or a release download on any PHP 7.4+ web server with a browser-based setup wizard, or the Alpine/lighttpd container image published on GitLab's registry, which is configured through environment variables. This GitLab project is the continuation of the discontinued original Jirafeau by Jerome Jutteau, itself forked from Jyraphe, and is released under AGPL-3.0.

## Should you self-host Jirafeau?

Jirafeau scores **58/100** on selfhost.directory ([how scoring works](https://selfhost.directory/scoring)) and ranks **#27 of 89** in [File Sharing](https://selfhost.directory/file-sharing).

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is AGPL-3.0-licensed.

Its closest alternative on selfhost.directory is [copyparty](https://selfhost.directory/project/copyparty) (82/100, 47 431 stars). It scores higher overall, so compare the two before you pick. [See Jirafeau vs copyparty side by side.](https://selfhost.directory/compare/copyparty-vs-jirafeau)

## Features

- Admin Interface
- Basic API / scripting interface
- CLI cleanup of expired files
- File-level deduplication — Enabled through the file_hash option.
- In-browser file preview
- Large file uploads via HTML5 file API
- Link expiration
- Multi-language Support
- One-click file upload with download and delete links
- Password protection for uploads and downloads
- Self-destruct after first download
- Server-Side Encryption — Needs the Sodium PHP module; disables deduplication and is not end-to-end encryption.
- Short download links
- Upload progress display

## How to install Jirafeau

### Install Jirafeau with Docker

Environment variables:

```
ADMIN_PASSWORD, ADMIN_IP, LANG, AVAILABILITIES, WEB_ROOT, VAR_ROOT, FILE_HASH, PREVIEW, TITLE, ORGANISATION, CONTACTPERSON, STYLE, DARK_STYLE, AVAILABILITY_DEFAULT, ONE_TIME_DOWNLOAD, ONE_TIME_DOWNLOAD_PRESELECTED, ENABLE_CRYPT, DEBUG, MAXIMAL_UPLOAD_SIZE, UPLOAD_PASSWORD, UPLOAD_IP, UPLOAD_IP_NO_PASSWORD, PROXY_IP, STORE_UPLOADER_IP, DOWNLOAD_PASSWORD_REQUIREMENT, DOWNLOAD_PASSWORD_GEN_LEN, DOWNLOAD_PASSWORD_GEN_CHARS, DOWNLOAD_PASSWORD_POLICY, DOWNLOAD_PASSWORD_POLICY_REGEX
```

```shell
docker pull registry.gitlab.com/jirafeau/jirafeau:latest
docker run -it --rm -p 8080:80 registry.gitlab.com/jirafeau/jirafeau:latest
```

Note: Container images are built for AMD64 and ARM64. TLS is not provided by the image; data lives in /data by default and the admin password is auto-generated (shown in the container log) unless ADMIN_PASSWORD is set.

### Install Jirafeau with Docker Compose

```sh
docker compose up -d
```

Note: Uses the docker-compose.yaml shipped in the repository.

### Install Jirafeau with Linux

- Clone the [repository](https://gitlab.com/jirafeau/Jirafeau/) or download the latest [release](https://gitlab.com/jirafeau/Jirafeau/tags) from GitLab onto your webserver
- Set owner & group according to your webserver
- A) Setup with the installation wizard (web):
  - Open your browser and go to your installed location, eg. `https://example.com/jirafeau/`
  - The script will redirect to you to a minimal installation wizard to set up all required options
  - All optional parameters may be set in `lib/config.local.php`, take a look at `lib/config.original.php` to see all default values
- B) Setup without the installation wizard (cli):
  - Just copy `lib/config.original.php` to `lib/config.local.php` and customize it

Note: Files and links are stored in a randomly named var folder that should be protected from direct web access (htaccess, nginx or lighttpd rules, or moving it outside the document root).

## FAQ

### What about this file deduplication thing?

Repeated uploads of the same file are stored once with a reference counter; the file is destroyed when the counter reaches zero. It is disabled by default and enabled through the file_hash option.

### How can I monitor the use of my Jirafeau instance?

Munin with simple scripts can collect the number of files and the disk space they occupy.

### How can I use the scripting interface (API)?

Point your browser at /script.php.

### How can I access the admin interface?

Open /admin.php in your browser.

### How can I change the Terms of Service?

Copy lib/tos.original.txt to lib/tos.local.txt and edit it; updates only ever touch the original file.

### How to set maximum file size?

Browsers with the HTML5 file API can upload arbitrarily large files; otherwise the limits come from PHP's post_max_size and upload_max_filesize, and Jirafeau's maximal_upload_size setting can cap it.

### How can I change the theme?

Set the style key in lib/config.local.php to a folder name in /media; use dark_style for the dark-mode theme.

### How can I automatize the cleaning of old (expired) files?

Run admin.php from the command line with the clean_expired or clean_async commands and place it in a cron entry.

### How can I limit upload access?

Set one or more passwords for the upload page and/or a list of allowed IPs in CIDR notation; downloads cannot be limited this way.

### Can I add a new language in Jirafeau?

Yes, create a new JSON file under lib/locales and submit it as a merge request.

## Jirafeau alternatives

- [filesharing](https://selfhost.directory/project/filesharing): FileSharing is a self-hosted, open-source file sharing app like WeTransfer with secure links, no database needed. (compare: https://selfhost.directory/compare/filesharing-vs-jirafeau)
- [Giraffile](https://selfhost.directory/project/giraffile): Giraffile is an open-source web app for private P2P file sharing between browsers using WebRTC, with automatic file expiration and no intermediary servers. (compare: https://selfhost.directory/compare/giraffile-vs-jirafeau)
- [Erugo](https://selfhost.directory/project/erugo): Erugo is an open-source, self-hosted file sharing platform with memorable URLs, password protection, expiration dates, download limits, and a customizable dashboard. (compare: https://selfhost.directory/compare/erugo-vs-jirafeau)
- [PlikShare](https://selfhost.directory/project/plikshare): Open-source self-hosted file sharing with unlimited users, multiple storage backends, three encryption modes, OIDC SSO, TOTP 2FA, sharing boxes, and MCP for AI agents. (compare: https://selfhost.directory/compare/jirafeau-vs-plikshare)
- [fileshelter](https://selfhost.directory/project/fileshelter): Self-hosted file sharing application that lets you upload files and share them via unique URLs with expiration, password protection, and multi-file zip creation. (compare: https://selfhost.directory/compare/fileshelter-vs-jirafeau)
- [ferrishare](https://selfhost.directory/project/ferrishare): Self-hosted file sharing with browser-side encryption so the server never sees content. Single container with SQLite, admin panel, rate limiting, configurable expiration. (compare: https://selfhost.directory/compare/ferrishare-vs-jirafeau)
- [ProjectSend](https://selfhost.directory/project/projectsend): Self-hosted, open-source client file sharing: each client gets a private portal, with expiring links, quotas, LDAP/2FA sign-in, S3 storage and a REST API. (compare: https://selfhost.directory/compare/jirafeau-vs-projectsend)
- [quickdrop](https://selfhost.directory/project/quickdrop): QuickDrop is an open-source, self-hosted file sharing app with pastebin and URL shortener. Chunked uploads, per-file encryption, expiring share links. (compare: https://selfhost.directory/compare/jirafeau-vs-quickdrop)

## More in File Sharing

- [JmalCloud](https://selfhost.directory/project/jmal-cloud-view): Self-hosted, open-source personal cloud drive: online Office editing, previews, WebDAV mounting, resumable big uploads and full-text search, shipped as a Docker image.
- [KeepShare](https://selfhost.directory/project/keepshare): KeepShare is a self-hosted, open-source file hosting automation tool that converts Magnet/DDL/Ed2K links into hosted shares, supports PikPak, auto-repairs banned shares
- [Kiwix Server](https://selfhost.directory/project/kiwix-server): Open-source CLI utilities for managing and serving ZIM files offline. Includes kiwix-serve for HTTP, kiwix-manage for libraries, and kiwix-search for full-text search.
- [kodbox](https://selfhost.directory/project/kodbox): kodbox is a self-hosted, open-source PHP file manager and private cloud drive: multi-storage mounting, fine-grained permissions, sharing, and online preview/edit.
- [kubo](https://selfhost.directory/project/kubo): Kubo is the original open-source Go implementation of IPFS: a self-hosted p2p daemon for content-addressed data, with a CLI, WebUI, HTTP gateway and RPC API.
- [Local Content Share](https://selfhost.directory/project/local-content-share): Self-hosted, open-source tool for sharing snippets, files, and links across local devices. Features Markdown notepad, configurable TTL, and PWA support.
- [Lufi](https://selfhost.directory/project/lufi): Self-hosted Docker deployment of Lufi, a file sharing service supporting temporary links, password protection, LDAP authentication, and multiple database backends.
- [lufin](https://selfhost.directory/project/lufin): Lufin is an open-source, self-hosted file sharing service with client-side encryption, password protection, and support for multiple databases and S3 storage.
- [MicroBin](https://selfhost.directory/project/microbin): Self-hosted, open-source paste bin in a single Rust binary: share text, files and URL redirects with five privacy levels, E2E encryption, expiry and QR codes.
- [minimalistic-PHP-Upload](https://selfhost.directory/project/minimalistic-php-upload): A simple self-hosted PHP upload script that lets users upload files and sends email notifications with download links. No database required.
- [mousehole](https://selfhost.directory/project/mousehole): Mousehole is a self-hosted service that keeps your MyAnonamouse seedbox IP updated automatically, with a web UI to manage the MAM cookie and trigger manual updates.
- [NextCloudPi](https://selfhost.directory/project/nextcloudpi): A self-hosted, open-source Nextcloud package delivered as SD images, VM and LXC images, or a one-line Debian installer, with a web admin panel.

## Links

- [Homepage](https://gitlab.com/jirafeau/Jirafeau)
- [Changelog and upgrade procedure](https://gitlab.com/jirafeau/Jirafeau/blob/master/CHANGELOG.md)
- [Contribution guidelines](https://gitlab.com/jirafeau/Jirafeau/blob/master/CONTRIBUTING.md)
- [Container registry](https://gitlab.com/jirafeau/Jirafeau/container_registry/)
- [Issue tracker](https://gitlab.com/jirafeau/Jirafeau/issues)

---
Source: https://selfhost.directory/project/jirafeau