Channel Apps
[Markdown] 

Hubzilla Installation auf uber.space: Home

Prerequisites¶

We’re using PHP in the stable version 8.2:

uberspace tools version use php 8.2 Selected PHP version 8.2 The new configuration is adapted immediately. Patch updates will be applied automatically.

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

my_print_defaults client --default-character-set=utf8mb4 --user=isabell --password=MySuperSecretPassword

Setup a new MySQL database for Hubzilla:

mysql -e "CREATE DATABASE ${USER}_hubzilla"

Your Hubzilla URL needs to be setup:

uberspace web domain list isabell.uber.space

Note

Hubzilla should be installed in a domain of its own (or in a subdomain), not in a subdirectory of a domain.

Make a decision now, because you are going to have to stick with it. Installation¶ Download the source¶

In order to simplify updates for Hubzilla and the needed addons, you can use the git repository instead of tarballs. If you want the bleeding edge, you could even switch your Hubzilla installation to the next pre-release or development version.

For this guide, we’ll use the stable branch of Hubzilla.

First, go one level above your DocumentRoot and use git clone to get the Hubzilla repository as well as the addons. Please note, that Hubzilla currently does not support composer v2, so you need to use composer v1, which is included in the git repository in the directory bin.

Creat supdomain

$ uberspace web domain add hub.USERNAME.uber.space

$ uberspace web domain list

Creat folder for installtion

$ cd /var/www/virtual/USERNAME/html/

$ mkdir hub

$ cd /var/www/virtual/USERNAME

Link subdomain zu folder

$ ln -s /var/www/virtual/USERNAME/html/hub hub.USERNAME.uber.space

install from repro

$ git clone https://framagit.org/hubzilla/core.git /var/www/virtual/USERNAME/html/hub

creat store folder

$ cd /var/www/virtual/USERNAME/html/hub

$ mkdir -p "store/[data]/smarty3"

$ chmod -R 777 store

$ install addons

$ util/add_addon_repo https://framagit.org/hubzilla/addons.git hzaddons

fix .htaccess for uber.space

$ nano /var/www/virtual/USERNAME/html/hub/.htaccess

RewriteRule ^(.*)$ /index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]

RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*)$ /index.php?q=$1 [E=REMOTE_USER:%{HTTP:Authorization},L,QSA]

finde the way to php

PHP-Pfad zu ausfĂĽhrbarer Datei

$ which php /usr/bin/php

Finishing installation¶

Point your browser to your uberspace URL or domain. It may take a while to load during this installation run.

Page 1 – System tests:

The first page shows some system tests, which should all be green.

Page 2 – Basic setup:

This includes things like SSL, the hostname, and the installation path. The automatically detected values should be correct, you should not need to change anything here.

Page 3 – Database Configuration: (my_print_defaults client)

    Database host: localhost  Datenbankservername   127.0.0.1

    Datenbankport  0

    Database User: USERNAME

    Database Password: yourMySQLPassword

    Database Name: db name

Page 4 – Server setup:

Enter an e-mail address for the Hubzilla site admin. You will register a user with this address later on, and that user will be granted admin rights for this Hubzilla installation. Also, you can set a default timezone and system language for Hubzilla.

After those setup steps, point your browser to the registration page (https://isabell.uber.space/register) and sign up with the same e-mail address that you’ve used in page 4 above. Configure your account basics¶

You should receive an e-mail with a provisional password. Log on using your nickname or email address and that password. Go to settings and change the provided password to one of your choice. Configure your site basics¶

Visit the site section of the admin menu to close registration access to your new site – this is a choice you can revise later. For a small site for a group of friends or a family, the best registration policy would be invite-only.

Go to the site section of the admin menu and enable searching for updates in the advanced settings. This way, you’ll be notified of available updates on the overview page of the admin menu.

If you’ve created a folder for uploaded files, go to the storage section of the admin menu and enter the storage file path into the textfield, e.g. /var/www/virtual/isabell/storage. Activate scheduled tasks¶

The background tasks need to be run every 5–10 minutes. For a small to medium site, an interval of 10 minutes is sufficient.

Add the following cronjob to your crontab to run the worker every 10 minutes:

export VISUAL='nano'

crontab -e

*/10 * * * * cd /var/www/virtual/USERNAME/html/hub; /usr/bin/php Zotlabs/Daemon/Master.php Cron > /dev/null 2>&1

crontab -l