RepositoryShellFRFrance
AN

angristan/nginx-autoinstall

Compile NGINX from source with custom modules and patches on Debian and Ubuntu

644stars
230forks
26issues
4views

nginx-autoinstall

Compile and install NGINX from source with optional features, modules and patches.

Compatibility

  • Debian 9 and later
  • Ubuntu 16.04 and later

The script might work on ARM-based architectures, but it's only being regularly tested against x86_64 with GitHub Actions.

Features

  • Latest mainline or stable version, from source
  • Optional modules and patches
  • Custom nginx.conf (default does not work)
  • Init script for systemd (not provided by default)
  • Logrotate conf (not provided by default)
  • Block Nginx installation from APT using pinning, to prevent conflicts

Optional modules/features

Cache Modules

Usage

Just download and execute the script :

wget https://raw.githubusercontent.com/angristan/nginx-autoinstall/master/nginx-autoinstall.sh
chmod +x nginx-autoinstall.sh
./nginx-autoinstall.sh

You will be able to:

  • Install NGINX
  • Update NGINX (It will install it again and overwrite current files and/or modules.)
  • Uninstall NGINX with optional cleanup
  • Self-update the script

Just follow the question!

You can check configuration examples for the custom modules.

Headless use

You can run the script without the prompts with the option HEADLESS set to y. This allows for automated install and scripting. This is what is used to test the script with GitHub Actions.

HEADLESS=y ./nginx-autoinstall.sh

To install Nginx mainline with Brotli:

HEADLESS=y \
NGINX_VER=MAINLINE \
BROTLI=y \
./nginx-autoinstall.sh

To install with Geoip:

HEADLESS=y \
GEOIP=y \
GEOIP2_ACCOUNT_ID=YOUR_ACCOUNT_ID_HERE \
GEOIP2_LICENSE_KEY=YOUR_LICENSE_KEY_HERE \
./nginx-autoinstall.sh

To uninstall Nginx and remove the logs and configuration files:

HEADLESS=y \
OPTION=2 \
RM_CONF=y \
RM_LOGS=y \
./nginx-autoinstall.sh

All the default variables are set at the beginning of the script.

LICENSE

GPL v3.0

Similar Projects

Discover other similar projects and AI models.

RepositoryShell
tokyoneon/Armor

Armor is a simple Bash script designed to create encrypted macOS payloads capable of evading antivirus scanners.

278
Aug 24, 2023
RepositoryJavaScript
digitalocean/nginxconfig.io

⚙️ NGINX config generator on steroids 💉

28.2k
Dec 14, 2024
RepositoryC
libressl/portable

LibreSSL Portable itself. This includes the build scaffold and compatibility layer that builds portable LibreSSL from the OpenBSD source code. Pull requests or patches sent to tech@openbsd.org are welcome.

1.5k
Dec 1, 2026
RepositoryGo
rest-sh/restish

Restish is a CLI for interacting with REST-ish HTTP APIs with some nice features built-in

1.4k
Sep 29, 2026
RepositoryC#
ektrah/nsec

A modern and easy-to-use cryptographic library for .NET based on libsodium

451
Apr 30, 2026
RepositoryTypeScript
nilbuild/developer-roadmap

Interactive roadmaps, guides and other educational content to help developers grow in their careers.

373.1k
Dec 1, 2026
RepositoryMarkdown
DigitalPlatDev/FreeDomain

Free domain registration and practical DNS learning resources for everyone.

209.9k
Aug 12, 2026
RepositoryC++
tensorflow/tensorflow

An Open Source Machine Learning Framework for Everyone

201.9k
Dec 1, 2026
Modelsentence-similarity
sentence-transformers/all-MiniLM-L6-v2

all-MiniLM-L6-v2 This is a sentence-transformers(https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search. Usage (Sentence-Transformers) Using t...

♥0
157.6M
Jun 1, 2026