Askbot is a question and answer web forum and it looks like StackOverflow Q&A web forums. It is based on Django web framework and written in Python programming language. It is an open source Q&A web forum project maintained and developed by Evgeny Fadeev.

Some most popular open source projects like Ask-Fedora and Ask-LibreOffice uses the AskBot to provide support for their users and clients. This project is funded by open source community like Document Foundation to support the development of Askbot. AskBot has a responsive layout works with all of the devices and Professional Design. The Source code of AskBot is available at Github known as askbot-devel. It is scalable and works with all large projects with ease.

This guide includes setup of AskBot using NGINX Web Server with Gunicorn module, PostgreSQL Database Server, required library packages and Python modules that is required on AlmaLinux / Rocky Linux / Amazon Linux. In order to accomplish the task you need to follow all the steps carefully.


To follow this tutorial, you will need:

  1. A VPS with minimum 1GB RAM.
  2. A normal user account with sudo privileges.

Step-1 (Install the required packages )

For Alma / Rocky / Amazon Linux

Firs of all Install EPEL Repository

$ sudo yum install epel-release

Secondly Install Required packages

$ sudo yum install python-pip python-devel postgresql-server postgresql-devel postgresql-contrib gcc nginx

For Ubuntu / Debian

Then Update the repositories

$ sudo apt-get update

After that Install Required packages

$ sudo apt-get install python-pip python-dev python-flup libpq-dev postgresql postgresql-contrib nginx zlib1g-dev libpng-dev libjpeg-dev gunicorn supervisor python-setuptools

Step-2 (PostgreSQL Database Configuration)

For Alma / Rocky / Amazon Linux

Firstly Start the PostgreSQL services

$ sudo systemctl start postgresql

Secondly Switch to postgres prompt

$ sudo su - postgres

Enter to the PostgreSQL prompt

$ psql

For Ubuntu / Debian

Enter to the PostgreSQL prompt

$ sudo -u postgres psql

Step-3 (Create PostgreSQL Database)

First of all we will create a database techbrown for AskBot project.

# CREATE DATABASE techbrown;

We will create a database user techbrownuser which we will use to to interact with the PostgreSQL database. Ensure that Password is strong.

# CREATE USER techbrownuser WITH PASSWORD 'techbrownpassword';

We’ll set UTF-8 for the database this is required by Askbot.

# ALTER ROLE techbrownuser SET client_encoding TO 'utf8';

Now, grant all privileges to DB user techbrownuser to techbrown database

# GRANT ALL PRIVILEGES ON DATABASE techbrown TO techbrownuser;

Exit from PostgreSQL prompt

# \q

Step-4 (AskBot Installation)

Change the Directory

$ cd /home/techbrown

Now, Install the Python setup tools

$ sudo easy_install -U setuptools

Now, upgrade the Python PIP packages

$ sudo pip install --upgrade pip

Install Askbot using PIP Installation methods

$ sudo pip install askbot psycopg2 gunicorn

After that install the Askbot on current directory

$ sudo askbot-setup

Step-5 (AskBot Configuration)

Now collect all files into base directory location.

$ sudo python collectstatic

Now we can synchronize the data structures to PostgreSQL database.

$ sudo python syncdb

Allow the port 9999 to firewall

$ sudo ufw allow 9999

Finally it’s time to run the AskBot development server on port 9999. which checks and ensures that everything works fine:

$ sudo python runserver

Now Askbot appears in your browser.
Finally hit on Please sign in button
Create a new account at the site this will be your administrator account
Now bind the Askbot site to successfully run with gunicorn

$ sudo gunicorn --bind wsgi:application

After that the Askbot site is successfully works with browser

Congratulations now you have installed and configured the Askbot on CentOS and AlmaLinux / Rocky Linux / Amazon Linux.