I need to install Nginx on my server. I see that it is possible to install it with :

sudo apt install nginx

or with :

sudo apt-add-repository ppa:hda-me/nginx-stable
sudo apt update
sudo apt install nginx

What is the difference for installing Nginx with the official repository and Ubuntu repository?

Which method is recommended

  • 1
    Most likely you will find no difference other than the PPA getting new versions faster. May 3 '19 at 23:04
  • @tropcool; PPA's are 3rd party, so you have to trust the source, and monitor if the owner/team is still supporting it, or it just ended support at any time. The Ubuntu repositories are guaranteed to be supported for the length of time mentioned at release (ie. 5 years for 'main' for LTS for security updates; even if not any new versions, shorter if from other repos or non-lts). PPA's offer no guarantee so you need to do the validation yourself. (this advice is general, and applies to any PPA or 3rd party source, not your specific source)
    – guiverc
    May 4 '19 at 0:03

There will be no significant difference, however:

Installing packages from Ubuntu repository in some cases is safer and solid, because you stick with something that was well tested for your distribution, before being distributed. It will be also properly handled during dist-upgrades.

On the other hand, if nginx itself has its own repository, suited for your distribution, it's worth going with it, as you'll get the most up-to-date version of the software.

Which method is recommended

It's always recommended to use official Ubuntu repositories when it's possible. Any custom repository may cause problems or incompatibilities at some point. However in this case I think it's fairly safe to stick with PPA. I believie folks behind nginx know what they're doing :)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.