Setting Up a New DaDesktop Server

Deploying DD Node on GTHost / Hetzner Infrastructure

The following guidelines assist in deploying a DaDesktop Node (Server) on GTHost, Hetzner, or comparable bare-metal Linux servers. Please note that these instructions are subject to change as the installation and deployment scripts evolve.


This process assumes a server has already been acquired and is prepared for an Ubuntu Jammy 22.04 setup. Utilizing RAID0, or striping, can significantly enhance disk access speeds if sufficient storage is available across two or more drives. When using Hetzner, this configuration must be defined during the 'installimage' process while in Rescue mode.

OS Preparation and Installation for GTHost / Hetzner Servers

Hetzner install

  1. Begin by establishing an SSH connection using the provided root credentials. Execute 'apt update' and 'apt upgrade' to ensure all system packages are current. Subsequently, run 'apt autoremove' to eliminate obsolete packages prior to the upgrade.
  2. If you are using Hetzner, the system will boot into rescue mode. You must define distribution requirements, software RAID (mdm), xfs, and ipv4 settings before rebooting and upgrading. It is advisable to accept defaults for small /boot and /boot/esp partitions using ext4, avoiding xfs, and to omit a swap partition as it is unnecessary. The / partition should be formatted with xfs and utilize the remaining disk space.
  3. For LeaseWeb or other providers, the primary / filesystem must be changed from ext4 or btrfs to xfs. The notes below serve as a guide; however, configuring the / partition to use xfs is more complex than defining a separate /bigdisk. Filesystem changes must be performed outside the OS, as modifying the / filesystem type while it is mounted is not straightforward or safe.
  4. To create an xfs filesystem, prefer using the supplier’s tool if available, as it simplifies the process. Alternatively, from the rescue system, use commands such as:
    mkfs.xfs -f /dev/mdx (this formats / with xfs, using -f to force overwrite).
    Note: We no longer define /bigdisk as a separate partition; it is now simply a directory under /.
  5. Mount the xfs filesystem using 'mount -t xfs /dev/mdX /' outside the OS, or via the system portal.
  6. If using a /bigdisk partition (no longer standard practice), configure /etc/fstab with 'defaults,nofail 0 0' to ensure the system boots successfully even if the separate /bigdisk partition fails to mount.
  7. Execute 'systemctl daemon-reload' to allow systemd to recognize changes in /etc/fstab.
  8. Run 'mount -a' to verify that partitions are created as required, and confirm with 'df -T'.
  9. Reboot the system.

Executing the DaDesktop Installation Script

  1. SSH into the server, for example, svr@xxxxxxxxx.
  2. Proceed with the installation using the DaDesktop install script.
  3. Execute: curl http://npg.io/d > d
  4. At this stage, the underlying OS should be upgraded from 22.04 to the latest Ubuntu version, currently Ubuntu 23.10 Mantic, with Ubuntu 24.04 Noble expected soon.
  5. This upgrade is best performed using the 'update-os' script located in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This approach is more efficient than manual distro upgrades and automatically replaces apt sources from jammy to mantic (or noble), allowing the upgrade to complete in a single procedure. Note: Although skipping an intermediate release is typically discouraged, it is safe here due to the minimal number of installed packages.
  6. If DNS issues arise during the distro upgrade, resolve them by executing:
    rm /etc/resolv.conf ; echo "nameserver 8.8.8.8" > /etc/resolv.conf
  7. Optionally, set a specific hostname, such as lo33uk.npg.io, if you intend to use a previously configured DD node name. Reboot if necessary to apply the hostname change.
  8. Next, run the main script to install the DD Node. To prevent potential SSH disconnections during the upgrade, consider using tmux. Within the directory where the script was downloaded, execute 'bash d'.
  9. Monitor the logged messages for any errors. During the script execution, the server IP is added to the NP access list. This process is automatic, but you may need to wait a few minutes for the whitelist cron to update before proceeding.
  10. Review script progress and address or report any issues that arise.
  11. Run the cleanup script located at /apps/dadesktop_npnode_deploy/modules/00-cleanup. This removes unused packages and downgrades others as needed.
  12. Execute /apps/zabbix-agent/services/test-all.sh to identify any further issues.
  13. For any unmaintained packages, remove them using 'apt purge xxx, yyy'. Also, remove any broken links identified.
  14. Finally, reboot the system and test its operation.

Post-Installation Testing of the DD Node

  1. Verify the new dd server entry and test with TPAPI, etc., within the DaDesktop GUI.
  2. Add start and expiry dates for the server in DaDesktop and register it with the datacenter if required.
  3. Monitor the new server’s operation in Zabbix and resolve any issues if necessary.
  4. Test the server by adding a Standalone instance and running it.
  5. Add the server to the Datacenter if required.
  6. Optionally, add Billing rules for the new server if applicable.
  7. Copy Operating System templates to the server if needed.
  8. If this server is designated for a specific course, alert the Trainer/Coordinator to utilize this particular instance.

Enjoy !