Now we provide official OpenResty packages repos for Debian 11 Bullseye (includes both x86_64 and aarch64 architectures). Feedback is always welcome. Thanks a lot!


Note: if nginx is already installed and running, try disabling and stopping it before installing openresty like below:

sudo systemctl disable nginx
sudo systemctl stop nginx

Otherwise the installation might fail.

You can add the openresty repository to your Debian system so as to easily install our packages and receive updates in the future (via the apt-get update command).

To add the repository, just run the following commands (only need to run once for each system):

Step 1: install some prerequisites needed by adding GPG public keys (could be removed later):

sudo apt-get -y install --no-install-recommends wget gnupg ca-certificates

Step 2: import our GPG key:

wget -O - | sudo apt-key add -

Step 3: add the our official APT repository.

For x86_64 or amd64 systems:

codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`

echo "deb $codename openresty" \
    | sudo tee /etc/apt/sources.list.d/openresty.list

And for arm64 or aarch64 systems:

codename=`grep -Po 'VERSION="[0-9]+ \(\K[^)]+' /etc/os-release`

echo "deb $codename openresty" \
    | sudo tee /etc/apt/sources.list.d/openresty.list

Step 4: update the APT index:

sudo apt-get update

Then you can install a package, say, openresty, like this:

sudo apt-get -y install openresty

This package also recommends the openresty-opm and openresty-restydoc packages so the latter two will also automatically get installed by default. If that is not what you want, you can disable the automatic installation of recommended packages like this:

sudo apt-get -y install --no-install-recommends openresty

See the OpenResty Deb Packages page for more details on all available packages in this repository.


Check out Linux Packages page for more information about the official OpenResty package repository.

Feedback is always welcome. Thanks a lot!


We provide the Chinese translation for this article on We also welcome interested readers to contribute translations in other natural languages as long as the full article is translated without any omissions. We thank them in advance.

We are hiring

We always welcome talented and enthusiastic engineers to join our team at OpenResty Inc. to explore various open source software’s internals and build powerful analyzers and visualizers for real world applications built atop the open source software. If you are interested, please send your resume to . Thank you!