Imgproxy is an open-source image resizing server that bypasses the traditional way of resizing images on the fly. This tutorial will guide you on how to install and set up imgproxy on Manjaro.
Before you proceed with the installation of imgproxy on Manjaro, make sure that you have the following requirements:
If you haven't installed Docker and Docker Compose on your system, you can follow the instructions below:
Open your terminal by pressing Ctrl + Alt + T
.
Run the following command to update the package list:
sudo pacman -Sy
Install Docker using the following command:
sudo pacman -S docker
Run the following command to install Docker Compose:
sudo pacman -S docker-compose
Create a directory for the imgproxy configuration file:
sudo mkdir /etc/imgproxy
Change the ownership of the directory to your user:
sudo chown $USER:$USER /etc/imgproxy
Navigate to the newly created directory:
cd /etc/imgproxy
Create a new file named config.toml
:
nano config.toml
Copy the following code and paste it into the config.toml
file:
addr = ":8080"
[processing_options]
enlarge_only = true
[security]
sign_key = "my-super-secret-key"
signature_size = 32
[[sources]]
url = "http://example.com/images/"
header = "Authorization: Basic dXNlcjpwYXNzd29yZA=="
Save and close the file by pressing Ctrl + X
, followed by Y
, then Enter
.
Create a new directory for the imgproxy files:
sudo mkdir -p /var/lib/imgproxy
Change the ownership of the directory to your user:
sudo chown $USER:$USER /var/lib/imgproxy
Navigate to the newly created directory:
cd /var/lib/imgproxy
Fetch the latest imgproxy image using Docker:
sudo docker pull darthsim/imgproxy
Create a new file named docker-compose.yml
:
nano docker-compose.yml
Copy the following code and paste it into the docker-compose.yml
file:
version: '3.7'
services:
app:
image: darthsim/imgproxy
environment:
- IMGPREFIX=/img
- MAINCONFIG=/etc/imgproxy/config.toml
- LOGLEVEL=debug
volumes:
- /var/lib/imgproxy:/img
- /etc/imgproxy:/etc/imgproxy
ports:
- "8080:8080"
Save and close the file by pressing Ctrl + X
, followed by Y
, then Enter
.
Start the imgproxy service using Docker Compose:
sudo docker-compose up -d
The imgproxy server should now be up and running on your Manjaro system.
In this tutorial, we have shown you how to install and configure imgproxy on Manjaro using Docker and Docker Compose. With imgproxy, you can resize images on the fly with minimal resources and minimal configuration required.
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!