micro/README.md

4.5 KiB


🔵 discord 🟢 hosted instance

micro

A vanity 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
  • Conversions (GIF>WebM, WebP>PNG, etc.)
  • Purging of old and/or large files (config.purge).
  • 2FA support

screenshots

Sign In Page Dashboard
Upload Page Text Preview
Paste Page 2FA setup

installation

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

[!TIP] If you are already familiar with docker, you can look at the compose file and config file to get setup quickly. The below is a more detailed guide for inexperienced users.

  1. Install git and docker
  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. To add another user, sign in then go to /api/invite and copy the URL it gives you. This will be improved in the future.

configuration

micro uses venera to load configuration files. Configuration files are validated on startup, and may log errors if invalid setups are detected. The venera page has more information, but tl;dr:

  • .microrc.yaml is the main configuration file.
  • You can override any config value with an environment variable. The key hosts.0.url would be set as MICRO_HOSTS__0__URL
  • You can use other file formats, like JSON or TOML.

updating

You should take a full database backup before updating, but you won't, will you? The database will be automatically migrated on startup.

  1. docker compose pull micro
  2. docker compose up -d micro

todo

  • Ratelimiting
  • Admin UI
  • Deletion URLs for pastes/links
  • Password recovery via emails
  • SQLite support
  • Private email aliases like firefox relay (might be difficult/expensive)

support

sylo.digital