Installing HumHub on Alpine Linux Latest

HumHub is a free and open-source social network portal built to be secure, fast, and extendable. This tutorial will guide you through the installation of HumHub on Alpine Linux Latest.

Prerequisites

  1. A running instance of Alpine Linux Latest.
  2. SSH access to the instance with root privileges.

Step 1: Install Required Dependencies

Begin by installing all required dependencies for HumHub.

$ apk update && apk upgrade
$ apk add nginx mysql-client mysql-server php7 php7-curl php7-gd php7-intl php7-json php7-mbstring php7-mysqlnd php7-openssl php7-pdo_mysql php7-session php7-xml php7-zip

Step 2: Install HumHub

  1. Download the latest HumHub archive from the official website.
$ wget https://www.humhub.org/en/download/start?file=humhub-latest.zip
  1. Unzip the downloaded archive file.
$ unzip humhub-latest.zip -d /var/www/

Step 3: Configure Nginx

  1. Create a new file named humhub.conf in the /etc/nginx/conf.d/ directory.
$ nano /etc/nginx/conf.d/humhub.conf
  1. Paste the following configuration into the file.
server {
  listen 80;
  server_name example.com; # Change to your domain name
  root /var/www/humhub;
  index index.php;

  location / {
    try_files $uri $uri/ /index.php?$args;
  }

  location ~ .php$ {
    fastcgi_pass unix:/run/php/php7.0-fpm.sock;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
  }
}
  1. Save and close the file.

Step 4: Configure MySQL

  1. Start the MySQL service.
$ /etc/init.d/mysql start
  1. Log in to the MySQL shell.
$ mysql
  1. Create a new database for HumHub.
CREATE DATABASE humhubdb;
  1. Create a new user and grant it access to the HumHub database.
CREATE USER 'humhubuser'@'localhost' IDENTIFIED BY 'humhubpassword';
GRANT ALL PRIVILEGES ON humhubdb.* TO 'humhubuser'@'localhost';
FLUSH PRIVILEGES;
  1. Exit the MySQL shell.
exit;

Step 5: Configure HumHub

  1. Edit the protected/config/common.php file.
$ nano /var/www/humhub/protected/config/common.php
  1. Modify the following lines as per your configuration.
return [
  'params' => [
    'installer' => [
      'db' => [
        'class' => 'yii\db\Connection',
        'dsn' => 'mysql:host=localhost;dbname=humhubdb',
        'username' => 'humhubuser',
        'password' => 'humhubpassword',
        'charset' => 'utf8',
      ],
      'timestapServer' => 'local', # Change to your timestamp server
      'baseUrl' => null, # Change to your site URL
    ],
  ],
];
  1. Save and close the file.

Step 6: Start Services

  1. Start the Nginx service.
$ /etc/init.d/nginx start
  1. Start the PHP-FPM service.
$ /etc/init.d/php-fpm7 start

Step 7: Complete Installation

  1. Open your web browser and navigate to your site URL.

  2. Follow the instructions on the installation wizard to complete the installation.

Congratulations! You have successfully installed HumHub on Alpine Linux 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!