Cloudlog

Cloudlog is an open source amateur radio logbook tool written in PHP and distributed under the MIT License. It is developed by Peter Goodhall 2M0SQL.


Note

For this guide you should be familiar with the basic concepts of

Prerequisites

We’re using PHP in the stable version 8.2:

[isabell@stardust ~]$ uberspace tools version use php 8.2
Selected PHP version 8.2
[isabell@stardust ~]$

Your log domain needs to be setup:

[isabell@stardust ~]$ uberspace web domain list
isabell.uber.space
[isabell@stardust ~]$

Installation

First, remove the default nocontent.html from your document root and delete the now empty html folder:

[isabell@stardust ~]$ rm /var/www/virtual/$USER/html/nocontent.html
[isabell@stardust ~]$ rmdir /var/www/virtual/$USER/html
[isabell@stardust ~]$

Now use git to clone the Cloudlog repo into a new html folder:

[isabell@stardust ~]$ git clone https://github.com/magicbug/Cloudlog.git /var/www/virtual/$USER/html/
Cloning into '/var/www/virtual/$USER/html'...
remote: Enumerating objects: 24402, done.
remote: Counting objects: 100% (370/370), done.
remote: Compressing objects: 100% (149/149), done.
remote: Total 24402 (delta 247), reused 320 (delta 219), pack-reused 24032
Receiving objects: 100% (24402/24402), 16.23 MiB | 23.31 MiB/s, done.
Resolving deltas: 100% (15879/15879), done.
[isabell@stardust ~]$

Set up a MySQL database for your Cloudlog installation:

[isabell@stardust ~]$ mysql -e "CREATE DATABASE ${USER}_cloudlog;"
[isabell@stardust ~]$

Configuration

Point your browser to Cloudlog’s setup wizard at https://<yourusername>.uber.space/install (in our example, this would be https://isabell.uber.space/install).

You’ll need your MySQL credentials. Get them with my_print_defaults:

[isabell@stardust ~]$ my_print_defaults client
--default-character-set=utf8mb4
--user=isabell
--password=MySuperSecretPassword
[isabell@stardust ~]$

Fill out the web form:

  1. Leave the Directory field blank.

  2. The Website URL field should already be pre-filled with your site’s URL, leave it as it is.

  3. Optional: Change the Default Gridsquare if you like.

For the Database settings, use

  1. The hostname localhost,

  2. Your Uberspace user name as Username,

  3. Your MySQL password as password.

  4. Enter the Database name you created in the previous step (in our example this would be isabell_cloudlog).

Once all the required information has been entered, click install. You should now be redirected to your Cloudlog’s home page. Log in with the default username m0abc and default password demo.

Now, you need to set up your own admin user and delete the default user:

  1. Open Admin -> User Accounts

  2. Create a new user.

In order to delete the default user, log out and then log in again with your newly created Cloudlog user. Then

  1. Open Admin -> User Accounts

  2. delete m0abc.

For security reasons, you should block web access to the .git directory. You can do so by setting an intentionally broken web backend:

[isabell@stardust ~]$ uberspace web backend set /.git --http --port 4711
Set backend for /.git to port 4711; please make sure something is listening!
You can always check the status of your backend using "uberspace web backend list".
[isabell@stardust ~]$

Prettier URLs

In order to hide index.php from your Cloudlog URLs, rename the provided .htaccess.sample to .htaccess:

[isabell@stardust ~]$ mv /var/www/virtual/$USER/html/.htaccess.sample /var/www/virtual/$USER/html/.htaccess
[isabell@stardust ~]$

Then open Cloudlog’s application/config/config.php in your favourite editor and find the line

$config['index_page'] = 'index.php';

and change it to

$config['index_page'] = '';

Updates

The Cloudlog documentation suggests a daily Cronjob to perform the git pull command to update the code. Run crontab -e to edit your Crontab and add the following line:

@daily cd /var/www/virtual/$USER/html && git pull

Tested with Cloudlog 2.5.2, Uberspace 7.15.6, and PHP 8.2

Written by: Nico Graf DO2NG <hallo@uberspace.de>