Clear, practical technology insights BSOD Code Lookup · Windows Error Code Lookup · Wi-Fi Troubleshooting · PC Troubleshooting Checklist

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

Learn how to host and Share Large Files Online with PicoShare in Linux with step-by-step instructions, preparation tips, troubleshooting checks.

Table of Contents

This practical guide explains how to host and Share Large Files Online with PicoShare in Linux in a clear sequence, including preparation, key settings, common mistakes, and troubleshooting steps.

What This Guide Covers

  • Install the prerequisites for PicoShare
  • Create cloud storage backups for PicoShare
  • Install and run PicoShare

This article will show you how to install Picoshare and share files online using Docker in Ubuntu Linux.

Install the prerequisites for PicoShare

Assumptions : This tutorial is performed on an Ubuntu 24.04 machine with at least 2GB of RAM and 50GB of disk space. You will need to have a domain name to be able to create an 'A' record for that domain. Finally, this article will use DigitalOcean Spaces for the S3-compatible object storage backend.

Note : Although the instructions here are for Ubuntu, they also apply to most Linux distributions.

The first step in installing PicoShare is to prepare both Docker and Nginx for the host system (for other Linux distributions, here's how to install Docker on a Linux system). To get started, get the signing key for your Docker project'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

Create a new apt repository file using your favorite text editor:

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

Paste the following line of code into the new repository file:

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

Save the repository file, then update both the system's repository list and its current packages:

sudo apt update && sudo apt upgrade

Install Docker, Docker Compose and Nginx using apt in Ubuntu:

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

Create cloud storage backups for PicoShare

Go to an S3-compatible cloud storage provider, then create a new storage bucket. This case is using DigitalOcean Spaces so click Create -> Spaces Object Storage on the dashboard screen.

Create cloud storage backups for PicoShare - Host and Share Large Files Online with PicoShare in Linux

Select the Datacenter location for S3-compatible storage, then check the Enable CDN checkbox .

Create cloud storage backups for PicoShare - Host and Share Large Files Online with PicoShare in Linux example 2

Name the new Spaces Bucket, then click Create a Spaces Bucket to initialize the group.

Create cloud storage backups for PicoShare - Host and Share Large Files Online with PicoShare in Linux example 3

Click Copy Icon on the Origin Endpoint text box and paste it into a separate text file.

Create cloud storage backups for PicoShare - Host and Share Large Files Online with PicoShare in Linux example 4

Scroll through the left sidebar of the DigitalOcean dashboard, then click the API category .

Create cloud storage backups for PicoShare - Host and Share Large Files Online with PicoShare in Linux example 5

Click the Spaces Keys tab , then select Generate New Key .

Provide a name for the new key, then click Create Access Key .

Copy both 'Access Key' and 'Secret Key' from the page and paste into the text file.

Create cloud storage backups for PicoShare - Host and Share Large Files Online with PicoShare in Linux example 6

Install and run PicoShare

Create a new folder for PicoShare inside the user's home directory, then go inside that folder:

mkdir ~/picoshare && cd ~/picoshare

Use your favorite text editor to create a Compose file for PicoShare:

nano ./docker-compose.yml

Paste the following block of code into the new .yml file:

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

Replace the value of the variable 'PS_SHARED_SECRET' with a random and sufficiently long password. This will be used as the password for PicoShare's web interface.

Install and run PicoShare - Host and Share Large Files Online with PicoShare in Linux

Note : You can generate your own random password by running: cat /dev/urandom | tr -dc 'A-Za-z0-9' | fold -w 32 | head -n 1 on a separate terminal session.

Change the value of the variable 'LITESTREAM_BUCKET' with the name of the Spaces Bucket.

Install and run PicoShare - Host and Share Large Files Online with PicoShare in Linux example 2

Copy the region and domain part of the endpoint, then paste that as the value of the 'LITESTREAM_ENDPOINT' variable.

Install and run PicoShare - Host and Share Large Files Online with PicoShare in Linux example 3

Replace the values ??of both 'LITESTREAM_ACCESS_KEY_ID' and 'LITESTREAM_SECRET_ACCESS_KEY_ID' variables with the Access Key and Secret Key of the DigitalOcean Spaces bucket.

Install and run PicoShare - Host and Share Large Files Online with PicoShare in Linux example 4

Save the docker-compose.yml file, then run the following command to build and run the PicoShare instance:

sudo docker compose up -d

A side note : You can also use Docker and Docker Compose to quickly host a Minecraft server on Linux.

Secure PicoShare with SSL Reverse Proxy

At this point, you should have PicoShare running at port 4001 on your local machine. To access it securely on the Internet, you need to ensure that all connections to it are encrypted via SSL.

Start by creating a new 'A' record for the domain pointing to the IPv4 address of the PicoShare server. This case will create an 'A' record with the value 'picoshare'.

Secure PicoShare with SSL Reverse Proxy - Host and Share Large Files Online with PicoShare in Linux

Install 'core' snap package on Ubuntu system:

sudo snap install core

Get the certbot snap package from the Electronic Frontier Foundation (EFF):

sudo snap install certbot --classic

Create a new Nginx site configuration file using your favorite text editor:

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

Paste the following code block into the website configuration file:

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 the site configuration file, then create a symbol link from the '/etc/nginx/sites-available/' directory to the '/etc/nginx/sites-enabled/' directory :

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

Carefully check the Nginx configuration file to see if there are any errors, then start the Nginx webserver daemon using systemctl:

nginx -t sudo systemctl enable --now nginx.service

Secure PicoShare with SSL Reverse Proxy - Host and Share Large Files Online with PicoShare in Linux example 2

Register the PicoShare server using EFF's certbot utility:

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

Create a new SSL certificate pointing to the server domain:

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

Final Thoughts

Use the instructions and checks above in order, verify the result after each major step, and keep a backup whenever the process changes important files or system settings.

FAQ

What should I check before starting?

Confirm that your device or software version matches the instructions, save important data, and note the original settings before making changes.

What should I do if the steps do not work?

Restart the app or device, install available updates, review any error message, and repeat the steps carefully in the same order.

Can I undo the changes?

Many changes can be reversed, but the exact method depends on the feature. A backup or restore point gives you the safest way to recover.

Discussion

Reader Comments 0

Sign in with email or Google to join the discussion.