This tutorial is tailored for intermediate IT administrators or full-stack developers seeking guidance on setting up and publishing websites.
We will learn how to setup and configure:


To embark on this Tiki Tutorial, familiarity with shell usage and a basic understanding of server operations is recommended. However, don't hesitate to dive in and learn along the way as long as you're not working with real data initially, in most cases you have the flexibility to terminate and reinstall instances until you successfully configure your Tiki setup.

If experimentation isn't your preference, or if your time is limited and you're in a rush, you can always opt to have someone else handle the setup for you. You can hire me to do it for you or explore the the Tiki Consultants list. Rest assured, with a Tiki Specialist handling the task, you'll receive a professional job well done. 😉

Checking Hostname

To ensure smooth operation of VirtualMin/Webmin, it's essential to configure the hostname and Fully Qualified Domain Name (FQDN) directly on the server.

Once logged in your server through SSH use the following command.

Copy to clipboard
hostnamectl


If the output shows your FQDN you are good to go to the next step (Installing Virtualmin) else we need to edit 2 configuration files to fix the issue.

Enter the following command:

Copy to clipboard
hostname

By default it will display the instance internal IP (later on Virtualmin won’t like it) and it should display your hostname mostly your domain name like "mydomain" (without http or https)

If this is not the case, you need to change this and set it for your host name (yourdomain.com)
It is then common your server will be able to auto-generate the hostname.
Check the host file and if it show your Fully Qualified Domain Name (FQDN).

Copy to clipboard
cat /etc/hosts


If you see it, you are good to go to the next step, installing VirtualMin else check options below.

You need also to check and add your host to the hosts file if your providing company didn't set it right.
But if you do it directly (editing /etc/hosts) the changes will be reverted on the next reboot.
To make it permanent, you need to modify the template used to recreate on each reboot the hosts file.

Some instance may use a Cloud configuration file other may use a Debian host file.
You will find useful information in the top comments of /etc/hosts
If the file start with: "Your system has configured 'manage_etc_hosts' as True.", it means your server is using cloud-init and you need to change the value of "preserve_hostname" to true at /etc/cloud/cloud.cfg

Edit hosts.debian.tmpl
Copy to clipboard
nano /etc/cloud/cloud.cfg preserve_hostname: true


Reboot the server and check changes are permanent.

Upgrade your Debian OS

Assuming you've been provided with root access and SSH information, enabling you to connect via password or SSH Key, let's begin by ensuring our instance is up-to-date.

We want to work on the last version of the dozens of software and library your server will depend on. Log onto your server and update/upgrade it with the following commands:

Copy to clipboard
apt update apt upgrade

Install Webmin and Virtualmin

Virtualmin will install everything you need and it is critical the installation of Virtualmin comes first.
Else you will be warned previous tools or libraries have been installed and sometimes it means you will have to clean them manually before proceding.

We will download Virtualmin automated install script and run it. It is basically a shell script that will handle rest of the installation once executed.

Download Virtualmin install script
Copy to clipboard
wget https://software.virtualmin.com/gpl/scripts/install.sh

You can do a full install but also you can do a minimal install which will spare the instance resources. For exemple where I don't need a mail server I do minimal install.

Full install of Virtualmin
Copy to clipboard
sh install.sh
Minimal install of Virtualmin
Copy to clipboard
sh install.sh --minimal


You should see now the different components being installed one by one.
This is taking some times... Just wait for the process to complete.

It should end with:
"SUCCESS to configure at https://xxx-xxx-xxx-xxx:10000 (or https://yourFQDN:10000)."
You should be ready to login to your Virtualmin panel using your root access if your firewall is set correctly.
It happens your hosting services open only certain ports by default like 80,443,22. For virtualmin you need to also open port 10000.

Virtualmin setup and post-installation optional features.

Once you login your Virtualmin HTMLM front end (trust the SSL certificate if needed).
Follow Virtualmin Post installation wizard.
It is pretty straightforward and everything is done to guide you.

It is ok to use default proposed settings.
Of course we will keep for Tiki Wiki "Run MariaDB database server?" on yes.
You will then set the MariaDB root password, enter it and save it somewhere if needed later.
All the rest will be very simple and personally I use the default or suggested options.

Password storage mode
I don't want to store in clear the passwords used on the server so I select "Only store hashed passwords".
One drawback is that you can't view again a password once set. So each time you create a password you will note it in your password storage application.

MariaDB configuration size
This depend of your usage of the Tiki Wiki instance of course but assuming we are on the smallest LightSail plan we are setting a small instance.
I follow the suggested option: "Small system with 1G of RAM with infrequent MariaDB use"
If needed later I can change this setting.

Location for SSL certificates
Unless you know what you do keep the default.

The next question is... a trap ! 🤗
Setup default virtual server?

If you don't create a default Virtual Server, Virtualmin may load with errors (like: missing postfix maps) so you can solve them later by creating at least one Virtual Server or create one during the installation process and restart Virtualmin (a reboot never hurt once all is set you check things are starting as they should).

If you create one you won't be able to set a few parameters. (SSH key for exemple).
I choose to answer "no" so I can set manually all the parameters for my domain.

Create your first Virtual Server (your website)

Set your domain name.

The credential... I experienced issues creating a password without SSH public key and I experienced adding an SSH public key without password.
Therefor I'm creating a user password that will be require in a few cases and I add my SSH public key for day to day operation.

In some cases (temporary domain name) I set my "Administration username" and set the "Default database name" with something like "thiswebsite_tiki26" as I like to keep track of the Tiki used for a database. (I don't keep the same db from Tiki to Tiki I clone them)

I keep the features as is but disable "Accept mail for domain" if I don't want to use mail for this domain.

By default your Virtual Server will be limited to the default plan.
While this is enough if you install a Tiki package, you may need more memory to run composer.
Adjust the quota at Edit Virtual Server => Quotas and limits.

Install Let's encrypt certificate

To complete properly, return to the Virtual Server List, select your Virtual Server and on the left menu under "Server Configuration", "SSL Certificate" and select the tab "Let's Encrypt".
On the form "Request certificate for" use "Domain names listed here " field and set the domains for whom you will need a certificate. Keep the "Automatically renew certificate?" option to yes and click on the button "Request Certificate".

You need first to use your domain name set it at the registrar properly.
Under Virtualmin => Server Configuration => SSL Certificate click on the "Let's Encrypt" tab and request certificate.
Note that by default Virtualmin want to setup several automatically domains the "Domains associated with this server" list. You may not have set all of them and the process will verify them and fail if they are not accessible. I usually set manually "Domain names listed here" list and Install the certificates only for the domains I'm using.

Checking servers running

On your dashboard you have a panel where you can check servers status. We can see the PHP version running and we need to look (again) at the mail and mailbox application.
Keep Postfix running that is useful for sending email from apps or system notifications.
You can turn off Dovecot that do not need to be running on a system that is not receiving or processing mail.
But this will not be permanent. To make it permanent, on the left menu click on "Webmin", "System" and "Bootup and Shutdown".
Select anything "Dovecot" and at the bottom of the page click on "Disable On Boot".
(it is a good idea to enable fail2ban and a firewall 😉)

Install several versions of PHP

The following information was valid at the time I wrote this tutorial

Debian 12 comes with PHP8.2 a version that may or may not fit your needs.
As I want to use PHP8.1 I have to set it on the server.

{FADE(label="Adding PHP8.1 from the sury repository" icon="y")
I enabled the sury.org repository and update the package list:

apt install -y lsb-release ca-certificates apt-transport-https software-properties-common gnupg2
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" | sudo tee /etc/apt/sources.list.d/sury-php.list
curl -fsSL https://packages.sury.org/php/apt.gpg| sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/sury-keyring.gpg
apt update
{CODE}

If you run right away +-apt upgrade+- it will upgrade and install PHP8.3.
Something you don't necessary want. As I prefer to install only PHP8.1 to start with I entered in the prompt of my terminal the following:

Copy to clipboard
apt-get install php8.1 php8.1-cgi php8.1-cli php8.1-fpm php8.1-mysql php8.1-xml php8.1-gd php8.1-intl php8.1-xsl php8.1-curl php8.1-zip php8.1-mbstring php8.1-bcmath


You can configure which one is the default PHP version used on your new Virtual Servers. You can change that default in System Settings -> Server Templates -> Default -> PHP Options. To set your host or domain PHP version go to Virtualmin -> Server configuration -> PHP version and on that screen you can set the PHP version for your domain.
{FADE}

Don't forget that anyway you have to install a few additional libraries and they should be accessible to complete the setup.
That's why these have been added above but you can also add them for your other PHP versions

Copy to clipboard
apt-get install php8.2-gd php8.2-intl php8.2-curl php8.2-zip php8.2-bcmath

Installing Tiki from Tiki repo (anonymous)

Navigate into your html directory. If you don’t know where it is located on your new server on Virtualmin check the Virtual Server Summary.
There is at https://tiki.org a complete installation guide
But in short, I use the git clone command to download Tiki. In my case I needed Tiki branch (version) 24.x without previous history (depth=1)

Download Tiki from the git repo
Copy to clipboard
git clone --depth=1 --branch=26.x https://gitlab.com/tikiwiki/tiki.git .

Installing Tiki using ssh (your repo)

To use the SSH key used on your Gitlab account you need to create a config file at your_home/.ssh
For exemple bsfez/.ssh copy the following inside "config" file.

Content of the ssh config file
Copy to clipboard
# GitLab.com Host gitlab.com # User git PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa

Replace "id_rsa" with your SSH key file and set ownership to your virtual server user and permission to 400 (chmod).

Navigate into your html directory (public_html). If you don’t know where it is located on your new server on Virtualmin check the Virtual Server Summary.
There is at https://tiki.org a complete installation guide

Download Tiki from your git repo
Copy to clipboard
git clone --branch=your_branch --depth=1 git@gitlab.com:bsfez/your_repo .


It happen that for the first download you have to point your key file. 🤷🏻‍♂️
You can do it using the following command. (again replace "id_rsa" with you key filename)

Download Tiki from your git repo
Copy to clipboard
git clone --branch=your_branch --depth=1 git@gitlab.com:bsfez/your_repo --config core.sshCommand="ssh -i ../.ssh/id_rsa" .


Then it is required to run tiki setup to install Composer files and fix the files and directories permissions.
I want to run PHP8.1 (I have several PHP version installed) so I add the path.

Tiki setup to run php8.1
Copy to clipboard
sh setup.sh -p /usr/bin/php8.1


From here follow the regular Tiki install process (setup.sh (see additional notes below), database creation) and you have a Tiki ready to be installed !

Tiki Installed