Cloudlog is a web-based amateur radio logbook server that allows you to log, search, and manage your QSOs (contacts) from anywhere in the world over the internet. In this tutorial, we will show you how to install Cloudlog on NixOS Latest.
Before we get started with the installation process, make sure that you have the following prerequisites:
Follow the steps below to install Cloudlog on NixOS Latest:
Open your terminal and run the following commands to install the required dependencies for Cloudlog:
$ sudo nix-shell -p git php phpPackages.mysql phpPackages.pdo_mysql phpPackages.xml phpPackages.zip phpPackages.iconv
Next, clone the Cloudlog repository into your desired location. For example, you can clone it into the /var/www
directory by running the following command:
$ sudo git clone https://github.com/magicbug/Cloudlog.git /var/www/cloudlog
Composer is a package manager for PHP that will manage the dependencies required by Cloudlog. Install composer by running the following commands:
$ cd /var/www/cloudlog
$ sudo curl -sS https://getcomposer.org/installer | php
$ sudo mv composer.phar /usr/local/bin/composer
Run the following command to install the dependencies required by Cloudlog:
$ sudo composer install
Cloudlog requires a MySQL database to function properly. Create a new MySQL user and database for Cloudlog by running the following commands:
$ sudo mysql -u root -p
Enter your MySQL root password and run the following commands to create a new database and user:
CREATE DATABASE cloudlog;
CREATE USER 'cloudlog'@'localhost' IDENTIFIED BY 'your-password';
GRANT ALL PRIVILEGES ON cloudlog.* TO 'cloudlog'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
Replace your-password
with a strong password for the new database user.
Rename the file config.php.template to config.php, then edit it:
$ cd /var/www/cloudlog/application/config/
$ sudo cp config.php.template config.php
$ sudo nano config.php
In the database section, update the database name, username, and password to match the one you created in step 5:
'database' => 'cloudlog',
'username' => 'cloudlog',
'password' => 'your-password',
Save the file and exit.
You can use any web server to host Cloudlog. In this example, we will use Nginx.
Create a new Nginx configuration file /etc/nginx/sites-available/cloudlog
:
$ sudo nano /etc/nginx/sites-available/cloudlog
Add the following content to the file:
server {
listen 80;
server_name localhost;
root /var/www/cloudlog;
location / {
index index.php;
try_files $uri $uri/ /index.php?$query_string;
}
location ~* \.(jpg|jpeg|png|gif|swf|flv|ico)$ {
expires max;
log_not_found off;
access_log off;
}
location ~ \.php$ {
fastcgi_pass unix:/run/php-fpm/php-fpm.sock;
fastcgi_index index.php;
include fastcgi_params;
fastcgi_param SCRIPT_FILENAME $document_root/$fastcgi_script_name;
fastcgi_param APPLICATION_ENV development;
}
}
Save the file and exit.
Create a symbolic link for the site configuration file in the sites-enabled
directory:
$ sudo ln -s /etc/nginx/sites-available/cloudlog /etc/nginx/sites-enabled/
Test the Nginx configuration and restart Nginx to apply the new configuration:
$ sudo nginx -t
$ sudo systemctl restart nginx
Open your web browser and go to http://<server-ip>/cloudlog
to access Cloudlog.
Congratulations! You have successfully installed Cloudlog on NixOS 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!