• Stars
    star
    2,011
  • Rank 22,865 (Top 0.5 %)
  • Language
    Go
  • License
    Other
  • Created over 2 years ago
  • Updated 7 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

ketohub_raw_spider

Python
3
star
33

slide-decks

Nix
3
star
34

zig-c-simple

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

docker-cypress

Dockerfile
3
star
36

simple-encrypt

Python
2
star
37

prosperbot

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

dummy_file_generator

Python
2
star
39

python_seed

A boilerplate Python 2 project
Shell
2
star
40

process-hit-the-front-page

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

chat_unifier

Python
2
star
42

screenjournal

Like Goodreads but for couch potatoes
Go
2
star
43

rss-proxy

Go
2
star
44

dummy-appengine-demo

Python
2
star
45

eth-zvm

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

migrate-mtlynch-to-hugo

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

hid-formatter

HTML
1
star
48

godot-platformer-1

Just playing around with Godot Engine
GDScript
1
star
49

appengine-python-seed

Python
1
star
50

sia_timestamp_dumper

Dumps block timestamps from Sia
Python
1
star
51

docker-gifsicle

Dockerfile
1
star
52

ketohub_web_app

TypeScript
1
star
53

ndt-raspi-viz

HTML
1
star
54

docker-godot

Dockerized image for Godot Game Engine
Dockerfile
1
star
55

picoshare-fly-debug

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

simpleauth

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

zestful-frontend2

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

dev-scripts

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

syncthing-fly.io

Deploy a syncthing instance to fly.io
1
star
60

show-and-tell-code-of-conduct

Ruby
1
star
61

docker-syncthing

Unofficial Docker image of syncthing
Dockerfile
1
star
62

docker-protractor

Dockerfile
1
star
63

prosperbot-frontend

Go
1
star
64

google-analytics-v4-example

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

free-usage-videos

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

ansible-role-nginx-rtmp

Shell
1
star