A Secure VPS with DigitalOcean, Nginx, LetsEncrypt. Your VPS
3.9 (35 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
335 students enrolled
Wishlisted Wishlist

Please confirm that you want to add A Secure VPS with DigitalOcean, Nginx, LetsEncrypt. Your VPS to your Wishlist.

Add to Wishlist

A Secure VPS with DigitalOcean, Nginx, LetsEncrypt. Your VPS

Create a VPS with high security. Deploy a VPS server on DigitalOcean: Use Ubuntu, Nginx, MySQL, PHP and Letsencrypt
3.9 (35 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
335 students enrolled
Created by JuanD MeGon
Last updated 5/2017
Learn Fest Sale
Current price: $10 Original price: $70 Discount: 86% off
2 days left at this price!
30-Day Money-Back Guarantee
  • 3.5 hours on-demand video
  • 5 Articles
  • 2 Supplemental Resources
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Publish your projects to your own space in the cloud
  • Manage efficiently and safely your own VPS Server
  • Use the most recent and recommended techniques to manage your projects and services
  • Build high security projects easily and without pay extra
View Curriculum
  • Be able to pay for a VPS service, for the course and your own projects (5 USD / month)
  • Eager to learn and participate :)
  • Basic ideas about the web and online projects (cloud)

Create and configure your own virtual private server (VPS) from scratch and step-by-step.

During this course, learn to create from scratch your own VPS server, configure it properly, with security measures best suited and most appropriate mechanisms of operation.

Deploy your services and sites on a fast server like Nginx, with PHP or whatever you require, just perform and learn all that you can do with a VPS.

Displays all your projects with your own domain, with endless possibilities, because it is your VPS and your rules. Keep your own space in the cloud for all your work, projects and ideas; all in the same VPS.

Create your own VPS with DigitalOcean, installs and deploys a complete system with Linux / Ubuntu, PHP Nginx and MySQL besides obtaining TLS certificates completely free and automated through Letsencrypt.

With your VPS, you can install al what you need and you require, just learn how to do that and deploy all the projects that you want.

Why choose this course?

After completing this course, you will be able to deploy your own VPS server very quickly and easily, using very powerful tools, innovative and safe (Nginx, letsencrypt, PHP, MySQL, etc). You will have your personal and professional projects online without additional costs, because no matter how many domains, subdomains, or projects put on your VPS, the cost will remain the same because you can do all that you need in a single VPS.

Upon completion of all classes, have all your projects under a VPS server, completely safe with HTTPS / TLS connections, completely free through Letsencrypt.

Do you want more details? Here is everything that you can get from this course:

  • Create your own VPS server with DigitalOcean or the service that you prefer.
  • Have a safe and friendly fast system with Linux / Ubuntu on your VPS
  • Deploy a Nginx server in minutes on your VPS
  • Hardening your Nginx installation
  • Install a MySQL server quickly
  • Configure and easily use Git to deploy projects on your VPS
  • Get external packages and install them globally (composer and Letsencrypt as examples)
  • Create and set up your own domain and unlimited subdomains in a single VPS
  • Point your domain to your VPS server, configuring DNS entries
  • Connect to your VPS remotely, easily and safely
  • Learn to use basic commands (cd, service, cp, sudo, mv, rm, mkdir, reboot, etc.) directly on the VPS.
  • Learn to easily manage your packages with apt-get, keep updated your VPS
  • Assign permissions for folders in the right way
  • Keep easily updated your VPS system (retained packages and grub)
  • Managing user accounts for the VPS
  • Manage and assign administrative permissions (sudo / su) for users
  • Connect with third-party service from your VPS, through SSH keys
  • Easily set up a firewall and dramatically increases the security of your VPS
  • Set up your services to make them safer
  • Set headers expiration for your projects
  • Enables system Gzip on your server
  • Set up your services to reduce possible attacks DoS and DDoS
  • Avoid CSS / XSS
  • Install security certificates. HTTPS / TLS connections for your projects in your VPS
  • Use Letsencrypt and get easily free security certificates
  • Create domains and subdomains easily in your VPS
  • How easily deploy any project in your VPS
  • How to deploy complex projects in the VPS (Laravel as use case)

It does not end here! You are going to have lifetime access to all the current and new classes that are going to be added to the course, keep updated your VPS with the latest packages, versions, and systems.

Finally, but not less important, you can contact me at any moment; I will always be pleased to help with any problem or project.

Do not wait to be an expert and keep your own services and projects in the cloud with a VPS.

Join to the course now and see you in class!

Who is the target audience?
  • Who wants to manage his own space online
  • Who wants to have his own projects and services, safely and without pay extra
  • Who want full control over his projects, domains, subdomains and technologies
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 54 Lectures Collapse All 54 Lectures 03:43:13
4 Lectures 10:59

Get a brief idea about all those thing that you are going to learn during the course and the final results of every class during the course.

Preview 02:00

During the course we are going to use DigitalOcean. Although it is not mandatory and required for the course (you can use other service)

Preview 03:10

Lets talk a little about nginx. I just have to say that (again) you are completely free to choose the server that you prefer (apache, nginx or other) depending of your requiriments. Basically during this course, we are going to use Nginx, because is much more effective managing the requests (multiple requests).

Nginx create a new thread for every user/client request, while apache works in a less effective way on this aspect.

Preview 02:55

Letsencrypt is a service which allow you to create your own certificates completely free and in fact install it into the server automatically.

Letsencrypt is an open source project, so you can found very nice projects working around this adding or improving some features.

Preview 02:54

Lets check if the concepts were clear

Verifying The Learning Process :)
2 questions
Starting With The VPS
5 Lectures 16:04

During this class youa are going to create the VPS (maybe your first VPS) for your projects and for the course using DigitalOcean.

You are going to be allowed to create a VPS with a LEMP stack, pre-installed. It means that you can obtain a VPS with those tools installes, automatically:

  • Ubuntu
  • Nginx
  • MySQL
  • PHP
Creating a Pre-Installed VPS

Windows is a little more "difficult" to stablish a connection to your VPS, because you need an external tool (we are going to use Putty). During this class you are going to learn how to donwload and use Putty to stablish a connection with your VPS.

How to Stablish a Connection with Your VPS From Windows

Through the SSH command that is natively supported on OSX and Linux, you can easily stablish a connection with your VPS from your OSX or Linux system.

Learn how the command SSH works and how to use it very very easy.

How to Stablish a Connection with Your VPS From OSX/Linux

You can obtain your own domain in the service that you prefeer, the most important thing is that you need to configure your domain to redirect the requests to the namervers of your VPS provider.

In this case we are going to recirect the requests to supersecuredomain to the nameservers of digitalocean.

Your Own Domain and How to Configure It

It is necessary to add th domain that we created to the DigitalOcean configuration. In this way, DigitalOcean is going to recirect all the requests to our domain to the VPS.

Additionally, we can create and configure all the subdomains that we prefeer very easy.

Configuring The Domain From The DigitalOcean Side

Lets check if the concepts were clear

Verifying The Learning Process :)
2 questions
Learning and Using Some Important Commands
9 Lectures 38:46

There exists tons of different commands and of course you could require specific information about one new (or inclusive one that you already know).

Ubuntu, has a very helpful command that provide you information about another commands. This command is called "man". Lets to learn about it.

Preview 03:03

During this class you are going to learn about the cd (change directory) command. How to use it and some specific "tricks" for this command.

Browsing Through Routes

During this class you are going to learn about the command "ls".

This command is useful to show the contents of the current location or a specified location.

Listing the Contents of a Specific Location

During this class you are going to learn how to create, delete, move and copy files. All those tasks require of specific commands, so lets to learn everyone.

Managing Files (Create, Delete, Move and Copy)

During this class you are going to learn how to create, delete, move and copy folders. All those tasks require of specific commands, but in fact are almost the same for manage files (except to create), so lets to learn everyone.

Managing Folders (Create, Delete, Move and Copy)

During this class you are going to learn how to manage packages (install, remove, update) to install all what you need and additionally to keep your system up to date.

Managing Packages and Updating the System (apt-get)

Generally after some specific updates, is very common that the system require to be restarted, in fact the systm will show us the message "System Restart Required" whe it is needed (of course). Lets to see how to do it and, some specific considerations during this process.

How to Restart the System "System Restart Required"

In some specific cases some packages can't be upgraded automatically by the system because require som "additional" steps or just are risky and, should be upgrded by the user (preferibly).

DUring this class you are going to learn how to upgrade the retained process and how to upgrade the grub if it is required.

Upgrading "Retained" Packages and Grub

In some specific situations it is required to stop, start, restart or just reload a specific service. Using the command "service" allow you to easily manage a specific service by name.

Processes Management: The "Service" Command

Lets check if the concepts were clear

Verifying The Learning Process :)
3 questions
Installing and Configuring Some Tools
5 Lectures 12:48

If your VPS provider does not allow you to automatically install the LEMP stack (Linux, Nginx, MySQL and PHP), just follow this simple steps to get it working on your VPS.

(Optional) How to Install LEMP (Nginx, MySQL and PHP)

Git is a very useful package wich allow you to perfomr a version controlling for your projects or synchronize it with a remote repository on Github, Butbucket or similar services.

Lets to see during this class, how to easily install this package.

Installing Git for the VPS

In order to use some important tools in our VPS, it is required to install some additional modules for PHP (not included by default).

Lets to install php5-cli (it is like a PHP intepreter) and enable the mcrypt module.

Installing and Enabling Some PHP Packages and Modules

Composer is a very cool tool, to easily manage and install dependencies for PHP projects. Composer can not be installed using apt-get, so we are going to use an alternative way to do it and install it globally.

Installing Composer to Manage Dependencies

The main idea of this section is mainly to install some required components, but additionally is to practice how to install (in different ways) a required package.

After this you possibly are capable to install the package that you require successfully. Of course of you want some help for a specific package, just let me know that.

You Can Install The Package That You Require!
Setting an Initial Security Level
8 Lectures 34:29

The SSH keys are very useful to validate connections between two parts. During this class you are going to learn, how to create SSH keys (public and private) to be used to stablish secure and valid connections.

(Optional) Creating SSH Keys for Remote Connections

During a previous class we created an SSH keys. Learn how to configure and use those keys to stablish connections between the VPS and third-party services (github as example). 

(Optional) Using the SSH Keys to Stablish Connections

During this class you are going to learn how to create and remove user accounts. You are going to create your personal user account to avoit use the root user.

User Accounts Management. Create and Delete User Accounts

It is very common that a specific user (may be many of them) require to perform some "advanced" tasks and, those tasks require advanced permissions. To solve this yo do not require to use the root user always, you can provide sudo permissions to a specific user and grant advanced capabilities.

Giving Admin Permissions (sudo) to a Specific User

There exists different ways to assign permissions to folders and files, but generally for web platforms it is a good practice to assign the permissions only for the server user.

During this class you are going to see how to assign permissions to a folder in the right way.

Assigning Permissions in The Right Way

UFW (Uncomplicated FireWall) is a very useful firewall that comes installed by default with Ubuntu, but is disabled.

UFW is a very simple way to manage IPTables and control the inbound and outbound traffic.

During this class you are going to learn, how to configure and enable UFW in your system in order to disable all the inbound connections, excepting the web services connections (HTTP, HTTPS, SSH, etc), and enable the outbound connections.

Installing and Configuring UFW to Improve the Security

After install the MySQL server, it is always a good recommendation (it is basically required), execute the secure_installation, in order to remove some insecure configurations and user accounts from the default installation of MySQL.

It is, in fact, very simple to perform and can save you.

Ensuring the MySQL Server

During this class, you are going to see, how to easily remove the "dailymessage" and in the way practice and perform a system update.

For the new DigitalOcean droplets, is included a "daily message" to remember to you, to execute the secure installation of MySQL (like in the previous class) and spcifying the password for the root user of the MySQL server.

We already perform all those suggested steps, so we can remove the message.

Removing the "Daily Message" and Updating the System (Again)
Initial Configuration of Nginx
5 Lectures 27:29

During the class you are going to see a little overview for Nginx, the structure the location and the main files for the configuration.

Where is Nginx and the Configuration Files

During this class you are going to see where are located the files to configure different sites inside the single VPS, how to create different domains and or subdomains and configure every one independently with different root, names and folders.

Creating Domains and Subdomains (Part I)

During this class you are going to finish the creation and configuration process for the subdomains of your VPS.

Creating Domains and Subdomains (Part II)

During this class, you are goingo to see, how much easy is to configure the Gzip module on the Nginx server.

The Gzip module can be easily enabled and configured (in fact it is already enabled). This module is very useful to compress the responses from the Nginz server, and reduce the bandwidth usage. It is specially useful when the server must return responses with big cuantity of data.

Enabling and Configuring the Gzip Module

It is a very good idea to stablish the expiration headers, for the static content. In this way, the browser and some clients, are not going to request for every one of those every time. After the firs time those files are going to be stored in the client side to the date of expiration.

Stablishing the Expiration Headers
Hardening Nginx (Advanced Security Configurations)
4 Lectures 21:05

During this class you are going to see, how to solve a little problem with the default configuration of Nginx.

By default Nginx include the server version and the operating system in all the responses, with a header called server. The purpouse of this class is disable this behaviour to avoid this.

Solving a Privacy Problem With Nginx

Similarly, as Nginx. When we execute PHP code, the PHP service, automatically include, a header in every response, specifying the PHP version and the opearting system version as well.

During this class you are going to see the right way to disallow this for a nginx server.

Hiding Details About PHP in the Responses

The Cross Site Scripting (XSS) attacks, are basically a way as a possible attacker can use a real/valid user information to perform operations in our services, without permission.

During this class you are going to see, how to prevent this kind of attacks with a simple configuration of the nginx server.

Avoiding XSS Attacks on Nginx

In the current days, the DoS and specially the DDoS atacks, can't be prevented and solved. We can only mitigate the effects of those attacks with a good configuration and in specific cases (big projects) a good infrastructure.

Lets to learn how to configure your Nginx server to mitigate a possible DoS and DDoS attack.

Mitigating DoS and DDoS Attacks

Lets check if the concepts were clear

Verifying The Learning Process :)
2 questions
Deploy a Complete Project on You VPS (Laravel)
6 Lectures 17:33

You already have installed git and, it means that you are able to easily obtain the code for a repository from Github, Bitbucket or similar.

During this class you are going to obtain the structure of a Laravel project, stored in a public Github repository using Git.

Obtaining the Laravel Project Structure Using Git and Github

You already have access to composer in your VPS. Lets to use this incredible tool, to autimatically obtain all the dependencies of the Laravel project in order to use it.

This is like install the project into your VPS.

Installing All the Dependencies of the Project With Composer

Lets to use the MySQL server to easily create a database for our project and on the way configure the environment and specify the user and password to stablish the database connection.

Creating the Database and Configuring the Environment

A very cool thing to perform, is to automatically create the database structure just runing single commands.

During this class you are going to see how to easily create the database structure using the migrations of the project.

Executing the Migrations to Build the Database Structure

Laravel as many other web frameworks and CMS, require permissions to write over some specific locations.

In the case of Laravel, it requires to write over the bootstrap/cache and storage/ folders.

During this class we are going to provide permissions over those folders to the www-data user, using the chown command.

Configuring the Domain and the Folder Permissions

It is time to test how it working the project on the VPS and fix some details at the end (a folder permissions).

Lets to play a little with this and see how much easy is to deploy advanced projects in your VPS.

Testing and Fixing the Project
Setting HTTPS/TLS Websites With LetsEncrypt
4 Lectures 23:20

Lets to use Letsencrypt directly from a Github repository (a third party), and obtain a much more light and easy to use client.

Obtaining and Installing LetsEncrypt

During this class you are going to see how much easy is to obtain a security certificate with letsencrypt and completely free for every one of your domains and sub-domains.

Obtaining Free Certificates, For Every Domain, With LetsEncrypt

The final step, is to configure every domain and sub-domain, in order to stablish an HTTPS connection with every one using the security certificates.

Installing the Certificates To Nginx

Currently our services are vulnerable to a specific attack, which can downgrade the encryption level of a connection, allowing to intercept the connection with our sites.

During this class your are going to see how we are currently vulnerable to this and how to solve that very easy, based in the code of the previous class, implementing the dhparam configuration.

Improving the Security with dhparams
Increasing the Security of The VPS
1 Lecture 05:26

Using Fail2Ban, you can block specific IP addresses when they try to get access to your VPS more than a specified number of times in a specific period of time.

In this way, you can avoid that someone obtains your passwords trying every possible combination (brute force attack).

Using Fail2Ban to Avoid Brute Force Attacks
2 More Sections
About the Instructor
JuanD MeGon
4.5 Average rating
994 Reviews
5,143 Students
12 Courses
Engineer, Web Developer & Premium Instructor

I enjoy transmitting knowledge and skills to the people through classes and contents. Then, see how they build their projects and tools using the concepts learned.

Continually work on improving my speech, looking for the best way to reach out the students with the central concepts and skills, I love easy but effective ways to transmit every single idea.

I appreciate every minute deloping, especially when I can use my skills to implement projects that can help other developers to learn or to make their job and lives easier.

I am constantly looking to work in new projects to leverage my skills and improving the lives of people with more facilities to share the experiences and findings with my students then.

I am excited to contribute to a better world teaching people new skills and, in the way, learn through the experiences and issues of them to improve our skills together.