• Stars
    star
    2,011
  • Rank 23,025 (Top 0.5 %)
  • Language
    Go
  • License
    Other
  • Created over 2 years ago
  • Updated 9 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A minimalist, easy-to-host service for sharing images and other files

PicoShare

CircleCI Docker Version GitHub commit activity GitHub last commit Contributors License

Overview

PicoShare is a minimalist service that allows you to share files easily.

PicoShare demo

Why PicoShare?

There are a million services for sharing files, but none of them are quite like PicoShare. Here are PicoShare's advantages:

  • Direct download links: PicoShare gives you a direct download link you can share with anyone. They can view or download the file with no ads or signups.
  • No file restrictions: Unlike sites like imgur, Vimeo, or SoundCloud that only allow you to share specific types of files, PicoShare lets you share any file of any size.
  • No resizing/re-encoding: If you upload media like images, video, or audio, PicoShare never forces you to wait on re-encoding. You get a direct download link as soon as you upload the file, and PicoShare never resizes or re-encodes your file.

Run PicoShare

From source

PS_SHARED_SECRET=somesecretpass PORT=4001 \
  go run cmd/picoshare/main.go

From Docker

To run PicoShare within a Docker container, mount a volume from your local system to store the PicoShare sqlite database.

docker run \
  --env "PORT=4001" \
  --env "PS_SHARED_SECRET=somesecretpass" \
  --publish 4001:4001/tcp \
  --volume "${PWD}/data:/data" \
  --name picoshare \
  mtlynch/picoshare

From Docker + cloud data replication

If you specify settings for a Litestream-compatible cloud storage location, PicoShare will automatically replicate your data.

You can kill the container and start it later, and PicoShare will restore your data from the cloud storage location and continue as if there was no interruption.

PORT=4001
PS_SHARED_SECRET="somesecretpass"
LITESTREAM_BUCKET=YOUR-LITESTREAM-BUCKET
LITESTREAM_ENDPOINT=YOUR-LITESTREAM-ENDPOINT
LITESTREAM_ACCESS_KEY_ID=YOUR-ACCESS-ID
LITESTREAM_SECRET_ACCESS_KEY=YOUR-SECRET-ACCESS-KEY

docker run \
  --publish "${PORT}:${PORT}/tcp" \
  --env "PORT=${PORT}" \
  --env "PS_SHARED_SECRET=${PS_SHARED_SECRET}" \
  --env "LITESTREAM_ACCESS_KEY_ID=${LITESTREAM_ACCESS_KEY_ID}" \
  --env "LITESTREAM_SECRET_ACCESS_KEY=${LITESTREAM_SECRET_ACCESS_KEY}" \
  --env "LITESTREAM_BUCKET=${LITESTREAM_BUCKET}" \
  --env "LITESTREAM_ENDPOINT=${LITESTREAM_ENDPOINT}" \
  --name picoshare \
  mtlynch/picoshare

Notes:

  • Only run one Docker container for each Litestream location.
    • PicoShare can't sync writes across multiple instances.

Using Docker Compose

To run PicoShare under docker-compose, copy the following to a file called docker-compose.yml and then run docker-compose up.

version: "3.2"
services:
  picoshare:
    image: mtlynch/picoshare
    environment:
      - PORT=4001
      - PS_SHARED_SECRET=dummypass # Change to any password
    ports:
      - 4001:4001
    command: -db /data/store.db
    volumes:
      - ./data:/data

Parameters

Command-line flags

Flag Meaning Default Value
-db Path to SQLite database "data/store.db"
-vacuum Vacuum database periodically to reclaim disk space (increases RAM usage) false

Environment variables

Environment Variable Meaning
PORT TCP port on which to listen for HTTP connections (defaults to 4001).
PS_BEHIND_PROXY Set to "true" for better logging when PicoShare is running behind a reverse proxy.
PS_SHARED_SECRET (required) Specifies a passphrase for the admin user to log in to PicoShare.

Docker environment variables

You can adjust behavior of the Docker container by specifying these Docker-specific variables with docker run -e:

Environment Variable Meaning
LITESTREAM_BUCKET Litestream-compatible cloud storage bucket where Litestream should replicate data.
LITESTREAM_ENDPOINT Litestream-compatible cloud storage endpoint where Litestream should replicate data.
LITESTREAM_ACCESS_KEY_ID Litestream-compatible cloud storage access key ID to the bucket where you want to replicate data.
LITESTREAM_SECRET_ACCESS_KEY Litestream-compatible cloud storage secret access key to the bucket where you want to replicate data.

Docker build args

If you rebuild the Docker image from source, you can adjust the build behavior with docker build --build-arg:

Build Arg Meaning Default Value
litestream_version Version of Litestream to use for data replication 0.3.9

Deployment

PicoShare is easy to deploy to cloud hosting platforms:

More Repositories

1

logpaste

A simple web service for storing text log files
Go
306
star
2

whatgotdone

A tool for sharing weekly task updates with teammates.
Go
136
star
3

key-mime-pi

Use your Raspberry Pi as a remote-controlled keyboard that accepts keystrokes through a web browser.
Python
101
star
4

hello-world-cypress

A simple example of using Cypress.io for end-to-end testing
Go
54
star
5

mtlynch.io

Source for mtlynch.io, a blog about technology and entrepreneurship.
HTML
43
star
6

resticpy

Minimal Python wrapper around the restic backup command-line interface.
Python
41
star
7

process-home-videos

Helper scripts for processing home videos and uploading them to MediaGoblin
Python
36
star
8

pre-vue

A template for building pre-rendered web apps with Vue + Nuxt
Vue
30
star
9

mediagoblin-docker

Docker image for MediaGoblin, adapted from https://notabug.org/dachary/mediagoblin-docker
Dockerfile
22
star
10

zfs-encrypted-backup

Shell
18
star
11

python3_seed

A boilerplate Python 3 project
Shell
17
star
12

docker-sia

An unofficial Docker image for Sia [Deprecated as of 2020-04-02]
Dockerfile
16
star
13

zestful-client

Python
14
star
14

mediagoblin

Python
10
star
15

ansible-role-key-mime-pi

Ansible role for installing key-mime-pi service
Shell
9
star
16

beancount-chase-bank

Beancount importer for Chase bank
Python
9
star
17

mtlynch-backup

The Python script I use to back up my data with restic
Python
8
star
18

ansible-role-sia

Ansible role for the Sia distributed storage network
Shell
7
star
19

social-go

A Go parser for various social media handles and URLs
Go
6
star
20

sia_metrics_collector

Python
6
star
21

ansible-role-clipbucket

An Ansible role for the Clipbucket video platform
Python
6
star
22

plausible-proxy

Reverse proxy for Plausible Analytics, implemented as Google Cloud Function
Go
5
star
23

sia_load_tester

https://blog.spaceduck.io/sia-load-test-preview/
Python
5
star
24

beancount-mercury

Beancount importer for Mercury Startup Checking
Python
4
star
25

gofn-prosper

Go bindings for the Prosper P2P Lending API
Go
4
star
26

hello-world-vue-pre-rendered

A basic example of a website generated with Vue + Nuxt using pre-rendering.
Vue
4
star
27

stripe-snooping-example

A proof of concept of the snooping behavior of Stripe's official JavaScript library
Vue
3
star
28

ansible-role-litestream

Role for installing the Litestream sqlite replication tool
Jinja
3
star
29

docker-flask-upload-demo

Dockerfile
3
star
30

ansible-role-storj

An Ansible role for the Storj distributed storage network
Shell
3
star
31

customize-rpi

Customize a redistributable Raspberry Pi image
Shell
3
star
32

slide-decks

Nix
3
star
33

zig-c-simple

Simple example of calling C code from Zig
Zig
3
star
34

docker-cypress

Dockerfile
3
star
35

simple-encrypt

Python
2
star
36

prosperbot

An automated Prosper peer to peer lending bot
Go
2
star
37

dummy_file_generator

Python
2
star
38

python_seed

A boilerplate Python 2 project
Shell
2
star
39

process-hit-the-front-page

Process videos from Hit the Front Page of Hacker News
Shell
2
star
40

chat_unifier

Python
2
star
41

screenjournal

Like Goodreads but for couch potatoes
Go
2
star
42

rss-proxy

Go
2
star
43

dummy-appengine-demo

Python
2
star
44

eth-zvm

An implementation of the Ethereum virtual machine in pure Zig.
Zig
2
star
45

migrate-mtlynch-to-hugo

A quick 'n dirty script to migrate the Jekyll-based mtlynch.io to Hugo
Python
1
star
46

hid-formatter

HTML
1
star
47

godot-platformer-1

Just playing around with Godot Engine
GDScript
1
star
48

appengine-python-seed

Python
1
star
49

sia_timestamp_dumper

Dumps block timestamps from Sia
Python
1
star
50

docker-gifsicle

Dockerfile
1
star
51

ndt-raspi-viz

HTML
1
star
52

docker-godot

Dockerized image for Godot Game Engine
Dockerfile
1
star
53

picoshare-fly-debug

Deploy a dev environment to Fly.io for debugging PicoShare
Dockerfile
1
star
54

simpleauth

A simple Go authentication and session management library for web apps.
Go
1
star
55

zestful-frontend2

Demo page for the Zestful ingredient parser (using Vue + Nuxt)
Vue
1
star
56

syncthing-fly.io

Deploy a syncthing instance to fly.io
1
star
57

dev-scripts

Canonical version of my best dev scripts for automating programming tasks
Shell
1
star
58

show-and-tell-code-of-conduct

Ruby
1
star
59

docker-syncthing

Unofficial Docker image of syncthing
Dockerfile
1
star
60

docker-protractor

Dockerfile
1
star
61

prosperbot-frontend

Go
1
star
62

google-analytics-v4-example

A basic example of using the Google Analytics Core Reporting v4 API
Go
1
star
63

free-usage-videos

A collection of public domain / Creative Commons videos
1
star
64

ansible-role-nginx-rtmp

Shell
1
star