Hosting Helpdesk (OpenSupports)

Lets start by creating MySQL user and a database for WordPress:

mysql -u root -p

mysql> CREATE DATABASE helpdesk DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci;

Note: Every MySQL statement must end in a semi-colon (;). Check to make sure this is present if you are running into any issues.

mysql> GRANT ALL ON helpdesk.* TO 'helpdeskuser'@'localhost' IDENTIFIED BY 'password';


mysql> EXIT;

Install additional PHP Plugins and restart Apache service:

sudo apt update
sudo apt install php-imap
sudo systemctl restart apache2

Now let’s enable .htaccess overrides:

sudo nano /etc/apache2/sites-available/
<VirtualHost *:80>
    # DocumentRoot: The directory out of which you will serve your
    # documents. By default, all requests are taken from this directory, but
    # symbolic links and aliases may be used to point to other locations.
    DocumentRoot "/var/www/helpdesk/htdocs"
    ErrorLog /var/log/apache2/
    CustomLog /var/log/apache2/ combined
    # This should be changed to whatever you set DocumentRoot to.
    <Directory "/var/www/helpdesk/htdocs">
        # Possible values for the Options directive are "None", "All",
        # or any combination of:
        #   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
        # Note that "MultiViews" must be named *explicitly* --- "Options All"
        # doesn't give it to you.
        # The Options directive is both complicated and important.  Please see
        # for more information.
        Options Indexes FollowSymLinks MultiViews

        # AllowOverride controls what directives may be placed in .htaccess files.
        # It can be "All", "None", or any combination of the keywords:
        #   Options FileInfo AuthConfig Limit
        AllowOverride All

        # Controls who can get stuff from this server.
        Order allow,deny
        Allow from all

Download OpenSupports and extract it to /var/www/helpdesk:

mkdir /var/www/helpdesk/htdocs
cd /var/www/helpdesk/htdocs

# Download and extract the latest WordPress version
curl -O


# Create .htaccess
touch /var/www/helpdesk/htdocs/.htaccess

Finally visit your using your web browser to finish setting up OpenSupports:

IMAP settings should be something similar


Add the following entry in crontab -e in order to do the IMAP post request every minute

*/1 * * * * /usr/bin/curl -X POST -k -i --data "token=gxqWBr75f00xXtvreG13" &>/dev/null