How to Host and Share Big Files Online with PicoShare in Linux

by Karley Harris
23 minutes read

How to Host and Share Big Files Online with PicoShare in Linux

A photograph of a individual in front of a laptop computer system via a mobile on his hand.

Picoshare is a lightweight and highly obtainable document sharing net app for Linux. It bargains an easy-to-utilise borrower interface wherein you can upload and share records from your own web server. This article will manifest you how to mount Picoshare and share records virtual earning utilise of Docker in Ubuntu Linux.

Web content
  • Why Gain make utility of of Picoshare to Share Documents Digital
  • Installing the Prerequisites for PicoShare
  • Installing and Sprinting PicoShare
  • Pegging PicoShare via an SSL Retract Proxy
  • Testing PicoShare and Uploading Your Initially File

Why Gain make utility of of Picoshare to Share Documents Digital

One of the greatest advertising times of PicoShare is that it’s effortless to emit on any kind of Linux-based platform. Wearing the help of Docker, you can share records virtual via PicoShare without vexing around Linux dependences and regime compatibility.

Another advertising time of PicoShare is that it doesn’t adjust the records you upload to its platform. This renders it beloved for sharing images and videos, since you can be sure that the web server will not re-inscribe your media as you upload it.

A screenshot of PicoShare kneading on a web server.

Finally, PicoShare comes via the ability to mimic its document storage void to external points storage void fixes. For instance, you can web link your Amazon.com S3-right bucket to your PicoShare web server and architecture a 1:1 contingency of your web server’s materials. This renders it easy to reclaim information when migrating from one mechanism to an additional.

Installing the Prerequisites for PicoShare

Presumption: This tutorial is executed on an Ubuntu 24.04 machine via at the horribly least 2 GB of RAM and 50 GB of disk liberty. You will need to have a domain tag that you can architecture “A” records for that domain. Finally, this article will utilise DigitalOcean Enclosures for its S3-right points storage void backend.

Tab: While the directions here are for Ubuntu, they need to alike work for a lot of Linux rations.

The first intervene mounting PicoShare is to acquire both Docker and Nginx for your host mechanism (for unlike other Linux rations, here is how to mount Docker on your Linux equipments). To prelude, fetch the signing pivot for the Docker job’s repository:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg sudo chmod a+r /etc/apt/keyrings/docker.gpg

Difference a newfangled apt repository document earning utilise of your favorite text editor:

sudo nano /etc/apt/sources.list.d/docker.list

Paste the consequent chatter of code inside your newfangled repository document:

deb [arch=amd64 signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/ubuntu noble stable

Save your repository document, then update both the mechanism’s repository lists and its existing bundles:

sudo apt update && sudo apt upgrade

Void Docker, Docker Design, and Nginx earning utilise of apt in Ubuntu:

sudo apt install docker-ce docker-ce-cli containerd.io docker-compose-plugin docker-buildx-plugin nginx

Inventing a Cloud Storage Backup for PicoShare

Go to your S3-right cloud storage void solution carrier, then architecture a newfangled storage void bucket. In this husk, I’m earning utilise of DigitalOcean Enclosures so I will click Difference -> Enclosures Object Storage on my control panel purge.

A screenshot reflecting the location of the "Enclosures Object Storage" menu point in the DigitalOcean control panel.

Pick a Datacenter location for your S3-right storage void, then tick the Make it viable for CDN checkbox.

A screenshot reflecting the buttons for configuring the Enclosures bucket location and whether the bucket will utilise DigitalOcean's CDN.

Ration a tag for your newfangled Enclosures bucket, then click Difference a Enclosures Bucket to initialize it.

A screenshot reflecting the textbox expeditious for the Enclosures tag and the location of the "Difference a Enclosures Bucket" switch.

Click the Xerox Symbol on the Origin Endpoint textbox and paste it on a ensconced aloof text document.

A screenshot accentuating the location of the Xerox symbol on the Enclosures' control panel.

Scroll via the fled sidebar of your DigitalOcean Control panel, then click the API genre.

A screenshot reflecting the location of the API genre in the control panel page.

Click the Enclosures Techniques tab, then pick Accumulate Brand-newfangled Secret.

Ration a tag for your newfangled pivot, then click Difference Access Secret.

Xerox both the “Access Secret” and “Secret Secret” from the page and paste it to your text document.

A screenshot reflecting the location of the Access Secret and Secret Secret for the Enclosures bucket.

Installing and Sprinting PicoShare

Difference a newfangled folder for PicoShare inside your borrower’s residence magazine, then go inside it:

mkdir ~/picoshare && cd ~/picoshare

Gain make utility of of your favorite text editor to architecture the Design document for PicoShare:

nano ./docker-compose.yml

Paste the consequent block of code inside your newfangled .yml document:

version: "3.2" services:   picoshare:     image: mtlynch/picoshare     environment:       - PORT=4001       - PS_SHARED_SECRET=RANDOM PASSWORD HERE       - LITESTREAM_BUCKET="YOUR BUCKET NAME"       - LITESTREAM_ENDPOINT="YOUR ORIGIN ENDPOINT HERE"       - LITESTREAM_ACCESS_KEY_ID="YOUR BUCKET ACCESS ID HERE"       - LITESTREAM_SECRET_ACCESS_KEY="YOUR BUCKET SECRET HERE"     ports:       - 4001:4001     command: -db /data/store.db     volumes:       - ./data:/data

Recuperation the top trait of the “PS_SHARED_SECRET” variable via a appropriately long and arbitrary password. This will offer as the password for PicoShare’s net borrower interface.

A terminal reflecting the randomly collected shared password for the PicoShare instance.

Tab: you can stimulate your own arbitrary password by running: cat /dev/urandom | tr -dc 'A-Za-z0-9' | fold -w 32 | head -n 1 on a ensconced aloof terminal session.

Recuperation the top trait of the “LITESTREAM_BUCKET” variable via the tag of your Enclosures bucket.

A terminal reflecting the pertinent top trait for the S3-right bucket.

Xerox the void and domain tag segment of your endpoint, then paste it as the top trait of your “LITESTREAM_ENDPOINT” variable.

A screenshot reflecting the proper layout for the S3-right endpoint variable.

Recuperation the qualities of both the “LITESTREAM_ACCESS_KEY_ID” and the “LITESTREAM_SECRET_ACCESS_KEY_ID” variables via DigitalOcean Enclosures bucket’s Access Secret and Secret Secret.

A screenshot reflecting the Enclosures Access Secret and Secret Secret for the PicoShare instance.

Save your docker-write.yml document, then dashed the consequent command to build and dashed the PicoShare instance:

sudo docker compose up -d

On a side tab: you can alike utilise Docker and Docker Design to without standoff host a Minecraft web server on your Linux machine.

Pegging PicoShare via an SSL Retract Proxy

At this time, you now have PicoShare running at edict 4001 on your town machine. In act to access it tightly on the net, you need to deliver sure that with one voice relationships to it are encrypted via SSL.

Embark by designing a newfangled “A” record for your domain tag earning every physical effort to the IPv4 address of your PicoShare web server. In my husk, I will architecture an “A” record via the top trait “picoshare.”

A screenshot reflecting the "A" DNS record for the PicoShare web server.

Void the “core” snap package on your Ubuntu mechanism:

sudo snap install core

Bring the certbot snap package from the Electronic Frontier Underpinning (EFF):

sudo snap install certbot --classic

Difference a newfangled Nginx areas installation document earning utilise of your favorite text editor:

sudo nano /etc/nginx/sites-available/picoshare

Paste the consequent block of code inside your areas config document:

server {           server_name SUBDOMAIN.YOUR-ROOT.DOMAIN;           location / {                 proxy_pass http://127.0.0.1:4001;                 proxy_http_version 1.1;                 proxy_redirect off;                 proxy_set_header Upgrade $http_upgrade;                 proxy_set_header Connection "upgrade";                 proxy_set_header X-Forwarded-Proto https;                 proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;                 proxy_set_header Host $host;                 client_max_body_size 0m;         } }

Save your areas installation document, then architecture a symbolic web link from your “/etc/nginx/websites-available/” magazine to your “/etc/nginx/websites-permitted/” folder:

sudo ln -s /etc/nginx/sites-available/picoshare /etc/nginx/sites-enabled/

Twin-weigh your Nginx config document for any kind of missteps, then prelude the Nginx webserver daemon earning utilise of systemctl:

nginx -t sudo systemctl enable --now nginx.service
A terminal reflecting the config verification and the systemctl command for commencement up the Nginx webserver.

Sign up your PicoShare web server earning utilise of EFF’s certbot utility:

sudo certbot register --agree-tos -m YOUR-EMAIL@ADDRESS.HERE

Accumulate a newfangled SSL certificate earning every physical effort to your web server’s domain tag:

sudo certbot --nginx -d SUBDOMAIN.YOUR-ROOT.DOMAIN

Good to comprehend: learn how HTTPS preserves your information virtual by collecting your own SSL certificate via OpenSSL.

Testing PicoShare and Uploading Your Initially File

Open a net internet browser, then navigate to your subdomain to lot the PicoShare touchdown page.

A screenshot reflecting the touchdown page for PicoShare that's running on a VPS.

Click the Log In switch on the page’s upper right side.

Ration the top trait of the “PS_SHARED_SECRET” on the Passphrase textbox, then click Authenticate to login.

A screenshot reflecting the login expeditious for PicoShare.

Check whether you can preserve information on your PicoShare web server by clicking the Upload switch, then pick a sample document via the picker menu.

A screenshot accentuating the location of the Upload switch in the inner control panel.

Xerox the first web link that the web server retorts to the borrower that you stab to share your document to.

A screenshot accentuating the location of the first shareable web link in the PicoShare instance.

Make it viable for Temporary Tenant Uploads on PicoShare

Aside from borrower-submitted uploads, you can alike architecture temporary web links that permit confidential users to upload indifferent records on your web server. This can be beloved if you have someone that needs to share records via you but can’t upload records to a recurring cloud solution.

Embark by clicking the Tenant Internet links genre on PicoShare’s homepage.

A screenshot reflecting the location of the "Tenant Internet links" genre in the PicoShare control panel.

Click the Difference Brand-newfangled switch merely overhead the vacant web link run-via table.

Ration the inalienable veracities for your lessee upload web link. In my husk, I will label it as “MakeTechEasier” and package the expiry to Never ever via a document size constraint of 100MB and an undocked amount constraint of 10 uploads.

A screenshot reflecting a ended up Tenant Internet link form.

Click Difference to stimulate the temporary lessee web link for your PicoShare instance.

Click the Xerox Symbol on the right-hand side of the lessee web link, then send out the content of your clipboard to the intended recipient.

A screenshot reflecting the location of the Xerox Symbol on the Tenant Internet links purge.

Sending out and shielding PicoShare to share records virtual earning utilise of Linux is merely the first intervene compensatory your digital unique seclusion virtual. Situate out how you can further preserve yourself by organizing your own email pen names web server earning utilise of SimpleLogin.

Image credit: Alejandro Escamilla via Unsplash and PicoShare Github. With one voice alterations and screenshots by Ramces Red.

Related Posts