{"id":13789206,"url":"https://github.com/jirutka/nginx-binaries","last_synced_at":"2025-04-05T20:04:15.142Z","repository":{"id":44376854,"uuid":"318009793","full_name":"jirutka/nginx-binaries","owner":"jirutka","description":"Nginx and njs binaries for Linux (x86_64, aarch64, ppc64le), macOS and Windows. Linux binaries are static so works on every Linux.","archived":false,"fork":false,"pushed_at":"2025-02-23T00:49:37.000Z","size":1131968,"stargazers_count":53,"open_issues_count":2,"forks_count":17,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-29T19:02:40.499Z","etag":null,"topics":["binaries","javascript","nginx","nginx-linux","nginx-macos","nginx-windows","njs","static-binaries"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jirutka.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null},"funding":{"github":"jirutka"}},"created_at":"2020-12-02T22:36:00.000Z","updated_at":"2025-03-27T14:32:54.000Z","dependencies_parsed_at":"2023-12-24T02:28:32.833Z","dependency_job_id":"b0cbce55-e4bc-44e0-8287-c6f3a2efa6ed","html_url":"https://github.com/jirutka/nginx-binaries","commit_stats":{"total_commits":222,"total_committers":3,"mean_commits":74.0,"dds":"0.018018018018018056","last_synced_commit":"041305a2fea4b4690de093145c79f83e971ab3f9"},"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fnginx-binaries","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fnginx-binaries/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fnginx-binaries/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jirutka%2Fnginx-binaries/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jirutka","download_url":"https://codeload.github.com/jirutka/nginx-binaries/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247393551,"owners_count":20931811,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binaries","javascript","nginx","nginx-linux","nginx-macos","nginx-windows","njs","static-binaries"],"created_at":"2024-08-03T21:01:00.019Z","updated_at":"2025-04-05T20:04:15.097Z","avatar_url":"https://github.com/jirutka.png","language":"TypeScript","funding_links":["https://github.com/sponsors/jirutka"],"categories":["Tools"],"sub_categories":["Lua Modules"],"readme":"= nginx and njs standalone binaries\n:toc: macro\n:toc-title:\n// custom\n:npm-name: nginx-binaries\n:gh-name: jirutka/{npm-name}\n:alpine-branch: 3.18\n:nginx-docs-uri: http://nginx.org/en/docs/\n\nifdef::env-github[]\nimage:https://github.com/{gh-name}/workflows/binaries/badge.svg[Binaries Workflow, link=https://github.com/{gh-name}/actions?query=workflow%3A%22binaries%22]\nendif::env-github[]\n\nThis project provides standalone nginx and njs (NGINX JavaScript) binaries for *any* Linux system footnote:[nginx binaries are built as standalone static executables, so they works on every Linux system regardless of used libc.] (x86_64, aarch64, ppc64le), macOS (x86_64), and Windows (x86_64).\nIt also provides a JS library for downloading these binaries (for use in integration tests).\n\nifndef::npm-readme[]\n\nYou can also download the binaries manually from https://jirutka.github.io/nginx-binaries/ or https://github.com/{gh-name}/tree/binaries[binaries] branch (see \u003c\u003cFiles Repository\u003e\u003e).\nThey are built automatically and periodically using GitHub Actions (see link:.github/workflows/binaries.yml[config]).\n\n\n== Table of Contents\n\ntoc::[]\n\n\n== JS Library\n\nifdef::env-github[]\nimage:https://github.com/{gh-name}/workflows/js/badge.svg[JS Workflow, link=https://github.com/{gh-name}/actions?query=workflow%3A%22js%22]\nimage:https://img.shields.io/npm/v/{npm-name}.svg[npm Version, link=\"https://www.npmjs.org/package/{npm-name}\"]\nimage:https://badgen.net/bundlephobia/dependency-count/{npm-name}[Dependency Count, link=\"https://bundlephobia.com/result?p={npm-name}\"]\nendif::env-github[]\n\nendif::npm-readme[]\n\n=== Installation\n\n[source, sh, subs=\"+attributes\"]\n----\n# using npm:\nnpm install --save-dev {npm-name}\n# or using yarn:\nyarn add --dev {npm-name}\n----\n\n\n=== Usage Example\n\n[source, js, subs=\"+attributes\"]\n----\nimport { NginxBinary, NjsBinary } from '{npm-name}'\n\nawait NginxBinary.versions({ version: '^1.21.5' })\n// =\u003e ['1.21.5', '1.21.6', '1.22.0']\n\nawait NginxBinary.download({ version: '1.22.x' })\n// =\u003e '[...]/node_modules/.cache/nginx-binaries/nginx-1.22.0-x86_64-linux'\n\nawait NjsBinary.versions({ version: '^0.7.0' })\n// =\u003e ['0.7.1', '0.7.2', '0.7.3', '0.7.4']\n\nawait NjsBinary.download({ version: '^0.7.0', variant: 'debug' }, '.tmp/njs')\n// =\u003e '.tmp/njs'\n----\n\n\n=== API\n\n// Pandoc conversion to Markdown doesn't handle definition lists.\nifdef::npm-readme[]\nhttps://github.com/{gh-name}#api[See on GitHub].\n\nendif::npm-readme[]\nifndef::npm-readme[]\n\n==== NginxBinary / NjsBinary\n\ncacheDir `(string)`::\nPath to the cache directory where the repository index and binaries are stored.\n+\nDefaults to `.cache/nginx-binaries/` relative to the nearest writable `node_modules` (nearest to `process.cwd()`) or `nginx-binaries/` in the system-preferred temp directory.\n\ncacheMaxAge `(number)`::\nMaximum age in minutes for the cached repository index in `cacheDir` to be considered fresh.\nIf the cached index is stale, the Downloader tries to refresh it before reading.\n+\nDefaults to `480` (8 hours).\n\nrepoUrl `(string)`::\nURL of the repository with binaries.\n+\n*Caution:* After changing `repoUrl`, you should delete old `index.json` in `cacheDir` or disable index cache by setting `cacheMaxAge` to `0`.\n+\nDefaults to `'https://jirutka.github.io/nginx-binaries'`.\n\ntimeout `(number)`::\nFetch response timeout in milliseconds.\n+\nDefaults to `10000` (10 seconds).\n\ndownload `(query: \u003c\u003cQuery\u003e\u003e, destFilePath?: string) =\u003e Promise\u003cstring\u003e`::\nDownloads a binary specified by `query` and stores it in the `cacheDir` or in `destFilePath`, if provided.\nReturns path to the file.\n+\nIf the file already exists and the checksums match, it just returns its path.\n+\nIf multiple versions satisfies the version range, the one with highest version number is selected.\n\nsearch `(query: \u003c\u003cQuery\u003e\u003e) =\u003e Promise\u003c\u003c\u003cIndexEntry\u003e\u003e[]\u003e`::\nReturns metadata of available binaries that match the query.\n\nvariants `(query?: \u003c\u003cQuery\u003e\u003e) =\u003e Promise\u003cstring[]\u003e`::\nReturns all the available variants matching the query.\n\nversions `(query?: \u003c\u003cQuery\u003e\u003e) =\u003e Promise\u003cstring[]\u003e`::\nReturns all the available versions matching the query.\n\n\n==== Query\n\nversion `(?string)`::\nSpecify required version as exact version number or a https://github.com/npm/node-semver#ranges[SemVer version range].\n+\nExample: `'1.8.0'`, `'1.8.x'`, `'^1.8.0'`\n\nvariant `(?string)`::\nSpecify build variant of the binary (e.g. `debug`).\nDefaults to an empty string, i.e. the default variant.\n\nos `(?string)`::\nSpecify target OS.\nDefaults to the host OS.\n\narch `(?string)`::\nSpecify target CPU architecture.\nDefaults to the host architecture.\n\n\n==== IndexEntry\n\nname `(string)`::\nName of the program: `'nginx'` or `'njs'`.\n\nversion `(string)`::\nVersion of the program.\n\nvariant `(string)`::\nThe build variant of the binary (e.g. `debug`).\nAn empty string indicates the default variant.\n\nos `(string)`::\nOS platform for which this binary was built: `'darwin'` (macOS), `'linux'` (Linux), or `'win32'` (Windows).\n\narch `(string)`::\nCPU architecture for which this binary was built: `'armv7'`, `'aarch64'`, `'ppc64le'`, or `'x86_64'`.\n\nfilename `(string)`::\nFull name of the binary file.\n\ndate `(string)`::\nDate and time (ISO-8601) at which the binary was built.\n\nsize `(number)`::\nSize of the binary file in bytes.\n\nchecksum `(string)`::\nChecksum of the binary file in format `\u003calgorithm\u003e:\u003chash\u003e`.\n+\nExample: `'sha1:7336b675b26bd67fdda3db18c66fa7f64691e280'`\n\nbundledLibs `(Object.\u003cstring, string\u003e)`::\nA record of all libraries (or modules) statically linked into the binary and the version number.\n+\n.Example:\n[source, js]\n----\n{\n  'openssl': '1.1.1i-r0',\n  'echo-nginx-module': '0.62',\n}\n----\n\n\n=== Logging\n\n. If https://github.com/Download/anylogger[anylogger] is available and initialized (any adapter has been registered), then:\n** all log messages will go through `anylogger` logger `nginx-binaries`.\n\n. If https://www.npmjs.com/package/debug[debug] is available, then:\n** _debug_ messages will be logged via `debug` logger `nginx-binaries`, others (error, warn, info) via `console`.\n\n. otherwise:\n** _error_, _warn_, and _info_ messages will be logged via `console`, _debug_ messages will be discarded.\n\nIf none of these options is suitable, you can provide your own logger using `setLogger(object)`:\n\n[source, js, subs=\"+attributes\"]\n----\nimport { setLogger } from '{npm-name}'\n\nsetLogger({\n  warn: console.warn,\n  error: console.error,\n  // undefined logging functions will be replaced with no-op\n})\n----\n\n\n== Files Repository\n\nThe built binaries are stored in https://github.com/{gh-name}/tree/binaries[binaries] branch of this git repository which is published on https://jirutka.github.io/nginx-binaries/.\n\nThe repository contains the following types of files:\n\n* `index.{csv,json,html}` -- Repository index in CSV, JSON and HTML formats.\n* `\u003cname\u003e-\u003cversion\u003e[-\u003cvariant\u003e]-\u003carch\u003e-\u003cos\u003e[.exe]` -- Program binary for particular architecture and OS.\n* `\u003cname\u003e-\u003cversion\u003e[-\u003cvariant\u003e]-\u003carch\u003e-\u003cos\u003e[.exe].sha1` -- SHA-1 checksum of the binary file.\n* `\u003cname\u003e-\u003cversion\u003e[-\u003cvariant\u003e]-\u003carch\u003e-\u003cos\u003e[.exe].sources` -- List of all source tarballs and system-provided static libraries from which the binary was built.\n\nSee \u003c\u003cIndexEntry\u003e\u003e for description of `\u003cname\u003e`, `\u003cversion\u003e` etc.\nSuffix `.exe` is used for Windows binaries only.\n\n\n== Binaries\n\n[cols=5]\n|===\n| Program | Version Range(s) | Variant(s) | OS | Architecture(s)\n\n.3+| nginx\n.3+| 1.18.x (EOL) +\n1.19.x (EOL) footnote:[The first available nginx version in branch 1.19.x is 1.19.5.] +\n1.20.x (EOL) +\n1.21.x (EOL) +\n1.22.x (EOL) +\n1.23.x (EOL) +\n1.24.x (old stable) +\n1.25.x (mainline) +\n1.26.x (stable)\n\n.3+| _default_\n| Linux\n| x86_64 +\naarch64 +\nppc64le +\npass:[\u003cs\u003earmv7\u003c/s\u003e] footnote:armv7[As of January 2023, binaries for armv7 are no longer built -- gcc runs out of memory when building njs using the QEMU emulator. If you want support for armv7, let me know in issues.]\n\n| macOS\n| x86_64\n\n| Windows\n| x86_64 (x64)\n\n.3+| njs\n.2+| 0.x.x footnote:[The first available njs version is 0.5.0.]\n.2+| _default_ +\ndebug\n| Linux\n| x86_64 +\naarch64 +\nppc64le +\npass:[\u003cs\u003earmv7\u003c/s\u003e] footnote:armv7[]\n\n| macOS\n| x86_64\n|===\n\n\n=== nginx\n\n*Linux* binary is statically linked with https://www.musl-libc.org[musl libc], jansson, openssl (3.x), pcre and zlib from https://alpinelinux.org[Alpine Linux] {alpine-branch}.\nIt’s compiled with debug mode, threads and aio.\n\n*macOS* binary is statically linked with jansson, openssl@3, pcre and zlib from https://brew.sh[Homebrew].\nIt’s compiled with debug mode, threads and aio.\n\n*Windows* binary is statically linked with latest openssl 3.3.x, pcre 8.x and zlib 1.3.x built from sources.\nIt’s compiled with debug mode and patches from https://github.com/myfreeer/nginx-build-msys2[nginx-build-msys2] made by https://github.com/myfreeer[@myfreeer].\n\n\n==== Included Modules\n\n*Built-In Modules:*\n\n* {nginx-docs-uri}/http/ngx_http_access_module.html[ngx_http_access_module]\n* {nginx-docs-uri}/http/ngx_http_auth_basic_module.html[ngx_http_auth_basic_module]\n* {nginx-docs-uri}/http/ngx_http_auth_request_module.html[ngx_http_auth_request_module]\n* {nginx-docs-uri}/http/ngx_http_autoindex_module.html[ngx_http_autoindex_module]\n* {nginx-docs-uri}/http/ngx_http_browser_module.html[ngx_http_browser_module]\n* {nginx-docs-uri}/http/ngx_http_charset_module.html[ngx_http_charset_module]\n* {nginx-docs-uri}/http/ngx_http_empty_gif_module.html[ngx_http_empty_gif_module]\n* {nginx-docs-uri}/http/ngx_http_gzip_module.html[ngx_http_gzip_module]\n* {nginx-docs-uri}/http/ngx_http_limit_conn_module.html[ngx_http_limit_conn_module]\n* {nginx-docs-uri}/http/ngx_http_limit_req_module.html[ngx_http_limit_req_module]\n* {nginx-docs-uri}/http/ngx_http_map_module.html[ngx_http_map_module]\n* {nginx-docs-uri}/http/ngx_http_proxy_module.html[ngx_http_proxy_module]\n* {nginx-docs-uri}/http/ngx_http_realip_module.html[ngx_http_realip_module]\n* {nginx-docs-uri}/http/ngx_http_referer_module.html[ngx_http_referer_module]\n* {nginx-docs-uri}/http/ngx_http_rewrite_module.html[ngx_http_rewrite_module]\n* {nginx-docs-uri}/http/ngx_http_secure_link_module.html[ngx_http_secure_link_module]\n* {nginx-docs-uri}/http/ngx_http_ssl_module.html[ngx_http_ssl_module]\n* {nginx-docs-uri}/http/ngx_http_upstream_hash_module.html[ngx_http_upstream_hash_module]\n* {nginx-docs-uri}/http/ngx_http_upstream_ip_hash_module.html[ngx_http_upstream_ip_hash_module]\n* {nginx-docs-uri}/http/ngx_http_upstream_keepalive_module.html[ngx_http_upstream_keepalive_module]\n* {nginx-docs-uri}/http/ngx_http_upstream_least_conn_module.html[ngx_http_upstream_least_conn_module]\n* {nginx-docs-uri}/http/ngx_http_upstream_random_module.html[ngx_http_upstream_random_module]\n* {nginx-docs-uri}/http/ngx_http_upstream_zone_module.html[ngx_http_upstream_zone_module]\n* {nginx-docs-uri}/http/ngx_http_userid_module.html[ngx_http_userid_module]\n* {nginx-docs-uri}/http/ngx_http_v2_module.html[ngx_http_v2_module]\n\n*Extra Modules:* footnote:[Modules that are provided by NGINX but released separately.]\n\n* {nginx-docs-uri}/http/ngx_http_js_module.html[ngx_http_js_module] (except Windows footnote:[njs is not supported on Windows, see https://github.com/nginx/njs/issues/320[nginx/njs#320]])\n\nSince nginx 1.22.0, the stable and mainline versions of nginx include the latest version of njs available at the time of building.\nThe _old stable_ versions of nginx include the latest minor (i.e. x.**Y**.z) version of njs released prior to the release of a new stable nginx (and the latest patch version available at the time of building).\nThat is, it’s the same as in NGINX’s own packages.\n\n*3rd Party Modules:*\n\n* https://github.com/openresty/echo-nginx-module[echo-nginx-module]\n* https://github.com/openresty/headers-more-nginx-module[headers-more-nginx-module]\n* https://github.com/vision5/ngx_devel_kit[ngx_devel_kit]\n* https://github.com/openresty/set-misc-nginx-module[set-misc-nginx-module]\n* https://github.com/kjdev/nginx-auth-jwt[kjdev/nginx-auth-jwt] (since 1.22.1, 1.23.4, and 1.24.0; except Windows binaries)\n* https://github.com/kjdev/nginx-keyval[nginx-keyval] (since 1.22.1, 1.23.4, and 1.24.0; except Windows binaries)\n\nnginx binaries include the latest version of the third-party modules available at the time of building.\n\n\n=== njs\n\n*Linux* binary is statically linked with https://www.musl-libc.org[musl libc], libedit, openssl (3.x), ncurses, pcre and zlib from https://alpinelinux.org[Alpine Linux] {alpine-branch}.\n\n*macOS* binary is statically linked with libedit, openssl@1.1, ncurses, pcre and zlib from https://brew.sh[Homebrew].\n\nendif::npm-readme[]\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirutka%2Fnginx-binaries","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjirutka%2Fnginx-binaries","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjirutka%2Fnginx-binaries/lists"}