Chevereto

Chevereto is a powerful image and video hosting script that allows you to create a beautiful media hosting website with all the features you need. It's like a self-hosted IMGUR and useful for creating thumbnails for blogs like this if you want to keep things simple and "in house" I need to make proper notes on how I got this working: The install instructions are not great on the site and your images repository/volume must be set to www-data user and group or the install will choke unless the directory is writable. Probably the most fun headscratcher to get working.

Chevereto

The recipe for HomeLabOS was something like this

---
version: '3'

networks:
  traefik_network:
    external:
      name: homelabos_traefik
  chevereto:

services:
  database:
    image: mariadb:jammy
    networks:
      - chevereto
    volumes:
      - /var/homelabos/chevereto/database:/var/lib/mysql
    restart: always
    healthcheck:
      test: ["CMD", "healthcheck.sh", "--su-mysql", "--connect"]
      interval: 10s
      timeout: 5s
      retries: 3
    environment:
      MYSQL_ROOT_PASSWORD: <your_root_password>
      MYSQL_DATABASE: chevereto
      MYSQL_USER: chevereto
      MYSQL_PASSWORD: <your_password>
    restart: always
  chevereto:
    # Make sure to use the latest release from https://chevereto.org/latest-release
    image: ghcr.io/chevereto/chevereto:latest
    networks:
      - chevreto

    volumes:
      - /var/homelabos/chevereto/storage:/var/www/html/images/
      # set this to www-data for user and group
    restart: always
    depends_on:
      database:
        condition: service_healthy
    expose:
      - 80
    environment:
      CHEVERETO_DB_HOST: database
      CHEVERETO_DB_USER: chevereto
      CHEVERETO_DB_PASS: <your_password>
      CHEVERETO_DB_PORT: 3306
      CHEVERETO_DB_NAME: chevereto
      CHEVERETO_ASSET_STORAGE_TYPE: local
      CHEVERETO_ASSET_STORAGE_URL: /images/
      CHEVERETO_ASSET_STORAGE_BUCKET: /var/www/html/images/

    networks:
      - traefik_network
      - chevereto

    labels:
      - "traefik.http.services.chevereto.loadbalancer.server.scheme=http"
      - "traefik.http.services.chevereto.loadbalancer.server.port=80"
      - "traefik.enable=true"
      - "traefik.docker.network=homelabos_traefik"
      - "traefik.http.routers.chevereto-http.service=chevereto"
      - "traefik.http.routers.chevereto-http.rule=Host(`chevereto.<yourdomain.com>`)"
      - "traefik.http.routers.chevereto-http.entrypoints=http"
      - "traefik.http.routers.chevereto-http.middlewares=redirect@file, customFrameHomelab@file"
      - "traefik.http.routers.chevereto.service=chevereto"
      - "traefik.http.routers.chevereto.rule=Host(`chevereto.<yourdomain.com>`)"
      - "traefik.http.routers.chevereto.entrypoints=https"
      - "traefik.http.routers.chevereto.middlewares=customFrameHomelab@file"
      - "traefik.http.routers.chevereto.tls=true"
      - "traefik.http.routers.chevereto.tls.certresolver=http"