-
-
Notifications
You must be signed in to change notification settings - Fork 190
Installation
This page will guide you through the steps required to install Cloudlog onto a Linux web server that is using the LAMP stack (that's Linux, Apache, MySQL, and PHP). The specifics of your server setup can be largely up to you as there are various Linux distributions, for example. This guide will focus on Debian / Ubuntu so instructions given here may not apply to other distributions.
- Any modern Linux installation capable of supporting the other prerequisities.
- Web server (e.g. Apache >= 2.4 or nginx)
- MySQL or MariaDB
-
PHP <= 8.2 plus modules:
- php-curl
- php-mbstring
- php-mysql
- php-xml
Installing a suitable operating system, database server and web server are tasks that are outside the scope of this guide but there are plenty of resources to help you get started. Have a look at these guides from Linode to set up either Debian or Ubuntu LTS.
Once you have your LAMP stack installed, make sure that the required PHP modules are available as not all will be installed by default:
sudo apt-get install php7.3 php7.3-curl php7.3-mysql php7.3-mbstring php7.3-xml php7.3-openssl
You should replace the version number in the above command using the highest version number provided by your distribution and matching the installed version of PHP. Use php -v
to check the installed version.
Note 1: If your Linux distribution only has module packages for older sub-versions, and you get an error using the command above, try using "7.0" as the version instead of a specific sub-version.
Note 2: Recent releases of Ubuntu - such as Ubuntu Server 20.04 LTS - no longer provide the php7.x-openssl package. In this case the OpenSSL functionality is compiled into the core PHP component already. You can confirm whether support is present after PHP installation using php -i | grep -i openssl
. Look for Native OpenSSL support => enabled
in the output.
Note 3: If you use nginx as web server you will need to make sure that the PHP handler does serve .php correctly and not only if the address ends on .php
. See this issue. The basic change in the config is (remove the dollar sign):
# pass PHP scripts to FastCGI server
#
- location ~ \.php$ {
+ location ~ \.php {
For ease of installation and updating, it's recommended to acquire the Cloudlog application files using Git. Git is most likely installed already on your Linux distribution. If not, use sudo apt-get install git
to obtain it.
The git clone
command is used to fetch the latest build of Cloudlog from the repository on GitHub. This command downloads the application files in their current state on the master branch:
git clone https://github.com/magicbug/Cloudlog.git [output_directory]
Replace output_directory with the full path to the directory where you'd like the application files to be created locally (don't include the square brackets). For example, if you configured Apache with a site that uses _/var/www/html as its DocumentRoot directory then the command becomes git clone https://github.com/magicbug/Cloudlog.git /var/www/html
. Have a look at the Apache documentation for more information on site configuration.
During normal operation, Cloudlog will need to write to certain files and directories within the root Cloudlog directory (i.e. where you extracted the files in the previous step). You'll need to set the permissions and ownership on these directories appropriately.
The following folders need to be writable by PHP:
- /application/config/
- /application/logs/
- /backup/
- /updates/
- /uploads/
- /images/eqsl_card_images/
/var/www/html
in the below commands with the appropriate directory if you cloned the Git repository somewhere else in the previous step!
First, set ownership using:
sudo chown -R root:www-data /var/www/html/application/config/
sudo chown -R root:www-data /var/www/html/application/logs/
sudo chown -R root:www-data /var/www/html/assets/qslcard/
sudo chown -R root:www-data /var/www/html/backup/
sudo chown -R root:www-data /var/www/html/updates/
sudo chown -R root:www-data /var/www/html/uploads/
sudo chown -R root:www-data /var/www/html/images/eqsl_card_images/
sudo chown -R root:www-data /var/www/html/assets/json/
sudo chown -R root:www-data /var/www/html/assets/sstvimages/
Then grant write permissions on these directories to the group:
sudo chmod -R g+rw /var/www/html/application/config/
sudo chmod -R g+rw /var/www/html/application/logs/
sudo chmod -R g+rw /var/www/html/assets/qslcard/
sudo chmod -R g+rw /var/www/html/backup/
sudo chmod -R g+rw /var/www/html/updates/
sudo chmod -R g+rw /var/www/html/uploads/
sudo chmod -R g+rw /var/www/html/images/eqsl_card_images/
sudo chmod -R g+rw /var/www/html/assets/json/
sudo chmod -R g+rw /var/www/html/assets/sstvimages/
More info about granting PHP write permissions can be read here
Cloudlog needs a MySQL database to store application and user settings, along with user data such as logbooks.
The basic steps for creating a blank database are very similar for both MySQL and MariaDB - we'll cover those here - but the specific steps relating to securing your database and server will differ. As with the Apache configuration, those latter steps are outside the scope of this guide but you can refer to the MariaDB documentation or the MySQL documentation as a starting point.
Let's start by using the mysql
command to connect as the root user. If your server is already configured for something else then you may have another user configured with the ability to create databases - you can substitute that username if so. Read more about connecting with the mysql
client in the MySQL documentation.
sudo mysql -u root -p
Note: The mysql
tool has the same name in both the MySQL and MariaDB packages.
Now issue the following command to create a database for Cloudlog, replacing db_name
with a name of your choice. Note this name down as you'll need it later for the Cloudlog install wizard.
CREATE DATABASE db_name;
Next, create a user and grant it privileges on the Cloudlog database. Creating a new user is optional if you already have a valid non-root user on the MySQL/MariaDB server. Remember to again replace db_name
with the name you chose previously for the database, user1
with the name of the user to create and password1
with a real, strong password! Keep the username and password safe as you'll need these for the Cloudlog install wizard later.
CREATE USER 'user1'@localhost IDENTIFIED BY 'password1';
GRANT ALL PRIVILEGES ON db_name.* TO 'user1'@'localhost';
QUIT
You need to run the install wizard. At this point, please open <url-to-cloudlog>/install
and follow the guide.
The directory field needs to be empty if you extracted or cloned Cloudlog directly to the web server's root directory (e.g. /var/www/html). If you used a sub directory like /var/www/html/cloudlog you need to set the realtive path /cloudlog in the directory field.
When you have completed the install wizard, do the following:
-
Log in with username m0abc and password demo
-
Create a new admin account (Admin Dropdown) and delete the demo account
-
Update Country Files (Admin Dropdown)
-
Create a station profile (Admin Dropdown) and set it as active
-
If you want to know if the person you're working uses LoTW, run:
https://<URL-To-Cloudlog>/index.php/lotw/load_users
. This is the initial run, but we'll run this every week from cron momentarily.
Create a bash file on the command line with nano cloudlog.sh
, or your preferred editor.
Paste the following into the new file:
#!/bin/bash
cd <Full-Path-To-Cloudlog-Folder> && git pull
# Uncomment the following lines if you need to restore owner and group after git pull completes
# This assumes a Debian-style installation using the www-data group.
# Change the group name if required for your distro.
#chown -R root:www-data <Full-Path-To-Cloudlog-Folder>/application/config/
#chown -R root:www-data <Full-Path-To-Cloudlog-Folder>/backup/
#chown -R root:www-data <Full-Path-To-Cloudlog-Folder>/updates/
#chown -R root:www-data <Full-Path-To-Cloudlog-Folder>/uploads/
#chown -R root:www-data <Full-Path-To-Cloudlog-Folder>/images/eqsl_card_images/
The full path should be an absolute path, relative to the root filesystem. Do not enter a relative path here.
Allow the bash file to be executed:
chmod +x cloudlog.sh
You can test it with ./cloudlog.sh
You can use cron jobs to automate some of the regular Cloudlog maintenance tasks. See Recommended Cron Jobs for instructions.
Cloudloug supports either the QRZ or HamQTH for callbook data lookups you can set this up by going to your account settings (Click your callsign top right and then account) under third party logins.
- Installation on Linux server
- Installation on Windows server
- Updating Cloudlog
- Hints & Tips
- cloudlog.php Config
- API
- Station Locations
- Radio Interface
- ADIF Import / Export
- Logbook of The World
- eQSL
- Print Requested QSLs
- Clublog Upload
- QRZ Logbook
- KML Export