An image host with thumbnails, a dashboard, thumbnails, 2fa, url shortening and more.
Go to file
sylv 2d39cd5239 feat: use file embed for pastes 2022-06-21 07:20:53 +08:00
.github/workflows build: single dockerfile 2022-06-06 10:40:41 +08:00
.vscode feat(api): video thumbnails 2022-06-19 03:29:02 +08:00
example feat: use file embed for pastes 2022-06-21 07:20:53 +08:00
packages feat: use file embed for pastes 2022-06-21 07:20:53 +08:00
.dockerignore build: single dockerfile 2022-06-06 10:40:41 +08:00
.eslintrc.json chore: use eslint config 2021-08-26 08:30:53 +00:00
.gitignore chore: use .yaml config files 2022-06-21 01:56:57 +08:00
.pnpmfile.cjs feat: mikroorm, convert to monorepo 2021-10-02 22:17:05 +00:00
.prettierrc feat: use file embed for pastes 2022-06-21 07:20:53 +08:00
Dockerfile build: single dockerfile 2022-06-06 10:40:41 +08:00
LICENSE Initial commit 2020-08-27 15:36:16 +08:00
README.md feat: use file embed for pastes 2022-06-21 07:20:53 +08:00
commitlint.config.js chore: add commitlint 2021-07-15 11:07:48 +00:00
docker-compose.yml feat: mikroorm, convert to monorepo 2021-10-02 22:17:05 +00:00
package.json chore: use .yaml config files 2022-06-21 01:56:57 +08:00
pnpm-lock.yaml feat: better host restrictions 2022-06-21 03:15:56 +08:00
pnpm-workspace.yaml feat: mikroorm, convert to monorepo 2021-10-02 22:17:05 +00:00
tsconfig.json build: single dockerfile 2022-06-06 10:40:41 +08:00
wrapper.sh build: single dockerfile 2022-06-06 10:40:41 +08:00

README.md

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

Sign In Page Dashboard
Upload Page Text Preview
Paste Page

installation

If you need help, join the discord server. This guide assumes you are on linux with a basic understanding of linux and docker.

  1. Install git, docker and docker-compose
  2. Download the files in this repository, git clone https://github.com/sylv/micro.git
  3. Copy the example configs to the current directory, cp ./micro/example/* ./
  4. Fill out .microrc.yaml, Caddyfile and docker-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.
  5. Run docker-compose up -d to start the database and micro.
  6. 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.

  1. Create a backup of the database and the data directory.
  2. 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 are database is now databaseUrl and publicPastes has been added.
  3. Change the docker image from sylver/micro or sylver/micro:master to sylver/micro:main
  4. Change the port from 8080 to 3000. If you are using the example config, do this in Caddyfile by changing micro:8080 to micro:3000.
  5. 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.
  6. Read the error message, then stop the container and set the MIGRATE_OLD_DATABASE environment variable to true
  7. 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.

discord

sylo.digital