In this tutorial, we will be installing HRCloud2 on POP! OS. HRCloud2 is an open-source file-sharing platform that provides a web interface to access files stored on a server.
Before we start the installation process, make sure your system is up to date by running the following commands:
sudo apt update
sudo apt upgrade
We also need to install some packages required by the HRCloud2 application. Run the following command to install them:
sudo apt install mysql-server nginx php-fpm php-mysql php-bcmath php-curl php-gd php-intl php-mbstring php-xml php-zip
HRCloud2 requires some additional software to function properly. We will install all the required packages using the following steps:
Install the composer
package, which is a dependency manager for PHP:
sudo apt install composer
Install the nodejs
and npm
packages, which are required to build the HRCloud2 frontend:
sudo apt install nodejs npm
Install the yarn
package, which is a package manager for JavaScript:
sudo npm install -g yarn
To download HRCloud2, we will use the git
command. If you don't have git
installed on your system, you can install it by running the following command:
sudo apt install git
Next, download HRCloud2 by running the following command:
git clone https://github.com/zelon88/HRCloud2.git
Now that we have downloaded HRCloud2, let's install it by running the following commands:
Change your current directory to the HRCloud2 project directory:
cd HRCloud2
Install the PHP dependencies using the composer
package manager:
composer install
Install the JavaScript dependencies using the yarn
package manager:
yarn install
Build the frontend assets using the yarn
package manager:
yarn run build
Now that the installation process is complete, let's configure NGINX to serve HRCloud2.
Create a new configuration file for HRCloud2:
sudo nano /etc/nginx/sites-available/hrcloud2
Paste the following configuration into the file:
server {
listen 80;
server_name example.com;
root /path/to/hrcloud2/public;
index index.php;
location / {
try_files $uri $uri/ /index.php?$args;
}
location ~ \.php$ {
try_files $uri =404;
fastcgi_split_path_info ^(.+\.php)(/.+)$;
fastcgi_pass unix:/run/php/php7.4-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
}
Replace example.com
with your own domain name or IP address, and /path/to/hrcloud2/public
with the path to your HRCloud2 installation's public directory.
Create a symbolic link to the new configuration file in the sites-enabled
directory:
sudo ln -s /etc/nginx/sites-available/hrcloud2 /etc/nginx/sites-enabled
Test the configuration:
sudo nginx -t
Restart NGINX:
sudo systemctl restart nginx
HRCloud2 requires a MySQL database to store file metadata. To create the database, follow these steps:
Log in to the MySQL shell:
sudo mysql
Create a new database:
CREATE DATABASE hrcloud2;
Create a new user and password:
CREATE USER 'hrcloud2user'@'localhost' IDENTIFIED BY 'password';
Replace password
with a strong password.
Grant the new user permissions on the HRCloud2 database:
GRANT ALL PRIVILEGES ON hrcloud2.* TO 'hrcloud2user'@'localhost';
Exit the MySQL shell:
exit
Finally, we need to configure HRCloud2 to use the database we just created. Follow these steps:
Rename the .env-example
file to .env
:
mv .env-example .env
Edit the .env
file:
nano .env
Modify the DB_*
configuration options to match the MySQL database we just created:
DB_CONNECTION=mysql
DB_HOST=127.0.0.1
DB_PORT=3306
DB_DATABASE=hrcloud2
DB_USERNAME=hrcloud2user
DB_PASSWORD=password
Replace password
with the password you chose in the previous step.
Save and exit the .env
file.
Now that we have completed the configuration, we can start the HRCloud2 server by running the following command:
php artisan serve
Your HRCloud2 installation should now be accessible by visiting http://example.com:8000
in your web browser, where example.com
is your domain name or IP address.
That's it! You should now have HRCloud2 up and running on your POP! OS server. You can now log in to the web interface and start sharing files with your users.
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!