The following text will describe a configuration procedure of LEMP server on Debian 9 Stretch Linux. The LEMP stack described by the below guide will consist of:
  • Debian 9 Stretch Linux
  • Nginx Web server
  • MariaDB or MySQL relational database
  • PHP 7 scripting language
Please be aware that our main objective is to configure bare bones LEMP stack on Debian 9 Stretch Linux. From this reason, no security hardening or performance fine-tuning recommendations are included in the article.

Once you have your bare bones, LEMP stack configured, consider a further hardening of your server based on the target deployment environment.



The upgrade from Raspbian Jessie to Raspbian 9 Stretch is a relatively simple procedure. However, exercise caution, as there is always a chance to break the entire system. The fewer installed 3rd-party packages and services, the more likely you are able successfully to upgrade your Raspbian Linux system. apt-get update


  • Remove unnecessary or obsolete packages
  • Make a data and configuration backup
  • Perform an upgrade directly using console
  • Installed 3rd-party software on Raspbian Stretch 9


So, you've got an AMD GPU, and you want to use it on Debian Stretch. Well, you're actually in luck.

Installing the open source AMD drivers on Debian Stretch may just be the easiest and simplest install process in the history of Linux graphics drivers.

Anyone who tried to install the open source AMDGPU drivers when they first launched alongside AMD's Polaris cards will tell you that the process is long and painful, and they were right.

Now, all of the packages required have entered the mainstream, and most are actually installed by default with your Debian Stretch installation.


Steam is easily the most popular PC gaming client available today. Installing it on Debian Stretch is very easy, especially considering Debian is the basis for Valve's SteamOS. Steam is available in Stretch's repositories, but there are a couple of steps that you need to take in order to ensure that it works right.

Before you do anything, make sure that you have your graphics drivers installed and up-to-date. It is also important that you have 32-bit support enabled. The Steam client for Linux only supports 32-bit, so it won't work at all if you don't.

Enable The Repos

Steam is proprietary, and the games it manages are too. As a result, you need to enable Debian's non-free repository. To do so, open up /etc/apt/sources.list as root using your text editor of choice. At the end of the lines for the official Debian repositories add contrib non-free after main.


NVIDIA graphics cards have long been the favorite for Linux gamers.

Their proprietary drivers have been very well supported for the last few years, and they continue to be.

The open source Nouveau drivers have been far less reliable, mostly due to NVIDIA's refusal to work with the open source community.

Either way, though, the drivers are available to install on Debian Stretch.

To install Nvidia driver on other Linux distributions, follow our Nvidia Linux Driver guide.

Open Source

For the most part, when you install Debian Stretch, the Nouveau drivers will also be installed.

However, one exception here is the firmware blobs needed for the drivers to reach their full potential.

Before you continue, you should make sure that your graphics card is supported by Nouveau.

Since the Nouveau driver has to be reverse engineered, it tends to lag behind graphics card releases.

You can check your card's support at


Popcorn Time streams movies and TV shows from torrents directly into your screen. The objective is to install Popcorn Time movie streamer on Debian 9 Stretch Linux.


For a system wide Popcorn Time privileged access to your Debian Stretch Linux system as root or via sudo command is required.




  • # - requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command
  • $ - requires given linux commands to be executed as a regular non-privileged user


Download Popcorn Time binaries

Frist, we need to download and extract Popcorn Time binaries into /opt/popcorn-time directory:
$ sudo mkdir /opt/popcorn-time
$ sudo wget -qO- | sudo tar Jx -C /opt/popcorn-time
$ sudo wget -qO- | sudo tar Jx -C /opt/popcorn-time


Django is the top Python web development framework and for good reason. It's powerful, flexible, and doesn't get in the way of developers. It also scales incredibly well, powering sites like Instagram.

Installing a Django development environment is very simple on Linux, and Debian makes it even simpler. There are two basic ways to go about it; the virtualenv way and the Debian way. The virtualenv way keeps django and all of the other Python packages installed with it contained, allowing for multiple installations with different packages and package versions. The Debian way uses apt to install and manage Django.

The Virtualenv Way

The virtualenv route is the best way to go if you need multiple independent Django installs or you want to work with different versions of Python than the ones Debian uses by default.

Installing the Packages

To stat off, you need to make sure that Python is installed and install the virtualenv package to compartmentalize your Python projects.
# apt install python python3 virtualenv


Discord is the favorite chat client among gamers. A few months back, an experimental "canary" release was launched for Linux. More recently, though, the availability of a stable client was announced.

Because of the popularity of Ubuntu and Debian systems, the client is available in a .deb package, making installing it on Debian Stretch super simple.

Get The Package

In order to get the package, you can either get the package from Discord's website or use wget. To use the wget option, cd into the directory where you want to save the package, and use wget to pull it down.


Ruby on Rails is the web framework that revolutionized web development a few years ago and powers many of the hottest start-ups today. It allows developers to rapidly develop working prototypes and even full sites without having to reinvent the wheel or worry about loads of configuration.

Ruby runs best on Unix-like systems, making Linux an excellent choice for developing for Rails. Debian Stretch comes loaded with up-to-date version of Ruby and Rails as well as providing support for the popular RVM Ruby manager.

Installing Ruby and Rails

There are two basic ways to install Ruby and Rails on Debian Stretch. The first is to use RVM(Ruby Version Manager). It allows you to change and select any current version of Ruby and compartmentalize installs.

The other option is to use the packages in the Debian repositories. They are stable and kept relatively current. They also can be used system wide.


The LAMP server is the cornerstone of Linux web hosting. In the early days of dynamic web content LAMP was what won Linux the crown in the web space, and it still is responsible for powering a very large portion of the Internet's sites.

If you're looking to set up a LAMP stack to host your website, it'd be hard to find a better option to build it on than Debian Stretch. Debian is, after all, well known for its stability, security, and massive package repositories, and Stretch is certainly no exception.


The Cloud can be a great thing. It can also be a terrifying Orwellian nightmare where some faceless corporate entity has every picture you've ever taken of your family. To prevent the latter, there's Nextcloud.

You many have heard of Owncloud. It was the primary solution for open source self hosted cloud storage for quite some time. Unfortunately, due to internal struggles, Owncloud split. Owncloud still remains, but it is currently owned by the people that caused the split. Nextcloud, on the other hand, is run by the original founder and the people who wanted to continue to work with the open source community.

Before you start the Nextcloud install process, you should follow our other guide on setting up a LAMP server on Debian Stretch. Nextcloud is a PHP application that utilizes a database and works best when paired with Apache. Having a LAMP server set up will be the best starting point.


The following Spotify setup procedure outlines installation steps as provided by Nonetheless, may you encounter some difficulties along the way of the Spotify installation on Debian Stretch, read the appendix below to resolve them.


Privileged access to your Debian Stretch system is required.




Submit your RESUME, create a JOB ALERT.
Subscribe to NEWSLETTER and receive latest news, jobs, career advice and tutorials.
Get extra help by visiting our LINUX FORUM or simply use comments below.

You may also be interested in: