Install via Cloud Init

A preconfigured TopLogic server for pure in-app development can be set up with any cloud provider via Cloud-Init. To do this, select a server template with Ubuntu operating system according to the system requirements and add the following cloud init script to the installation:

#cloud-config

apt:
  primary:
    - arches: [default]
      uri: "mirror://mirrors.ubuntu.com/mirrors.txt"
  sources:
    toplogic.list:
      source: "deb https://dev.top-logic.com/nexus/repository/toplogic-deb/ toplogic main"
      keyid: 955A22FF7750F043EA48E580B44EB751B8A3726C
      filename: toplogic.list

packages:
  - fail2ban
  - ufw
  - tomcat9
  - apache2
  - certbot
  - python3-certbot-apache
  - prometheus
  - curl
  - msmtp
  - mailutils
  - mariadb-server
  - mariadb-client
  - libmariadb-java
  - apg
  - net-tools
  - tl-process

package_update: true
package_upgrade: false

runcmd:
  - update-alternatives --set ip6tables /usr/sbin/ip6tables-nft
  - printf "[sshd]\nenabled = true\nbanaction = iptables-multiport" > /etc/fail2ban/jail.local
  - systemctl enable fail2ban
  - ufw allow OpenSSH
  - ufw allow https
  - ufw allow http
  - ufw enable
  - sed -i -e '/^PasswordAuthentication/s/^.*$/PasswordAuthentication no/' /etc/ssh/sshd_config
  - sed -i -e '/^ServerTokens/s/^.*$/ServerTokens Prod/' /etc/apache2/conf-enabled/security.conf
  - sed -i -e '/^ServerSignature/s/^.*$/ServerSignature Off/' /etc/apache2/conf-enabled/security.conf
  - reboot

The system set up in this way uses Tomcat 9 as the application container, MariaDB as the database and an Apache web server as the proxy. After installation, the system is directly accessible on port 80 (HTTP).

A domain name for the computer and a suitable certificate for HTTPS may still need to be set up separately and is strongly recommended for secure communication with the cloud instance. This can be done easily and free of charge via CertBot.

Log-in to the application

After successful installation, log-in to the TopLogic web interface is possible via http://<ip-adresse-der-cloud-instanz>/. A secure initial password was automatically assigned and written to the application log at the end of the startup process. It can be looked up with the following command (up to version 7.6.0, the initial password was fixed as root1234). For this a login into the started container is necessary. This can usually be done via the web interface of the cloud provider:

grep -n3 " Initial password " /var/log/tomcat9/catalina.out

The output could look as follows:

966-[2023-10-25 13:58:47] [info] *****************************************************
967-[2023-10-25 13:58:47] [info] ***                                               ***
968:[2023-10-25 13:58:47] [info] ***  Initial password for 'root': 702d104d-4f...  ***
969-[2023-10-25 13:58:47] [info] ***                                               ***
970-[2023-10-25 13:58:47] [info] *****************************************************

At this point, the TopLogic tutorial can now be started.

Updating the installation

An update of the TopLogic version is possible via Apt. To do this, you have to log into the server (e.g. via SSH) and then enter the following commands:

sudo apt-get update
sudo apt-get upgrade