FreeScout is a powerful and lightweight open-source helpdesk and shared inbox solution. It is built as a viable alternative to popular platforms like Zendesk and Help Scout. Offering 100% mobile-friendliness and support for multiple languages, FreeScout is an ideal choice for businesses of all sizes. In this step-by-step guide, we will walk you through the process of installing FreeScout Help Desk on a Debian 12 server.
Prerequisites
Before you begin the installation process, make sure you have the following:
- A Debian 12 server
- A non-root user with sudo administrator privileges
- A domain name pointed to your server’s IP address
Installing Dependencies
To install FreeScout Help Desk, we need to set up the LEMP Stack (Nginx, MariaDB, and PHP-FPM) along with some additional PHP extensions and Git. Execute the following commands to install the necessary dependencies:
sudo apt update sudo 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
Once the installation is complete, verify the services are running and enabled:
sudo systemctl is-enabled nginx sudo systemctl status nginx sudo systemctl is-enabled mariadb sudo systemctl status mariadb sudo systemctl is-enabled php8.2-fpm sudo systemctl status php8.2-fpm
Make sure you see the “enabled” status for each service, indicating successful installation and activation.
Configuring PHP-FPM
After installing the dependencies, we need to configure PHP-FPM. Open the php.ini
configuration file using the following command:
sudo nano /etc/php/8.2/fpm/php.ini
Inside the file, modify the following options according to your server environment:
memory_limit = 512M date.timezone = Europe/Stockholm upload_max_filesize = 16M cgi.fix_pathinfo=0
Save and exit the file. Then, restart the PHP-FPM service to apply the changes:
sudo systemctl restart php8.2-fpm
Configuring MariaDB Server
Next, we need to secure the MariaDB server installation and create a new database and user for FreeScout. Run the following command to secure your MariaDB server:
sudo mariadb-secure-installation
Follow the prompts to set up the root password, remove anonymous users, disable remote login for the root user, and remove the test database.
Once the server is secure, log in to the MariaDB server using the following command:
sudo mariadb -u root -p
Enter your root password when prompted. Now, create a new database and user for FreeScout with the following queries:
CREATE DATABASE freescout CHARSET utf8mb4 COLLATE utf8mb4_unicode_ci; GRANT ALL PRIVILEGES ON freescout.* TO freescout@localhost IDENTIFIED BY "password"; FLUSH PRIVILEGES;
Replace “password” with a strong password of your choice. Verify the user’s privileges and database access with the following query:
SHOW GRANTS FOR freescout@localhost;
If the output confirms the user’s access to the database, type quit
to exit the MariaDB server.
Downloading FreeScout Source Code
With the server and database configured, we can now download the FreeScout source code and set up the necessary permissions. Execute the following commands:
mkdir -p /var/www/freescout; cd /var/www/freescout
git clone https://github.com/freescout-helpdesk/freescout .
sudo 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 {} \;
These commands create a new web-root directory, download the FreeScout source code from GitHub, and set the appropriate ownership and permissions.
Configuring Nginx Server Block
After downloading the source code, we need to configure Nginx to serve the FreeScout installation. Create a new Nginx server block configuration file with the following command:
sudo nano /etc/nginx/sites-available/freescout
Inside the file, insert the following configuration, replacing example.io with your domain name:
server { listen 80; server_name example.io; 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; } # 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; } }
Save and exit the file. Then, activate the server block and verify the Nginx syntax:
sudo ln -s /etc/nginx/sites-available/freescout /etc/nginx/sites-enabled/ sudo nginx -t
If the syntax is correct, restart the Nginx service:
sudo systemctl restart nginx
Securing FreeScout with SSL/TLS Certificates
To enable HTTPS on your FreeScout installation, we’ll generate SSL/TLS certificates using Let’s Encrypt and Certbot. Install Certbot and the Certbot Nginx plugin:
sudo apt install certbot python3-certbot-nginx
Generate the SSL/TLS certificates for your domain name:
sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email test@example.io -d help.example.io
Replace test@example@.io
with your email address and help.example.io
with your domain name. The certificates will be available at /etc/letsencrypt/live/example.com/
.
FreeScout Installation via Web Installer
With the server and SSL/TLS certificates in place, you can now proceed with the FreeScout installation using the web installer.
- Launch your web browser and visit your FreeScout domain name.
- You will be redirected to a secure HTTPS connection and the FreeScout installation page.
- Click on “Check Requirements” to ensure all the necessary PHP extensions are installed.
- If the required PHP extensions are present, click on “Check Permissions” to continue.
- Make sure the permissions for the FreeScout directory are writable, then click on “Configure Environments”.
- Enter your domain name in the “App URL” setting and click on “Setup Database”.
- Choose MySQL as the default database and provide the database name, user, and password. Click on “Setup Application” to proceed.
- Select the application language and time zone, then click on “Setup Admin”.
- Create a new admin user by entering your email address, username, and password. Click on “Install” to initiate the FreeScout installation.
- Once the installation is complete, you will see a confirmation message. Note that you need to create a new cron job for FreeScout.
Back in your terminal, create a new cron job for FreeScout:
crontab -u www-data -e
Add the following configuration:
***** php /var/www/freescout/artisan schedule:run >> /dev/null 2>&1
Save and exit the file.
Finally, go back to your web browser, click on “Login,” and enter your admin email address and password to access the FreeScout dashboard.
Conclusion
Congratulations! You have successfully installed FreeScout Help Desk on your Debian 12 server with the LEMP Stack (Nginx, MariaDB, and PHP-FPM). By following this guide, you have secured your installation with SSL/TLS certificates and can now utilize FreeScout as a powerful helpdesk platform for your organization.
For reliable and high-performance hosting solutions for your FreeScout installation and other web applications, consider Shape.host’s SSD Linux VPS services. With their cutting-edge technology and exceptional support, Shape.host ensures your applications run smoothly and efficiently.
Remember to regularly update and maintain your FreeScout installation to keep it secure and up-to-date. Enjoy the benefits of FreeScout as you streamline your helpdesk operations and enhance customer support.