Elkarbackup is an open source backup software that allows you to backup your files and folders to a central server. In this tutorial, we will go through the steps to install Elkarbackup on Ubuntu Server Latest.
Before we begin, make sure you have the following:
Before installing Elkarbackup, we need to install some dependencies.
sudo apt-get update
sudo apt-get install -y git php php-mbstring php-xml php-zip php-curl php7.4-mbstring php7.4-zip php7.4-gd php7.4-xml php7.4-curl php7.4-json php7.4-mysql mysql-server-5.7
During the installation process for MySQL server, you will be prompted to set a root password. Remember this password, as we will need it later.
Now we need to download Elkarbackup from its Github repository:
cd /opt
sudo git clone https://github.com/elkarbackup/elkarbackup.git
We need to create a new MySQL database and user for Elkarbackup. Login to MySQL with the root password you set earlier.
mysql -u root -p
Create a new database and user:
CREATE DATABASE elkarbackup;
CREATE USER 'elkarbackup'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON elkarbackup.* TO 'elkarbackup'@'localhost';
FLUSH PRIVILEGES;
exit
Replace password
with a strong password you will remember.
Create a new virtual host configuration for Elkarbackup. Create a new file at /etc/apache2/sites-available/elkarbackup.conf
with the following content:
<VirtualHost *:80>
DocumentRoot /opt/elkarbackup/public
ServerName backup.example.com
<Directory "/opt/elkarbackup/public">
AllowOverride All
Require all granted
</Directory>
# SSL configuration
#Enable if you want to use https
#SSLEngine on
#SSLCertificateFile /etc/letsencrypt/live/backup.example.com/fullchain.pem
#SSLCertificateKeyFile /etc/letsencrypt/live/backup.example.com/privkey.pem
</VirtualHost>
Replace backup.example.com
with your domain name or server IP address. If you want to enable SSL, uncomment the SSL
configuration lines and replace the paths with your own SSL certificates.
Enable the new virtual host:
sudo a2ensite elkarbackup.conf
And restart Apache:
sudo systemctl restart apache2
We need to configure Elkarbackup to use our database and SMTP server. Copy the sample configuration file:
cd /opt/elkarbackup
sudo cp config.sample.php config.php
Edit the configuration file:
sudo nano config.php
And modify the following lines:
// Database configuration
define('DBNAME', 'elkarbackup');
define('DBUSER', 'elkarbackup');
define('DBPASS', 'password');
//SMTP configuration
define("SMTP_HOST", "smtp.gmail.com"); // SMTP server
define("SMTP_USER", "email@gmail.com"); // SMTP account username
define("SMTP_PASSWORD", "yourpassword"); // SMTP account password
define("SMTP_PORT", 587); // SMTP port (TLS): 587 or 465 or SSL: 465
Replace password
with the password you set earlier. Also, replace email@gmail.com
and yourpassword
with your own SMTP account details.
Now we are ready to install Elkarbackup. Runt the following commands:
cd /opt/elkarbackup
sudo composer install
You will be prompted to enter various configuration settings during the installation process. Accept the default values for most settings, but specify the following:
elkarbackup
elkarbackup
password
(the password you set earlier)smtp.gmail.com
email@gmail.com
(your SMTP account username)yourpassword
(your SMTP account password)587
Elkarbackup should now be installed and ready to use. Open your web browser and go to http://backup.example.com
(replace backup.example.com
with your domain name or server IP address).
Log in with the default username and password: admin
/ admin
.
Congratulations! You have successfully installed Elkarbackup on Ubuntu Server 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!