Thumbor is an open-source image manipulation tool that lets you crop, resize and filter images on the fly. It supports many image formats and can be used with various programming languages.
Here's a step-by-step guide to installing Thumbor on NixOS Latest:
If you haven't already, you need to install NixOS Latest on your machine. Follow the installation guide on https://nixos.org/manual/nixos/stable/index.html.
Configure Nixpkgs to install Thumbor. Create a new configuration.nix
file in /etc/nixos/
and add the following lines:
{ pkgs, ... }: {
environment.systemPackages = with pkgs; [
thumbor
];
}
Save and exit the file.
Run the following command to install Thumbor:
$ nixos-rebuild switch
This will install Thumbor and all its dependencies.
The default configuration file for Thumbor is located at /etc/thumbor.conf
. You can customize this file to suit your needs. For example:
ALLOWED_SOURCES = [
"source.com"
]
MAX_WIDTH = 1000
MAX_HEIGHT = 1000
QUALITY = 85
This configuration allows only image sources from source.com
, sets a maximum width and height of 1000 pixels, and sets the image quality to 85%.
To start Thumbor, run the following command:
$ sudo systemctl enable thumbor && sudo systemctl start thumbor
This will start the Thumbor service and enable it to start automatically on boot.
That's it! You have successfully installed and configured Thumbor on NixOS Latest. You can now start serving images with Thumbor.
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!