Running CourseLit On A Free AWS Plan
In this post, I will show you how to launch your own online teaching platform for free by running CourseLit on a free AWS plan.
The free plan includes certain services which the new users can use for the next 12 months after signing up. One of those services is EC2 which is what we are going to use to host CourseLit.
Before We Begin
You will need a domain name before starting the setup as CourseLit needs to acquire a SSL certificate for enabling HTTPS on your new site and that is only possible if the domain name can be resolved to an actual web host i.e. the EC2 instance in our case.
Step 1. Get A Free AWS Account
Let’s start by signing up for a free AWS account.
Step 2. Create a
Once you are in the AWS Management Console, look for EC2 and create an instance. For this tutorial, we have used a
t2.micro instance which qualifies for the AWS free tier.
By now, you will have a
.pem file which you can use to securely login to your instance via SSH using a command like the following. Let’s call this
ssh -i key.pem email@example.com
Step 3. Making sure our instance is reachable
Our instance will not be reachable from the outside world by default. We need to tie an elastic IP to our instance for that. You can easily do that from the same dashboard. Make sure your elastic IP is attached to a running instance otherwise you may be billed.
Once you have the elastic IP, you can set up a A record into the DNS section of your hosting provider so that you can type in
your-domain.com to reach the AWS instance.
You are required to wait for sometime after this step as DNS propagation takes time.
Additionally, we have to add a new security group to our instance and under the inbound rules section we have to enable HTTPS as shown below otherwise the instance won’t be reachable via HTTPS as CourseLit, by default is served over HTTPS.
Step 4. Install Ansible
We have to install Ansible on our local machine as the deployment script we talked about is an Ansible script. Follow a relevant guide for your operating system and make sure you are able to run
Step 5. Add your instance information to Ansible hosts file
We need to make an entry to the Ansible host file (
etc/ansible/hosts on Linux) detailing the instance address and login credentials. Mine look like the following.
my-domain.com ansible_host=my-domain.com ansible_user=ubuntu ansible_ssh_private_key_file=/path/to/instance/key.pem
Step 6. Clone CourseLit’s Repo
We have to fetch the CourseLit repository from GitHub as it contains the deployment script.
CD to the
Step 7. Deploy CourseLit
Now all the pre-planning is complete and we can finally deploy our own learning platform. Execute the following command to deploy.
ansible-playbook deployment/install.yml -l <your-ansible-host-entry> -e 'ansible_python_interpreter=/usr/bin/python3'
Make sure to change the
<your-ansible-host-entry> to the value you set in Step 6.
The installer will ask a few questions about your domain name, database username and password etc., and it will do the rest. By the end you will have fully working website available at
If you are still facing some problem, come chat with me with the official Discord chat.
Follow the publication for more juicy tips and updates regarding CourseLit LMS.