FreeScout is an open-source help desk and shared inbox software that can be installed on Linux. In this tutorial, we will cover how to install FreeScout on Elementary OS Latest.
Before we begin with the installation, let's check if all the prerequisites are met.
A VPS or dedicated server with Elementary OS Latest installed.
An SSH client like PuTTY to connect to the server.
A non-root user account with sudo privileges.
The latest version of PHP and MariaDB server should be installed on the system.
Let's first update the system before proceeding with the installation. Run the following command:
sudo apt update && apt upgrade -y
To run FreeScout, we need to install some dependencies. Run the following command:
sudo apt install git curl zip unzip nginx ufw mariadb-server -y
sudo apt install php-fpm php-cli php-common php-mbstring php-xml php-gd php-curl php-mysql -y
We will now configure the firewall to allow HTTP and HTTPS traffic. Run the following commands:
sudo ufw allow 'Nginx Full'
sudo ufw enable
Composer is a dependency manager used for PHP. Run the following commands to install composer:
cd ~
curl -sS https://getcomposer.org/installer -o composer-setup.php
sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer
We will now install FreeScout on our Elementary OS Latest system. Follow the steps given below carefully:
The first step is to clone the FreeScout repository from GitHub:
cd ~
git clone https://github.com/freescout-helpdesk/freescout.git
cd freescout
Once the Git repository is cloned, we need to install the dependencies using Composer:
sudo composer install --no-dev --prefer-dist
FreeScout uses environment variables to configure the application settings. Run the following command to create a copy of the .env.example
file:
cp .env.example .env
Now open the .env
file using the text editor of your choice:
nano .env
Update the values of the following variables:
APP_URL=http://example.com
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
Replace the value of APP_URL
with your domain name or IP address. Change the value of DB_DATABASE
, DB_USERNAME
and DB_PASSWORD
as per your requirement.
We need to generate a new application key for our FreeScout installation:
php artisan key:generate
Log in to the MariaDB server using the following command:
sudo mysql -u root -p
Enter the password for the root
user when prompted. Create a new database and user using the following commands:
CREATE DATABASE freescout;
CREATE USER 'freescout'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
GRANT ALL PRIVILEGES ON freescout.* TO 'freescout'@'localhost';
FLUSH PRIVILEGES;
Note: Replace “password” with your desired password.
Exit the MySQL shell using the following command:
exit
The last step in the installation is to migrate the FreeScout database tables:
php artisan migrate
To ensure that the files and folders have the correct permissions, run the following commands:
sudo chown -R www-data:www-data /var/www/html/freescout/
sudo chmod -R 755 /var/www/html/freescout/
Finally, we need to configure Nginx to serve FreeScout. Create a new virtual host configuration file using the following command:
sudo nano /etc/nginx/sites-available/freescout
Copy and paste the following contents into the file:
server {
listen 80;
listen [::]:80;
root /var/www/html/freescout/public;
index index.php index.html index.htm;
server_name your_domain_name_or_IP;
client_max_body_size 100M;
location / {
try_files $uri $uri/ /index.php?$query_string;
}
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Replace the value of server_name
with your domain name or IP address. Save and close the file by pressing CTRL+X
followed by Y
and Enter.
Create a symbolic link to enable the virtual host:
sudo ln -s /etc/nginx/sites-available/freescout /etc/nginx/sites-enabled/
Test the configuration using the following command:
sudo nginx -t
If the test is successful, reload Nginx:
sudo systemctl reload nginx
Open your web browser and visit http://your_domain_name_or_IP. You will be redirected to the FreeScout setup page.
Enter your database details and the administrator account details. Click the “Install” button to proceed.
Once the installation is complete, you will be taken to the FreeScout dashboard. Congratulations, you have successfully installed FreeScout on Elementary OS Latest.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!