FreeScout is an open-source help desk and shared inbox solution that is easy to install and manage. This tutorial will guide you through the steps needed to install FreeScout on Debian 12.

Step 1: Create an Instance

  • Access the Dashboard: Log in to your Shape.Host account and navigate to your Dashboard.
  • Click Create: Click on the “Create” button located in the top-right corner.
  • Select Instances: From the dropdown menu, choose “Instances” to begin creating a new cloud server.
Shape.host Resources dashboard with Create > Instance highlighted.
  • Select Location: Choose a data center location for your instance closest to your target audience for optimal performance.
Shape.host instance form with the data center location selector highlighted.
  • Choose a Plan: Scroll through the available pricing plans. Select a plan based on your project requirements, such as Standard, CPU-Optimized, or Memory-Optimized.
  • Choose an Image: Select Debian 12 as the operating system for your instance.
Shape.host instance form with the operating system image selector highlighted.
  • Authentication and Finalize: Choose your authentication method, either via SSH keys or password. Once done, click Create Instance to launch your server.
Shape.host instance form with the Create Instance button highlighted.

Step 2: Access Your Instance

To connect to your instance on Shape.Host, follow these steps:

Shape.host Resources dashboard with the server IP address highlighted.
  1. Get the Instance IP: After creating your instance, find the public IP address in the Shape.Host dashboard under Resources.
  2. Open SSH Client: Use an SSH client like Terminal (Linux/macOS) or PuTTY (Windows).
  3. SSH into the Instance: Run the following command in your terminal:
   ssh root@<your-instance-ip>

Replace <your-instance-ip> with your actual instance IP address.

  1. Enter the Password: If prompted, enter your instance’s root password or use your SSH key if configured.

You are now connected to your instance!

Step 3: Update the System

Update and upgrade your packages to ensure everything is up to date:

apt update && apt upgrade -y
Terminal showing APT package management commands and output.

Step 4: Install Required Packages

Install the necessary packages including Nginx, MariaDB, and PHP:

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 -y
Terminal showing APT package management commands and output.

Step 5: Start and Verify Services

Check if Nginx, MariaDB, and PHP-FPM services are running:

systemctl is-enabled nginx
systemctl status nginx
systemctl is-enabled mariadb
systemctl status mariadb
systemctl is-enabled php8.2-fpm
systemctl status php8.2-fpm
Terminal showing systemd service management commands or output.
Terminal showing systemd service management commands or output.
Terminal showing systemd service management commands or output.

Check PHP version and loaded modules:

php -v
php -m
Terminal showing php commands or output during Start and Verify Services.

Step 6: Configure PHP

Open the php.ini configuration for PHP-FPM to make necessary adjustments:

nano /etc/php/8.2/fpm/php.ini

Update the following configuration settings:

memory_limit = 512M
date.timezone = Europe/Stockholm
upload_max_filesize = 16M
cgi.fix_pathinfo = 0
  • Save and Exit: Use CTRL + O to save the changes and CTRL + X to exit.

Restart PHP-FPM for the changes to take effect:

systemctl restart php8.2-fpm
Terminal showing systemd service management commands or output.

Step 7: Secure MariaDB

Run the MariaDB secure installation script to secure your database:

mariadb-secure-installation
Terminal showing MariaDB/MySQL database security configuration prompts.
Terminal showing mariadb commands or output during Secure MariaDB.

Follow the prompts to set up the root password and secure the installation.

Step 8: Set Up Database for FreeScout

Log in to the MariaDB server using the following command:

mariadb -u root -p

Create a new database and user for FreeScout:

CREATE DATABASE freescout CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'freescout'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON freescout.* TO 'freescout'@'localhost';
FLUSH PRIVILEGES;
SHOW GRANTS FOR 'freescout'@'localhost';

Replace 'password' with a secure password.

Terminal showing SQL database and user configuration commands.

Step 9: Download and Set Up FreeScout

Create the directory for FreeScout and clone the repository:

mkdir -p /var/www/freescout && cd /var/www/freescout
git clone https://github.com/freescout-helpdesk/freescout .
chown -R www-data:www-data /var/www/freescout
Terminal showing Git repository cloning output.

Set the correct permissions for FreeScout files and directories:

find /var/www/freescout -type f -exec chmod 664 {} \;
find /var/www/freescout -type d -exec chmod 775 {} \;
Terminal showing file ownership or permission commands.

Step 10: Configure Nginx

Create a new Nginx server block configuration for FreeScout:

nano /etc/nginx/sites-available/freescout

Insert the following configuration and change the server_name to your domain:

server {
    listen 80;
    server_name debian-tutorials.shape.host;
    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.2-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
        include fastcgi_params;
    }
    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 ~ /\. {
        deny  all;
    }
}

Save and exit the file.

Terminal showing the GNU nano editor and configuration text.

Step 11: Enable Nginx Configuration

Create a symbolic link to enable the Nginx configuration:

ln -s /etc/nginx/sites-available/freescout /etc/nginx/sites-enabled/

Test the Nginx configuration for syntax errors:

ginx -t

Restart Nginx:

systemctl restart nginx
Terminal showing systemd service management commands or output.

Step 12: Set Up SSL with Let’s Encrypt

Install Certbot and set up SSL for your domain:

apt install certbot python3-certbot-nginx -y
certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email contact@shape.host -d debian-tutorials.shape.host
Terminal showing APT package management commands and output.
Terminal showing Certbot certificate commands and messages.

This command will automatically obtain and configure an SSL certificate for your FreeScout installation.

Step 13: Complete FreeScout Installation

Open your web browser and visit your FreeScout domain, such as http://your-domain.com. You will be redirected to a secure HTTPS connection and the FreeScout installation page.

Click Check Requirements to ensure that every PHP extension that is needed is installed.

FreeScout setup interface.

If required PHP extensions are installed, click Check Permissions to continue.

FreeScout installer server requirement checks.

Now ensure the permission for the FreeScout directory is writable. Then, click Configure Environments.

FreeScout installer directory permission checks.

Input your domain name within the App URL setting and click Setup Database

FreeScout installer application settings form.

Choose the default database to MySQL and input details database name, user, and password. Then, click Setup Application to continue.

FreeScout installer form for database and mail settings.

Select the application language and time zone and click Setup Admin.

FreeScout installer database settings form.

Now create a new admin user for your FreeScount installation. Input your email address, the new user, and password, then click Install to proceed with the FreeScout installation.

FreeScout installer administrator account form.

Once the installation is successful, you should see the following confirmations. Also, you can see that you need to create a new cron job for FreeScout.

Back to your terminal server and run the following command to create a new cron job for FreeScout.

Step 14: Set Up Cron Jobs for FreeScout

Run the following command to create a cron job for FreeScout:

crontab -u www-data -e

Add the cron job entry as instructed by the FreeScout documentation.

* * * * * php /var/www/freescout/artisan schedule:run >> /dev/null 2>&1
Terminal showing crontab commands or output during Set Up Cron Jobs for FreeScout.

Next, back to your web browser, click Login, then you will be presented with the FreeScout login page. Input your admin email address and password, then click Login.

FreeScout sign-in form.

If your installation is successful, you should see the FreeScout dashboard like the following:

FreeScout dashboard.

FreeScout has now been installed successfully on your Debian 12 server. You can use FreeScout to manage help desk tickets and provide customer support in an efficient way.

For hosting solutions like Cloud VPS, visit Shape.Host to explore a wide range of services that can help scale and manage your online presence.