Tutorial Setup Moodle On A Dedicated Server

How To Setup Moodle On A Dedicated Server

Modular Object-Oriented Dynamic Learning Environment is a well-known learning management website. While online communications have become part of people’s lives for decades, online education is one of its subsets. In 2020, Corona Virus protocols have forced students all around the world to start studying online. If you are preparing to create your own online learning site, this guide is what you need. In this article, you will learn how To Setup Moodle On A Dedicated Server. But if you have not prepared your own Dedicated Server yet, the supportive Eldernode team is waiting for you. Once you purchase your Virtual Private Server, you are ready to set up a virtual learning environment and start using the features of E-learning to stay at home and safe.

Setup Moodle On A Dedicated Server

Let’s see what is Moodle and how you can use it on your own server, please be aware that Moodle would work better on a Dedicated server and is highly recommended for using this software since it needs separated servers. When you decide to set up a website for a school, university, workplace, or even a private online course you may consider if this platform is able to be customizable or not.

Distance learning needs a strong infrastructure to compensate for the lack of face to face situation features. This open-source software is under the GPL license and a popular platform because of its satisfying features and capabilities. Moodle provides you over 1000 plugins and a variety of themes. Working with Windows, Linux, OS X, or even mobile devices (Android & iPhone) will not be an issue, because Moodle supports all of them. Moodle tries to be widely used and has reached this purpose. For desktop, Moodle is available for Windows 7 and later.

For people who are used to working with tablets, Windows 10 is required with ”windows Anniversary Update”. Also for MacOS users, the minimum macOS version supported is macOS 10.9. And finally, for Linux fans, Ubuntu 12.04, Fedora 21, and Debian 8 and later is supported in Moodle. If you prefer to receive email from Moodle, you need Sendmail for Unix/Linux or access to an SMTP mail server for Windows.

How to Setup Moodle On A Dedicated Server (step by step)

Recommended Article: How to Create a Virtual Machine in VMware ESXi 6.5

Basic Requirements Of Moodle System

While writing this article, the latest stable version of Moodle is 3.10 and the Moodle requirements could be variable due to the version of Moodle you wish to install. Based on what kind of website and the number of users you need, the required hardware will be variable.

To let this tutorial work better, please consider the below Prerequisites:

1- At least 200MB disk space for Moodle code & about 5MB for your considered content.

2-1GB memory or more

3- 2GHz dual-core processor

4-PHP 5.6.5 & MySQL 5.5.31 should have been configured.

All are set for you? Ok, here we go!

Learn Setup Moodle On A Dedicated Server

A previous step of installing software is to download installation files. Clearly, the Moodle website is the best choice to download the files and the latest version of Moodle from. In this way, you are sure about the security and also you can count on their help while facing any issue in the files. Once you downloaded it from the website, unzip/unpack it and find the created folder of Moodle which contains a number of files and folders. The folder should be place in your web server documents directory. Also, you can run the following command version:

/usr/bin/php /path/to/moodle/admin/cli/install.php

Note: Moodle program file should be Ok with your file permissions that must be checked when the installation is finished.  The CLI creates the config.php for you and will not run if you created one in the previous step.

Next, you need an empty database. The new database has a server hostname, a name, a username, and a password. Make a note of them to use later.

As you know, to store the files (content, session data, temporary data, etc), Moodle needs a directory. The probable storage of this directory should be estimate before you create it. Try to keep it optimized since it should be able for fast cashing of data. Watch to not let it be accessible directly from the web to prevent any security flaw. And finally, remember that it cannot be place in your webroot or your Moodle program files directory.

Now, it is time to run the Moodle installer. You can use the recommended method of command-line or a web-based installer (available for Windows). However, continue with this part to create the Moodle database and configure your website.

Depending on the version of your Linux/Unix, use the example commands below:

chown www-data /path/to/moodle
cd /path/to/moodle/admin/cli
sudo -u www-data /usr/bin/php install.php
chown -R root /path/to/moodle

Also if you faced any option which does not exist in the above examples, use the following command to see a complete list of options to select the defaults safely:

php install.php --help

In case you prefer to install Moodle via the web, you have chosen an easy method. You just need to check if your page would not be public during the installation. Open your browser and go to your Moodle’s main UPL to let the web installer script start automatically.

It is very easy to install Moodle via the web. Make sure that your page is not public until the installation is complete. Based on where you placed the Moodle files on the webserver, it will most likely be:


Then, you will be prompte to select a language and confirm copyright by Wizard. Click next to let it confirm paths and database settings. We asked you to take note of the database host and database names, it is time to use it. Once you click next, server and software check will be complete by Moodle. When the installation process is complete, you can set up the admin account on your Moodle site. To let it save your login information, enter it, and click update profile. The page descriptions in the setting could be always updated.

Note: In case you have installed any optional plugins, you must uninstall them before running the main install script and reinstall them after installing Moodle.

Moodle And Browsers

Easily we can say that Moodle is compatible with most browsers such as Chrome, Firefox, Safari (Not supported for 7 and below), Edge, and Internet Explorer (Not supported for 10 and below). If you want to set up Moodle on your mobile device, mobile safari and google chrome are supporting.

Tutorial Configure Moodle

To do this part, you should first find the file config-dist.php in the Moodle code directory and copy it to a new file called config.php(You can always edit this file). Open your considered editor to change the appropriate settings to point to your site, directories, and database. However, there are not many options that you could configure before going live. Within Moodle site administration you can find the options such as:

_ Outgoing Mail Configuration

_ Set your SMTP server and authentication

_ Support Contact

_ System Paths


_ Update Time Zones

How To Setup Cron

To make sure of run periodically, cron is a good idea. Since cron is running every minute, you are recommending to use it. A Unix cron entry will be as below:

/usr/bin/php /path/to/moodle/admin/cli/cron.php >/dev/null

Once corn runs regularly, the site will work, so do not skip this step.



In this article, you learned how to setup Moodle On A Dedicated Servers. Start using Moodle and create your online courses. Enjoy your personalized dashboard, simple, and intuitive text editor, and share your progress track with your friends.

How useful was this post?

Click on a star to rate it!

Average rating 1 / 5. Vote count: 1

No votes so far! Be the first to rate this post.

View More Posts
Marilyn Bisson
Content Writer
Eldernode Writer
We Are Waiting for your valuable comments and you can be sure that it will be answered in the shortest possible time.

Leave a Reply

Your email address will not be published. Required fields are marked *

We are by your side every step of the way

Think about developing your online business; We will protect it compassionately

We are by your side every step of the way


7 days a week, 24 hours a day