Setting Up a New DaDesktop Server

Deploying a DD Node on GTHost / Hetzner Servers

The following guidelines assist in deploying a DaDesktop Node (Server) on bare metal Linux servers from providers such as GTHost or Hetzner. Please note that these instructions may evolve as installation and deployment scripts are updated.


It is assumed that the server has already been procured and will be configured with Ubuntu Jammy 22.04. For improved disk performance with two or more drives, consider using RAID0 (striping). If utilizing Hetzner, define this setup via the 'installimage' process while in Rescue mode.

Preparation and OS Installation for GTHost / Hetzner Servers

Hetzner install

  1. Begin by securing SSH access using the provided root credentials. Execute 'apt update' followed by 'apt upgrade' to ensure all packages are current. Subsequently, run 'apt autoremove' to eliminate obsolete packages prior to further upgrades.
  2. For Hetzner users, the system boots into rescue mode. You must specify distro requirements, software RAID settings (mdm, xfs, ipv4, etc.) before rebooting and upgrading. It is recommended to accept defaults for small /boot and /boot/esp partitions using ext4, avoiding xfs and swap partitions as they are unnecessary. Allow the root / partition to utilize xfs and consume the remaining disk space.
  3. When using LeaseWeb or similar providers, switch the main / filesystem from ext4 or btrfs to xfs. While the following notes serve as a guide, converting the / partition to xfs is more complex than simply assigning xfs to a dedicated /bigdisk partition. This is because modifying the / filesystem type requires actions outside the OS, as it cannot be safely changed while mounted.
  4. To create the xfs filesystem, prefer supplier tools if available, as they simplify the process. Alternatively, execute commands from the rescue system, 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 merely a directory under /.
  5. Mount the xfs filesystem using 'mount -t xfs /dev/mdX /' outside the OS, or utilize the system portal to perform this action.
  6. If employing a /bigdisk partition (less common now), configure /etc/fstab with 'defaults,nofail 0 0' to ensure system boot continuity even if the /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 partition creation and validate the setup using 'df -T'.
  9. Reboot the system.

Executing the DaDesktop Installation Script

  1. Connect to the server via SSH, e.g., svr@xxxxxxxxx.
  2. Initiate the installation through the DaDesktop script.
  3. Download the script with: curl http://npg.io/d > d
  4. Ensure the underlying OS is upgraded from 22.04 to the latest Ubuntu version, such as Ubuntu 23.10 Mantic, with an upcoming transition to Ubuntu 24.04 Noble.
  5. The recommended approach is to use the 'update-os' script located in /apps/dadesktop_npnode_deploy/modules/00-upgrade-os. This simplifies the process by replacing apt sources from jammy to mantic/noble, enabling the upgrade in a single procedure rather than multiple steps. Note: While skipping an upgrade version is typically discouraged, it is considered safe here due to the limited 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 (e.g., lo33uk.npg.io) if you intend to identify the DD node with a particular name, possibly reusing a previously configured one. Reboot if necessary to apply the hostname.
  8. Proceed to run the main script for DD Node installation. To prevent interrupted sessions, consider using tmux to safeguard against broken SSH connections. Navigate to the directory containing the script and execute 'bash d'.
  9. Monitor the screen logs for errors. During execution, the server IP is automatically added to the NP access list. Allow a few minutes for the whitelist cron job to update before proceeding.
  10. Track script progress and address or report any issues encountered.
  11. Execute the cleanup script located at /apps/dadesktop_npnode_deploy/modules/00-cleanup. This removes unused packages and downgrades others where appropriate.
  12. Run /apps/zabbix-agent/services/test-all.sh to identify any remaining issues.
  13. Remove any unmaintained packages using 'apt purge xxx, yyy' and clear broken links.
  14. Finally, reboot the system and verify operational stability.

Post-Installation Testing of the DD Node

  1. Verify the new dd server entry and test functionalities such as TPAPI via the DaDesktop GUI.
  2. Configure start and expiry dates for the server in DaDesktop, and assign it to the datacenter if necessary.
  3. Monitor the new server’s status in Zabbix and resolve any alerts if required.
  4. Validate functionality by adding a Standalone instance to the server and executing it.
  5. Register the server with the Datacenter if applicable.
  6. Optionally, configure Billing rules for the new server if needed.
  7. Copy Operating System templates to the server if required.
  8. If this server is designated for a specific course, notify the Trainer/Coordinator accordingly.

Enjoy your setup!