4.9 KiB
micro
An invite-only file sharing service with support for ShareX. You can see a preview at https://micro.sylo.digital
features
- ShareX Support
- Video and image thumbnails
- Config generation
- Encrypted pastes
- File name preservation
- Video, image, text and markdown previews
- Syntax highlighting for supported files
- Deletion URLs
- Dashboard
- Permissions
- Invite links
- URL Shortening
- Mobile support
- EXIF metadata removal
- Purging of old and/or large files (
config.purge
).
screenshots
installation
If you need help, join the discord server. This guide assumes you are on linux with a basic understanding of linux and docker.
- Install
git
,docker
anddocker-compose
- Download the files in this repository,
git clone https://github.com/sylv/micro.git
- Copy the example configs to the current directory,
cp ./micro/example/* ./
- Fill out
.microrc.yaml
,Caddyfile
anddocker-compose.yml
. It is extremely important you read through each of the 3 files and make sure you understand what they do. Specifically,.microrc.yaml
contains a secret that handles authentication, if it is not a secure random string everyone can sign in as anyone they want without a password. - Run
docker-compose up -d
to start the database and micro. - Get the startup invite by doing
docker-compose logs micro
and copying the invite URL that should be somewhere towards the end of the log. Go to that URL to create the first account.
Setup is now complete and your instance should be working. When updates come out, create a backup of the database then pull the latest image and restart the container. Unlike past versions migrations are applied automatically.
migrating from 0.0.x to 1.0.0
I've made a best effort attempt to make migration as painless as possible, mostly for my own sanity. These steps are quite in-depth but in reality the migration should be fairly simple for most users. If you get stuck at any point, please join the discord server and ask for help.
- Create a backup of the database and the data directory.
- Update your
.microrc
with the changes seen in example config (your config may be in json with the example now being yaml, but the keys are 1:1), notable changes aredatabase
is nowdatabaseUrl
andpublicPastes
has been added. - Change the docker image from
sylver/micro
orsylver/micro:master
tosylver/micro:main
- Change the port from
8080
to3000
. If you are using the example config, do this inCaddyfile
by changingmicro:8080
tomicro:3000
. - Start the container. It should exit on startup with an error message saying that there is data that must be migrated. If it does not, you did not update the image tag correctly or it cannot detect data to be migrated.
- Read the error message, then stop the container and set the
MIGRATE_OLD_DATABASE
environment variable totrue
- Start the container and it will migrate the database automatically.
After that, you should be able to use it as normal. Thumbnails are the only data that is not migrated, as the format changed and it doesn't really matter because they can just be regenerated on demand. If you run into any issues during migration, join the discord server or open an issue on github.
todo
- Ratelimiting
- Admin UI
publicPastes=false
should hide the paste button and show an error on the paste page unless the user is signed in.- Redirects may be broken. Also hosts with no redirect should probably just have it set to the root host, that should allow us to strip some unnecessary code.
- GIFs should probably be converted to mp4 videos to save space
- Discord is currently blocking this as they handle embedding videos (and gifs) extremely poorly. Unless the url has "mp4" in it it outright won't embed most of the time.