Chevereto

Are you looking for an image hosting platform that is easy to use, highly customizable, and packed with powerful features?

Look no further than Chevereto. Chevereto is an open-source image hosting platform that allows you to store, manage, and share your photos and images with ease.

With its user-friendly interface and extensive customization options, Chevereto is a great choice for anyone who wants to create a customized and professional-looking image hosting website.

In this blog post, we’ll explore what Chevereto is, how it works with Docker, and why you might want to consider using it for your own image hosting needs.

Installing Chevereto with Docker

Pre-Requisites!! Just Get Docker 馃悑

Important step and quite recommended for any SelfHosting Project - Get Docker Installed

It will be one command, this one, if you are in Linux:

apt-get update && sudo apt-get upgrade && curl -fsSL https://get.docker.com -o get-docker.sh
sh get-docker.sh && docker version

You will find this to run purely chevereto, but this instance has to be combined with a Database service as we will see next.

docker run -d \
  --name chevereto \
  -p 88:80 \
  -e CHEVERETO_DB_HOST=database \
  -e CHEVERETO_DB_USER=chevereto \
  -e CHEVERETO_DB_PASS=user_database_password \
  -e CHEVERETO_DB_PORT=3306 \
  -e CHEVERETO_DB_NAME=chevereto \
  -e CHEVERETO_ASSET_STORAGE_TYPE=local \
  -e CHEVERETO_ASSET_STORAGE_URL=/images/_assets/ \
  -e CHEVERETO_ASSET_STORAGE_BUCKET=/var/www/html/images/_assets/ \
  -v /var/www/html/images/ \
  ghcr.io/chevereto/chevereto:latest

And the yml version will be:

version: "3.7"

services:
  chevereto:
    image: ghcr.io/chevereto/chevereto:latest
    container_name: chevereto
    init: true
    restart: unless-stopped
    volumes:
      - chevereto:/var/www/html/images
    networks:
      - internal
    ports:
      - 88:80 #the port that you will use to access the UI locally  
    environment:
      CHEVERETO_DB_HOST: mariadb
      CHEVERETO_DB_USER: ${DB_USER}
      CHEVERETO_DB_PASS: ${DB_PASSWORD}
      CHEVERETO_DB_PORT: 3306
      CHEVERETO_DB_NAME: ${DB_NAME}
      CHEVERETO_ASSET_STORAGE_TYPE: local
      CHEVERETO_ASSET_STORAGE_URL: /images/_assets
      CHEVERETO_ASSET_STORAGE_BUCKET: /var/www/html/images/_assets

  mariadb:
    image: mariadb
    container_name: chevereto_mariadb
    restart: always
    init: true
    environment:
      MYSQL_DATABASE: ${DB_NAME}
      MYSQL_USER: ${DB_USER}
      MYSQL_PASSWORD: ${DB_PASSWORD}
      MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
    volumes:
      - chevereto_mariadb:/var/lib/mysql
    networks:
      - internal


volumes:
  chevereto: {}
  chevereto_mariadb: {}

networks:
  internal: {}

In the previous config file, we were using some parameters, docker-compose will be looking for a .env file in the same folder with this structure:

DB_USER=chevereto_user
DB_PASSWORD=chevereto_password
DB_NAME=chevereto
DB_ROOT_PASSWORD=chevereto_root_password
FQDN=subdomain.your_domain.com

For security reasons, make sure to customize that .env file with proper passwords.

Ready? Let’s deploy it then with docker-compose:

docker compose up -d

After the deployment is completed, access the UI at http://localhost:88, as specified by the configuration file. Then, create your user and password to start using your Chevereto instance with docker.

Exposing Chevereto to the Internet

This works perfectly to try at home, but if you want to expose this service to the internet, you will need some proxy manager:

Chevereto and NGinX

Using an existing NGinX Instance

Do you have already deployed an NGinX Proxy Manager instance? In that case, simply add the network name in the docker-compose file like this:

version: "3.7"

services:
  chevereto:
    image: ghcr.io/chevereto/chevereto:latest
    container_name: chevereto
    init: true
    restart: unless-stopped
    volumes:
      - chevereto:/var/www/html/images
    networks:
      - internal
      - nginx_default #this will allow communication between chevereto service and the existing nginx service
    ports:
      - 88:80 #the port that you will use to access the UI locally  
    environment:
      CHEVERETO_DB_HOST: mariadb
      CHEVERETO_DB_USER: ${DB_USER}
      CHEVERETO_DB_PASS: ${DB_PASSWORD}
      CHEVERETO_DB_PORT: 3306
      CHEVERETO_DB_NAME: ${DB_NAME}
      CHEVERETO_ASSET_STORAGE_TYPE: local
      CHEVERETO_ASSET_STORAGE_URL: /images/_assets
      CHEVERETO_ASSET_STORAGE_BUCKET: /var/www/html/images/_assets

  mariadb:
    image: mariadb
    container_name: chevereto_mariadb
    restart: always
    init: true
    environment:
      MYSQL_DATABASE: ${DB_NAME}
      MYSQL_USER: ${DB_USER}
      MYSQL_PASSWORD: ${DB_PASSWORD}
      MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
    volumes:
      - chevereto_mariadb:/var/lib/mysql
    networks:
      - internal


volumes:
  chevereto: {}
  chevereto_mariadb: {}

networks:
  internal: {}
  nginx_default:
    external: true # add this if the network (for nginx proxy manager) is already existing!  

FAQ

How to Deploy Nginx Proxy Manager

If you are interested in deploying a separated NGINX instance with Docker, I already created a guide for that here.