Image host setup script for AlmaLinux 10
Go to file
2026-05-04 15:04:35 -04:00
imagehost-setup.sh Added staging to certbot so we don't keep hammering their servers 2026-05-04 15:04:35 -04:00
LICENSE Initial commit 2026-05-04 17:53:50 +00:00
README.md Auth update 2026-05-04 14:12:52 -04:00

imagehost-setup

A single-script installer that turns a fresh AlmaLinux 10 VPS into a lightweight, secure image host — SFTP upload, Nginx serving, optional Let's Encrypt SSL, and fail2ban out of the box.

Requirements

  • A fresh AlmaLinux 10 VPS
  • Root or sudo access

Usage

Download and run the script:

curl -O https://git.castlehollow.com/rodger/imagehost-setup/raw/branch/main/imagehost-setup.sh
sudo bash imagehost-setup.sh

The script will walk you through the rest interactively.

What it sets up

  • Nginx — serves image files only (JPG, PNG, GIF, WebP, AVIF, SVG, BMP, TIFF)
  • SFTP chroot — a locked-down upload user with no shell access
  • firewalld — opens only SSH, HTTP, and HTTPS
  • fail2ban — brute-force protection on SSH and Nginx
  • Let's Encrypt SSL — optional, with HTTP fallback

License

MIT