Intro

I rarely need a tool to upload pictures to share, but when I do this one is pretty handy to have around. Sure, I could use any of the publicly available tools and upload my photos to some other companies servers, but why would I want to do that when I can do it myself? So, let’s check out Slink.

Key Features

  • Authentication: Users can sign up and log in to the platform.
  • User Approval: Require user approval before they can upload images.
  • Image Upload: SVGPNGJPGWEBPBMPICO or GIF images can be uploaded.
  • Share Links: Users can share links to their uploaded images and customize the image size.
  • Upload History: Provides an overview of all images uploaded by the user.
  • Storage Providers: Support for local and SMB storage providers.
  • Explore Images: Features a listing page of public images uploaded by other users.
  • Dark Mode: Includes support for both Dark and Light modes in the application.

Once you get it spun up you’ll have to create an account. You will then have to activate your account via CLI: docker exec -it slink slink user:activate --email=<user-email>

By default, all new accounts must be activated by you via CLI. This is good if you don’t want everyone and their cousin using your instance of Slink. This can be completely disabled by setting the environmental variable USER_APPROVAL_REQUIRED to false.

Now that you’re logged in you’ll see an empty page like below.

Now let’s click on the “Take me to Upload” button and upload our first image. Here we can Download, make the image public or private, change the aspect ratio, delete the image, and copy the share link.

Next, let’s upload a few more photos and make them public so we can see what the main page looks like.

That’s really all there is to it. It’s an incredibly easy to use app. The only feature that I wish it had, at the time of writing this article, is the ability to upload more than one image at a time. Other than lacking that feature it does everything I need it to do and keeps my images in my hands until I decide to share them.


Docker Run

docker run -d \
    --name slink \
    -p 3000:3000 \
    -v ./slink/var/data:/app/var/data \
    -v ./slink/images:/app/slink/images \
    -e ORIGIN=https://your-domain.com \
    anirdev/slink:latest

Docker Compose

slink:
  image: anirdev/slink:latest
  container_name: slink
  environment:
    # Your application hostname
    - ORIGIN=https://your-domain.com
    
    # Require user approval before they can upload images
    - USER_APPROVAL_REQUIRED=true
    
    # User password requirements
    - USER_PASSWORD_MIN_LENGTH=8
    - USER_PASSWORD_REQUIREMENTS=15 # bitmask of requirements 
    
    # Maximum image size allowed to be uploaded (no more than 50M)
    - IMAGE_MAX_SIZE=15M
    
    # Storage provider to use. 
    # Available options are local and smb
    - STORAGE_PROVIDER=local
  volumes:
    # Persist the database
    - ./slink/var/data:/app/var/data
    # Persist the uploaded images
    - ./slink/images:/app/slink/images
  ports:
    # Expose the application on port 3000
    - "3000:3000"

Don’t forget to change the ORIGIN to your actual domain.