This pandemic has been tough on each one of us. Many of us have faced financial problems, many lost their jobs, some started new bussiness or were self-employed. Whatever may be the case, one thing that we all have realised now is that having an online presence if very essential and it will be even more essential in the future. Companies are changing their bussiness models to meet the new needs. Classes are being shifted to online modes to avoid in-person meets. It is really difficult for schools and colleges without seperate emails for student to manage their entire classes system.

Well, we obviously had some some briliant minds who had foreseen such problems and made a free software called Moodle. Moodle is the world’s most popular learning management system. The fact that Moodle is not only free but also open-source, is what makes it so special. If you are not someone who is not aware what open-source is then I recomend you readup this other article I wrote a while back. To give a gist, open-source softwares are those which have their source code available to general public, so anyone who can read and write code, can easily make modifications and customisations according to their needs.

So, what exactly does moodle has to offer? Well the list is pretty long to cover in one article. You can look up the official page for the exhaustive list. Now, let’s see how to set-up one on your local server. We will be using docker and docker-compose because it will just be a one step process then but before we proceed, you will need docker and docker-compose installed on your system. To do so, simply follow the official docs of docker and docker-compose.

Follow the steps below to get started

  1. Create a new project folder and also create a file called docker-compose.yml

     mkdir moodle && cd moodle
     touch docker-compose.yml
    
  2. Add the following lines of code to docker-compose.yml

  3. To build and run the server follow the below commands

     docker-compose rm -fs
     docker-compose up --build -d
    

And that is it for the setup part. You can go to https://localhost and see the deployed portal. For configuration of various components in the portal, you can refer to their official guide.

If you are using moodle, then obviously you would want your students and teachers to be able to access it from anywhere and not just your local network. In that case, you can configure nginx over it and deploy it on any machine lying around in your house or office. A better alternative would be to deploy it in a cloud server but again it totally depends on your use case.

I hope this piece of article was informative and you got to learn something new after reading it.