Installation of imgproxy on Fedora CoreOS Latest

imgproxy is an open-source image resizing server that allows you to resize images in real-time. This tutorial will guide you step by step on how to install imgproxy on Fedora CoreOS Latest.

Prerequisites

Step 1 - Install Docker

The first step is to install Docker on the server. Docker is used to run imgproxy as a container. To install Docker, run the following command:

sudo dnf -y install docker

Step 2 - Start Docker

Next, start Docker and enable it to run at boot:

sudo systemctl start docker
sudo systemctl enable docker

Step 3 - Create imgproxy Configuration File

Create a configuration file for imgproxy. The configuration file defines the source of the images and the allowed transformations.

Create the configuration file as /etc/imgproxy.conf and add the following contents:

# imgproxy.conf

listener: ":8080"

source: "https://example.com"

cache:
  type: "fs"
  path: "/var/imgproxy/cache"

watermark:
  url: "https://imgproxy.net/static/watermark.png"
  opacity: 0.5

presets:
  "thumbnail":
    width: 200
    height: 200
    gravity: "noea"
    enlarge: true

security:
  allow_origin: "*"
  allow_credentials: true

You can edit the configuration to suit your specific needs.

Step 4 - Run imgproxy Container

Finally, we can run the imgproxy container using the configuration file. Run the following command:

sudo docker run --restart=always --name=imgproxy -p 8080:8080 -v /etc/imgproxy.conf:/opt/imgproxy/conf/imgproxy.conf sorz/imgproxy

The sudo docker run command runs the imgproxy container with the following options:

Step 5 - Test imgproxy

imgproxy should now be running on the server. To test it, open your web browser and go to http://your-server-ip:8080 or http://your-domain-name:8080.

The imgproxy server should return a JSON response that tells you that the server is running. You can now use imgproxy to resize your images on the fly.

Congratulations, you've successfully installed imgproxy on Fedora CoreOS Latest!

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!