# FileSync | Send Files From One Device To Many In Real-time 📁

**URL:** <https://onehack.st/t/filesync-send-files-from-one-device-to-many-in-real-time/310608>\
**Category:** Tools & Scripts\
**Tags:** programming, privacy, file-management\
**Created:** [September 8, 2025, 8:04pm UTC](https://onehack.st/t/filesync-send-files-from-one-device-to-many-in-real-time/310608 "2025-09-08T20:04:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aina](https://onehack.st/user_avatar/onehack.st/aina/32/167469_2.png) [@Aina](https://onehack.st/u/Aina)\
**Post date:** [September 8, 2025, 8:04pm UTC](https://onehack.st/t/filesync-send-files-from-one-device-to-many-in-real-time/310608/1 "2025-09-08T20:04:18Z")

</div>

[![FileSync Logo](https://github.com/polius/FileSync/raw/main/web/assets/icon.png)](https://github.com/polius/FileSync/blob/main/web/assets/icon.png)

# FileSync

**Send files from one device to many in real-time**

[![](https://github.com/polius/filesync/actions/workflows/release.yml/badge.svg)](https://github.com/polius/filesync/actions/workflows/release.yml) [![GitHub Release](https://camo.githubusercontent.com/ac49530161d9a66f9d1af33061a22e693e24b7f217a29ef9d27e54fb2d5172f3/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f72656c656173652f706f6c6975732f66696c6573796e63)](https://github.com/polius/filesync/releases) [![Docker Pulls](https://camo.githubusercontent.com/cadd7832ada7f5aed2cf1bd9e285d6dc99a9ff46b0b6ebf98f3ca8c15d19efb7/68747470733a2f2f696d672e736869656c64732e696f2f646f636b65722f70756c6c732f706f6c697573636f72702f66696c6573796e63)](https://hub.docker.com/r/poliuscorp/filesync)

**FileSync** is a file sharing web application that allows users to transfer files between multiple devices with end-to-end encryption.

[![FileSync](https://github.com/polius/FileSync/raw/main/web/assets/filesync.png)](https://github.com/polius/FileSync/blob/main/web/assets/filesync.png)

## Install

**1. Download required files**

Get the `docker-compose.yml` and `Caddyfile` from the **deploy** folder.

**2. Generate a secure secret key**

Run the following command to generate a 32-byte base64-encoded secret:

```auto
python3 -c "import secrets, base64; print(base64.b64encode(secrets.token_bytes(32)).decode())"

```

**3. Configure the secret key**

Open `docker-compose.yml` and replace **both occurrences** of `<SECRET_KEY>` with the generated value from the previous step.

**Example:**

```auto
...
- --static-auth-secret=/RaFOHJQQPAAXRNdaDhfBghvX9+o9UJEazKgIopK3TI=
...
- SECRET_KEY=/RaFOHJQQPAAXRNdaDhfBghvX9+o9UJEazKgIopK3TI=
...

```

**4. (Optional) Enable HTTPS**

To enable HTTPS, edit the `Caddyfile`:

- Replace `localhost:80` with your domain (e.g., `filesync.app`).

- Replace `http://localhost:9000` with your domain and port (e.g., `filesync.app:9000`).

Caddy will automatically provision and renew SSL certificates for your domain.

**Example:**

```auto
filesync.app {
	reverse_proxy filesync:80
}

filesync.app:9000 {
	reverse_proxy peerjs:9000
}

```

**5. Start the services**

Run the following command to start everything in detached mode:

```auto
docker-compose up -d

```

**6. Access the application**

Once the services are up;

- For local testing, open your browser at:

```auto
http://localhost

```

- If using a domain, open:

```auto
https://yourdomain

```

## Uninstall (Optional)

To stop and remove the containers, run:

```auto
docker-compose down

```

## Under the hood

FileSync uses [PeerJS](https://github.com/peers/peerjs) (a WebRTC wrapper) to transfer files between multiple devices. Files shared are peer-to-peer, which means there is a direct file transfer between the sender and receiver without any intermediate server. Your files remain private and secure throughout the entire transfer process.

Do note that a [PeerJS server](https://github.com/peers/peerjs-server) is used to assist in the initial connection setup, ensuring all users can establish peer-to-peer connections effectively. Once the connections are established, the server steps back, allowing the direct transfer of files between the sender and the receiver. At no point during this process does the server have access to the file contents. It solely facilitates the connection between users without compromising the privacy or security of the files being shared.

## GitHub:

[https://github.com/polius/FileSync](https://github.com/polius/FileSync)
