Install ProjectSend on Ubuntu 18.04 | 20.04 with Apache

How to Install ProjectSend on Ubuntu 18.04 20.04

In this post, we are going to show that how to Install ProjectSend on Ubuntu 18.04 | 20.04 with Apache. If your are going to Install ProjectSend on your Ubuntu system then this post is ideal for you.

ProjectSend(previously cFTP) is a free, open-source, user friendly and self-hosted file uploading tool that is used for file-sharing with your clients. It is written in PHP programing language.

ProjectSend Features:

  • It is provides Real-time statistics
  • Create client groups
  • self-registration and social login
  • Sortable full lists of files, users and clients.
  • Custom E-mail templates
  • Unlimited file size uploading
  • Can be translated easily via .po files

How to Install ProjectSend on Ubuntu

Simply follow below steps to install ProjectSend on your Ubuntu:

Step 1 : Install Apache

Run the commands below to install Apache2 HTTP on Ubuntu server:

sudo apt update
sudo apt install apache2

Next, run the commands below to stop, start and enable Apache2 service to always start up with the server boots:

sudo systemctl stop apache2.service
sudo systemctl start apache2.service
sudo systemctl enable apache2.service

For check if Apache2 server is installed or not, simply open your browser and type server IP or hostname.

If browser show result similar like below then Apache2 is installed and working properly.

http://localhost
apache-default-page

Step 2 : Install MariaDB Database Server

To install MariaDB database, simply run the commands below:

sudo apt update
sudo apt install mariadb-server mariadb-client

Next, run the commands below to stop, start and enable MariaDB service to always start up with the server boots:

sudo systemctl stop mariadb.service
sudo systemctl start mariadb.service
sudo systemctl enable mariadb.service

Now, run the commands below to secure MariaDB server by creating a root password and disallowing remote root access.

sudo mysql_secure_installation

When you run the above command, it will prompted to answer the questions as below:

  • Enter current password for root (enter for none): Just press the Enter
  • Set root password? [Y/n]: Y
  • New password: Enter your password
  • Re-enter new password: Repeat your password
  • Remove anonymous users? [Y/n]: Y
  • Disallow root login remotely? [Y/n]: Y
  • Remove test database and access to it? [Y/n]:  Y
  • Reload privilege tables now? [Y/n]:  Y

Now, Restart the MariaDB server using below command:

sudo systemctl restart mariadb.service

For check if MariaDB is installed or Not, run the command below:

sudo systemctl status mariadb.service

Step 3 : Install PHP 7.4 and Related Modules

For install PHP 7.4, you will need to get it from third-party repositories because PHP 7.4 not includes in Ubuntu default repositories. Simply run the command below to add the third party repository:

sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php

Now update and upgrade to PHP 7.4 by using command below:

sudo apt update

Next, run the commands below to install PHP 7.4 and its related modules:

sudo apt install php7.4 libapache2-mod-php7.4 php7.4-common php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-xml php7.4-cli php7.4-zip imagemagick php-imagick php7.4-bz2 php7.4-bcmath php7.4-gmp

After finished installing of PHP 7.4 and its related modules, run the command below to open PHP default config file for Apache server:

sudo nano /etc/php/7.4/apache2/php.ini

After open the configuration file, Changes the following below lines in the default configuration file and save it:

file_uploads = On
allow_url_fopen = On
short_open_tag = On
memory_limit = 256M
upload_max_filesize = 100M
max_execution_time = 360
date.timezone = America/Chicago

Step 4: Create ProjectSend Database

To create ProjectSend database, first you will need to create a blank ProjectSend database. Simply run the command below to logon to MariaDB database server:

sudo mysql -u root -p

Next, create a database named projectsend using command below:

CREATE DATABASE projectsend;

Now, run the command below to create a database user named projectsenduser :

CREATE USER 'projectsenduser'@'localhost' IDENTIFIED BY 'your_new_password';

Grant the newly created database user to the database by using command below:

GRANT ALL ON projectsend.* TO 'projectsenduser'@'localhost' WITH GRANT OPTION;

Next, save your changes and exit:

FLUSH PRIVILEGES;
EXIT;

Step 5 : Download and Install ProjectSend

You can download ProjectSend package from its official download page or you can download it using command line.

To download it using command line, run the commands below:

cd /tmp
sudo wget -O projectsend.zip https://www.projectsend.org/download/387/
sudo mkdir -p /var/www/projectsend
sudo unzip projectsend.zip -d /var/www/projectsend/

Next, you will need to create ProjectSend configuration file using the command below:

sudo cp /var/www/projectsend/includes/sys.config.sample.php /var/www/projectsend/sys.config.php

Now, run the commands below to open newly created configuration file:

sudo nano /var/www/projectsend/sys.config.php

After open the configuration file, make the following below highlighted changes in the default configuration file:

/**
 Database driver to use with PDO.
 Possible options: mysql, mssql
 */
 define('DB_DRIVER', 'mysql'); 
 /** Database name */
 define('DB_NAME', 'projectsend');
 /** Database host (in most cases it's localhost) */
 define('DB_HOST', 'localhost');
 /** Database username (must be assigned to the database) */
 define('DB_USER', 'projectsenduser');
 /** Database password */
 define('DB_PASSWORD', 'enter_database_user_password');
 /**

Save the configuration file and exit.

Next, you will need to change the root folder permissions. To do that, run the command below:

sudo chown -R www-data:www-data /var/www/projectsend/
sudo chmod -R 755 /var/www/projectsend/

Step 6 :  Configure Apache for ProjectSend Site

To configure Apache for ProjectSend site, you will need to create a new configuration file named projectsend.conf. To do that, run the commands below:

sudo nano /etc/apache2/sites-available/projectsend.conf

After create configuration file, copy and paste the below content into the configuration file and save it. Replace the highlighted line with your own domain name and directory root location:

<VirtualHost *:80>
     ServerAdmin admin@example.com
     DocumentRoot /var/www/projectsend
     ServerName example.com
     ServerAlias www.example.com

     <Directory /var/www/projectsend/>
        Options +FollowSymlinks
        AllowOverride All
        Require all granted
     </Directory>

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined

</VirtualHost>

Save the configuration file and exit.

After that, run the command below to enable VirtualHost:

sudo a2ensite projectsend.conf 
sudo a2enmod rewrite 

Next, restart the Apache using command below:

sudo systemctl restart apache2.service

Now open your favorite web browser and browse to the server domain name http://example.com.

http://example.com

It will open the ProjectSend setup wizard screen as show below:

ProjectSend step

At the setup wizard screen, enter the database name, database username and password and continue.


That’s all

If you face any error and issue in above steps , please use comment box below to report.

If our tutorials helped you, please consider buying us a coffee. We appreciate your support!

Thank you for your support.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Scroll to Top