How to install FreeScout Help Desk on Ubuntu 22.04
Introduction
Requirements
The following is a list of items needed to complete the installation successfully:
1) An SSH client such as Putty or SolarPutty
2) A computer with atleast 4GB RAM, a dual core processor and 50GB of free disk space
3) Linux Ubuntu 22.04 LTS or any newer version
4) Cloud Servers: A domain name and a public static IP address
5) A stable internet connection
Overview
The following is an overview of the steps covered in this guide:
1) Download and install the LEMP stack
2) Download a DBMS and create a database
3) Download Freescout and configure NGINX web server
4) Access the Freescout webadmin dashboard
5) Conclusion
Step 1: Download and install the LEMP stack
Firstly, you need to install Nginx, MariaDB, PHP, and other PHP extensions on your server to set up a LEMP server. You can install all of these packages by running the following command:
apt update -y apt install nginx mariadb-server libmariadb-dev git php-fpm php-mysql php-mbstring php-xml php-imap php-zip php-gd php-curl php-intl
After installing all the packages, you need to edit the php.ini file. You can do this by running the following command:
nano /etc/php/8.1/fpm/php.ini
Once you have opened the file, you need to change the following settings:
memory_limit = 512M date.timezone = UTC upload_max_filesize = 256M cgi.fix_pathinfo=0
Save and close the file, and then restart the PHP-FPM service to apply the changes by running the following command:
systemctl restart php8.1-fpm
Step 2: Install MariaDB and create a database.
The next step is installing MariaDB and creating a database. Run the following command to install MariaDB:
sudo apt install mariadb -y
When the installation completes, run the following command to access the mysql shell:
sudo mysql
Once you are connected, create a new database with the following command:
CREATE DATABASE freescout CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci;
After that, create a new user with all privileges by typing:
GRANT ALL PRIVILEGES ON freescout.* TO freescout@localhost IDENTIFIED BY "verystrongpassword";
Remember to replace “password” with a strong and secure password. Then, flush the privileges by entering the command:
FLUSH PRIVILEGES;
Finally, to exit from the MariaDB shell, type:
EXIT;
Step 3: Download Freescout and configure NGINX web server
To download FreeScout, follow the steps below:
Step 1: Create a directory for FreeScout within the Nginx web root directory. To do so, run the following command:
mkdir -p /var/www/freescout
Step 2: Go to the newly created directory and download the latest version of FreeScout using the following command:
cd /var/www/freescout git clone https://github.com/freescout-helpdesk/freescout
Step 3: Set proper permissions and ownership to the FreeScout directory by running the following commands:
chown -R www-data:www-data /var/www/freescout find /var/www/freescout -type f -exec chmod 664 {} \; find /var/www/freescout -type d -exec chmod 775 {} \;
Step 4: Create a Nginx virtual host configuration file for FreeScout by running the following command:
nano /etc/nginx/conf.d/freescout.conf
Add the following code to the file:
server { listen 80; server_name freescout.example.com; root /var/www/freescout/public; index index.php index.html index.htm; error_log /var/www/freescout/storage/logs/web-server.log; location / { try_files $uri $uri/ /index.php?$query_string; } location ~ \.php$ { fastcgi_split_path_info ^(.+\.php)(/.+)$; fastcgi_pass unix:/run/php/php8.1-fpm.sock; fastcgi_index index.php; fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; include fastcgi_params; } # Uncomment this location if you want to improve attachments downloading speed. # Also make sure to set APP_DOWNLOAD_ATTACHMENTS_VIA=nginx in the .env file. #location ^~ /storage/app/attachment/ { # internal; # alias /var/www/freescout/storage/app/attachment/; #} location ~* ^/storage/attachment/ { expires 1M; access_log off; try_files $uri $uri/ /index.php?$query_string; } location ~* ^/(?:css|js)/.*\.(?:css|js)$ { expires 2d; access_log off; add_header Cache-Control "public, must-revalidate"; } location ~* ^/(?:css|fonts|img|installer|js|modules|[^\\\]+\..*)$ { expires 1M; access_log off; add_header Cache-Control "public"; } location ~ /\. { deny all; } }
Step 5: Save and close the file, then edit the Nginx main configuration file by running:
nano /etc/nginx/nginx.conf
Add the following line after the line http {:
server_names_hash_bucket_size 64;
Step 6: Restart the Nginx service to reload the changes by running the following command:
systemctl restart nginx
Step 4: Access the Freescout webadmin dashboard.
To access the FreeScout web interface, open your web browser and enter the URL http://freescout.example.com on the search bar. This will take you to the FreeScout installation page.
Click on “Check Requirements” to verify if your server meets the necessary requirements. You will be redirected to the server requirements page. Next, click on “Check Permissions” to check if your server has the permissions required to run FreeScout. You will be redirected to the Permissions page.
Then, click on “Configure Environments” to go to the Settings page. Here, specify your website URL and click on “Setup Database” to access the Database setup page. On the Database setup page, provide your database credentials and click on “Setup Application”. You will then be redirected to the Language selection page.
Choose your preferred language and click on “Setup Admin” to access the admin user creation page. Provide your admin username, email, and password, and then click on “Install”. You will be redirected to the following page.
Click on “Login” to access the FreeScout login page. Enter your admin username and password, and then click on “Login”. You will then be redirected to the FreeScout dashboard.