Setting Up Lightweight Personal File Sharing Service Using Docker - Freedom in File Transfers

Temporary small file sharing, remote file transfer, breaking away from cloud storage.

Demo: https://c.carlzeng.com:4443/fileupd

Purpose

Temporary small file sharing, remote file transfer, breaking away from cloud storage.

How to Use

Setting up a lightweight, self-hosted personal file sharing service allows for unrestricted file transfers. It focuses on offering an aesthetically pleasing and lightweight tool for file sharing.

Preview

Related Content

Implementation Approach

1
2
3
4
5
6
7
8
9
10
11
12
version: '3.8'
services:
pingvin-share:
image: stonith404/pingvin-share
restart: unless-stopped
ports:
- 6000:3000
- 6001:3333
volumes:
- "./data:/opt/app/backend/data"
- "./data/images:/opt/app/frontend/public/img"
# - "./data/framework-0c7baedefba6b077.js:/opt/app/frontend/.next/static/chunks/framework-0c7baedefba6b077.js" #Used personally to add matomo statistics JS

The above code completes the port mapping. Not sure why the port mapping of 8080 seems to be inaccessible (the original documentation was incorrect; upon checking the logs, it should be port 3333). Later on, it was found that only port 6001 could also be used normally (consistent with the log content).

Firewall access has been granted to access the mapped ports.

Partial Log:

1
2
3
4
5
6
Attaching to pingvin-share_pingvin-share_1
pingvin-share_1 |
pingvin-share_1 | > pingvin-share-backend@0.21.1 prod
pingvin-share_1 | > prisma migrate deploy && prisma db seed && node dist/src/main
pingvin-share_1 |
... (omitted for brevity)

Deployment to NAS

The idea is: NAS has a relatively large hard drive, making it convenient for direct sharing and avoiding concerns about easily filling up disk space.

SSH into the Synology NAS, wanting to find a way similar to previewing Docker Container files in BT (BitTorrent), but unable to locate the specific file path.

1
2
3
root@DS918:/var/packages/Docker/var/docker/containers# ls                                        
086decff0f0ff981d6458d792b6d4f2efe96a0a16cc339b0963c8e319c8917b5
2ea60beefe6d9bab1a3910785a310bac528723055c7004f3d15eb55a07abfd70

Temporarily, it’s not possible. You can only configure it in BT, test it, and then move the mapped files to the specified NAS folder in the Synology NAS.

  1. First, copy the mapped files to a specific folder on the NAS.

    1
    scp -r /www/server/panel/data/compose/pingvin-share/data/ CarlNote@192.168.6.203:/volume2/KingchuxingSSD512G/docker/pingvin-share/data

    This is convenient for logging into the Debian ssh, then transferring the folder (or files, the /data directory) in batches to the specified folder on the NAS (/volume2/KingchuxingSSD512G/docker/pingvin-share/). Next time, you can easily transfer the parent directory at once (useful for the initial file migration).

    1
    2
    # Transfer single file from Debian to NAS, update situation, synchronize single file at a time
    scp docker-compose.yml root@192.168.6.203:/volume2/KingchuxingSSD512G/docker/pingvin-share/
  2. Similarly, change the NPM to the corresponding 6000 port on the NAS (as per the docker-compose setup).

Source of Inspiration

pingvin-share

Fun Docker Project: Pingvin Share - A High Aesthetic and Lightweight File Sharing Tool! Original