### Start installimage Script Source: https://docs.hetzner.com/robot/dedicated-server/operating-systems/installimage Run the installimage script from the Rescue System to begin the OS installation process. ```bash root@rescue ~ # installimage ``` -------------------------------- ### Example GET Request for Servers Source: https://docs.hetzner.com/cloud/api/getting-started/using-api This example shows how to retrieve information about servers in a specific project using a GET request. ```APIDOC ## GET /servers ### Description Retrieve information about servers. ### Method GET ### Endpoint https://api.hetzner.cloud/v1/servers ### Request Example ```bash curl \ -H "Authorization: Bearer $API_TOKEN_1" \ 'https://api.hetzner.cloud/v1/servers' ``` ``` -------------------------------- ### GET Request Example Source: https://docs.hetzner.com/cloud/api/getting-started/using-api This is a general example of a GET request to the Hetzner Cloud API. Use this to read information about resources. Replace `{api-url-ending}` with the specific API endpoint. ```bash curl \ -H "Authorization: Bearer $API_TOKEN" \ 'https://api.hetzner.cloud/v1/{api-url-ending}' ``` -------------------------------- ### Start Nginx Service Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Command to start the Nginx web server after installation. ```bash nginx ``` -------------------------------- ### Run PEAR Installer Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Execute the downloaded PEAR installer script using PHP. ```bash php go-pear.phar ``` -------------------------------- ### Start the 'atd' Service Source: https://docs.hetzner.com/robot/dedicated-server/general-information/server-relocations If the 'atd' service is not running, use this command to start it. You may need to install it first. ```bash /etc/init.d/atd start ``` -------------------------------- ### Download PEAR Installer Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Download the PEAR installer script using wget. ```bash wget https://pear.php.net/go-pear.phar ``` -------------------------------- ### Install Plesk Module (drweb) Source: https://docs.hetzner.com/robot/dedicated-server/operating-systems/plesk Example command to install a specific Plesk module, in this case, the 'drweb' module, using the autoinstaller. ```bash /usr/local/psa/admin/sbin/autoinstaller --select-release-current --install-component drweb ``` -------------------------------- ### Setup Uptime Kuma Source: https://docs.hetzner.com/managed/administration-on-konsoleh/nodejs Clone the Uptime Kuma repository, navigate into the directory, and run the setup script with a specified Node.js version. ```bash git clone https://github.com/louislam/uptime-kuma.git cd uptime-kuma NODEVERSION=20 npm run setup ``` -------------------------------- ### Start GlassFish Domain Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Command to start the GlassFish domain. ```bash asadmin start-domain ``` -------------------------------- ### Recommended rDNS Allocation Guideline Source: https://docs.hetzner.com/networking/dns/technical-concepts/architecture Shows an example of a recommended rDNS setup where the forward and reverse DNS entries for an IP address resolve to each other. ```text same.example.com ---> 192.0.2.254 192.0.2.254 ---> same.example.com ``` -------------------------------- ### Install Nginx Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Use this command to install the Nginx web server software. ```bash software install nginx ``` -------------------------------- ### Start Tomcat Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Starts the Tomcat server. This command initiates the Tomcat process. ```bash catalina run ``` -------------------------------- ### Install Composer on Web Hosting with SSH Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Follow these steps to install Composer on web hosting accounts that support SSH. This involves downloading the installer, running it, and setting up an alias. ```bash php -d allow_url_fopen=On -r "readfile('https://getcomposer.org/installer');" > composer-setup.php php -d allow_url_fopen=On composer-setup.php php -r "unlink('composer-setup.php');" echo alias composer=\"/usr/bin/php -d allow_url_fopen=On /usr/home/$USER/composer.phar\" >> ~/.bashrc source ~/.bashrc ``` -------------------------------- ### Example SSH Connection (Linux/macOS) Source: https://docs.hetzner.com/managed/administration-on-konsoleh/access-details/ssh An example of the SSH connection command with placeholder values for user and host. ```bash ssh -p 222 wbqnxy@wwwXXX.your-server.de ``` -------------------------------- ### Install wkhtmltopdf with SSH on Managed Server Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Use the 'software install' command to install wkhtmltopdf on a managed server. ```bash software install wkhtmltopdf ``` -------------------------------- ### Install Resilio Sync (BTSync) Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Use this command to install Resilio Sync on your managed server. ```bash software install rslsync ``` -------------------------------- ### Install GlassFish on Managed Servers Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Use this command to install GlassFish on managed servers. ```bash software install glassfish ``` -------------------------------- ### Configure PEAR Installation Directories Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software During PEAR installation, set these temporary directories. Replace LOGIN with your FTP login. ```bash 2. Temporary directory for processing : /usr/home/LOGIN/.tmp 3. Temporary directory for downloads : /usr/home/LOGIN/.tmp ``` -------------------------------- ### Install FFmpeg on Managed Servers Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Use this command to install FFmpeg on managed servers. ```bash software install ffmpeg ``` -------------------------------- ### Install Tomcat Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Installs the Tomcat software package. This command should be run in the server's terminal. ```bash software install tomcat ``` -------------------------------- ### Install a PEAR Package Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Command to install a new package using PEAR. Replace with the desired package name. ```bash pear install ``` -------------------------------- ### List Installed Software Packages Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Show all software packages that are currently installed on your managed server. ```bash software list installed ``` -------------------------------- ### Start MongoDB Daemon (Simplified) Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software A simplified command to start the MongoDB daemon, omitting the port and log file parameters. This is suitable for local-only access. ```bash mongod --dbpath /usr/home//mongodb/data/db/ --nounixsocket ``` -------------------------------- ### Reboot Server After Installation Source: https://docs.hetzner.com/robot/dedicated-server/operating-systems/installimage After the installimage script completes and the system is ready, reboot the server from the Rescue System to boot into the newly installed operating system. ```bash root@rescue ~ # reboot ``` -------------------------------- ### POST Request Example Source: https://docs.hetzner.com/cloud/api/getting-started/using-api This example demonstrates a POST request for creating or configuring resources. It includes the necessary headers for authorization and content type, along with a JSON payload. ```bash curl \ -X POST \ -H "Authorization: Bearer $API_TOKEN" \ -H "Content-Type: application/json" \ -d '{"property":value,"property":value,...}' \ 'https://api.hetzner.cloud/v1/{api-url-ending}' ``` -------------------------------- ### Run Installimage Script Source: https://docs.hetzner.com/robot/dedicated-server/operating-systems/installing-custom-images Boot the server to the Rescue System, mount the remote filesystem containing your archive, and then start the Installimage script. Select 'custom_images' to load a blank configuration for customization. Ensure required parameters like IMAGEPATH are filled. ```bash installimage ``` -------------------------------- ### Start Resilio Sync / BTSync with Web UI Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Start the Resilio Sync daemon and configure the web UI listen address. Ensure the port is opened in your firewall. ```bash rslsync --webui.listen :8888 ``` -------------------------------- ### Prepare for Chroot Environment Source: https://docs.hetzner.com/cloud/servers/getting-started/migrate-partition Bind mount necessary system directories and then chroot into the new system's mount point to perform bootloader updates. ```bash mount -o bind /dev /mnt/dev ``` ```bash mount --rbind /sys /mnt/sys ``` ```bash mount -t proc /proc /mnt/proc ``` ```bash chroot /mnt /bin/bash ``` -------------------------------- ### GET Servers Request Source: https://docs.hetzner.com/cloud/api/getting-started/using-api This is a specific example of a GET request to list servers. It includes the Authorization header and the correct API endpoint for servers. ```bash curl \ -H "Authorization: Bearer $API_TOKEN" \ 'https://api.hetzner.cloud/v1/servers' ``` -------------------------------- ### Example of Faulty Partition Alignment Source: https://docs.hetzner.com/robot/dedicated-server/getting-started/partition-alignment This output from fdisk -u /dev/hda on CentOS 5.6 shows a partition starting at sector 63, indicating faulty alignment. The recommended start sector should be divisible by 2048. ```bash [root@static ~]# fdisk -v fdisk (util-linux 2.13-pre7) [root@static ~]# fdisk -u /dev/hda The number of cylinders for this disk is set to 10443. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): p Disk /dev/hda: 85.8 GB, 85899345920 bytes 255 heads, 63 sectors/track, 10443 cylinders, total 167772160 sectors Units = sectors of 1 * 512 = 512 bytes Device Boot Start End Blocks Id System /dev/hda1 * 63 208844 104391 83 Linux /dev/hda2 208845 167766794 83778975 8e Linux LVM ``` -------------------------------- ### FreeBSD Loader Prompt Example Source: https://docs.hetzner.com/cloud/servers/faq An example interaction within the FreeBSD loader prompt, demonstrating how to set a hint to disable virtio-random and then continue the boot process. ```text Type '?' for a list of commands. 'help' for more detailed help. OK set hint.vtrnd.0.disabled=1 OK boot Loading kernel ... ``` -------------------------------- ### Solr Service Monitor Output Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Example output indicating that Apache Solr has started successfully on the default port. ```text Waiting up to 30 seconds to see Solr running on port 8983 [/] Started Solr server on port 8983 (pid=19302). Happy searching! ``` -------------------------------- ### List All Available Software Packages Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Display all software packages that are available for installation on the managed server. ```bash software list all ``` -------------------------------- ### List all available Server Types Source: https://docs.hetzner.com/cloud/api/getting-started/using-api Get a list of all available server types, including their specifications and pricing. This helps in choosing the right instance for your needs. ```bash curl -X GET "https://api.hetzner.cloud/v1/server_types" \ -H "Authorization: Bearer YOUR_API_TOKEN" ``` -------------------------------- ### Combining Multiple Query Parameters Source: https://docs.hetzner.com/cloud/api/getting-started/using-api When using multiple query parameters, start the first parameter with a '?' and subsequent parameters with an '&'. This example combines label selection and sorting. ```http https://api.hetzner.cloud/v1/floating_ips?label_selector=env&sort=id:asc ``` -------------------------------- ### Resilio Sync / BTSync Help Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Access help information for all BTSync functions using this command. ```bash rslsync --help ``` -------------------------------- ### Configure MongoDB @reboot Crontab Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Adds a cron job to automatically start MongoDB when the server restarts. This example uses a specific path for mongod and assumes a default configuration. ```bash crontab -l | { cat; echo "@reboot $HOME/.linuxbrew/bin/mongod --dbpath $HOME/mongodb/data/db/ --port 27017 --fork --logpath $HOME/mongodb/log.txt --nounixsocket &"; } | crontab - ``` -------------------------------- ### Private Network Route Example Source: https://docs.hetzner.com/networking/networks/faq Illustrates possible and impossible configurations for setting a gateway in a private network route. Cloud servers can be used as gateways, but dedicated servers cannot in this specific setup. ```text Destination Gateway 0.0.0.0/0 10.0.1.2 (dedicated server) >> not possible 0.0.0.0/0 10.0.0.2 (cloud server) >> possible ``` -------------------------------- ### Hello World Node.js Application Source: https://docs.hetzner.com/managed/administration-on-konsoleh/nodejs A basic 'Hello World' example for a Node.js HTTP server. Ensure the script path and working directory are correctly set in konsoleH. ```javascript const { createServer } = require('node:http'); const server = createServer((req, res) => { res.statusCode = 200; res.setHeader('Content-Type', 'text/plain'); res.end('Hello World'); }); server.listen(() => { console.log("Application is running..."); }); ``` -------------------------------- ### Install GRUB Bootloader (Ubuntu/Debian) Source: https://docs.hetzner.com/robot/dedicated-server/operating-systems/efi-system-partition Installs the GRUB bootloader for EFI systems on Ubuntu/Debian. Ensure `grub-efi-amd64-bin` is installed. ```bash $ # Ubuntu/Debian $ grub-install --target=x86_64-efi --efi-directory=/boot/efi --no-floppy --no-nvram --removable ``` -------------------------------- ### Start gdisk for Partitioning Source: https://docs.hetzner.com/robot/dedicated-server/operating-systems/efi-system-partition Initiates the gdisk utility to manage partition tables on a specified disk. Use this to create or modify partitions. ```bash $ gdisk /dev/nvme0n1 GPT fdisk (gdisk) version 1.0.3 Partition table scan: MBR: protective BSD: not present APM: not present GPT: present Found valid GPT with protective MBR; using GPT. Command (? for help): ``` -------------------------------- ### Install wp-cli on Managed Servers Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Use this command to install wp-cli on Hetzner managed servers via the integrated software installer. ```bash software install wp-cli ``` -------------------------------- ### Backup System Configuration Files (Ubuntu) Source: https://docs.hetzner.com/cloud/servers/getting-started/migrate-partition On the old server, back up critical system configuration files before migration. This example shows commands for Ubuntu systems. Ensure to adapt file paths if using a different OS. ```bash # On the old server, run these commands mv /etc/fstab /etc/fstab.bak mv /etc/netplan /etc/netplan.bak mv /etc/network/interfaces /etc/network/interfaces.bak mv /etc/default/grub /etc/default/grub.bak mv /boot/grub /boot/grub.bak ``` -------------------------------- ### Install SabreDAV using Composer Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Installs the SabreDAV library using the composer dependency manager. Ensure composer is installed first. ```bash composer require sabre/dav ``` -------------------------------- ### Install Local Ruby Gem Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Install Ruby Gems in a local environment without root permissions. Specify the gem name to install. ```bash gem install --user-install ``` -------------------------------- ### Create and Configure VLAN Interface Source: https://docs.hetzner.com/robot/dedicated-server/network/vswitch Use these commands to create a VLAN device, set its MTU, and bring it up. This is the initial step for vSwitch configuration. ```bash ip link add link enp0s31f6 name enp0s31f6.4000 type vlan id 4000 ip link set enp0s31f6.4000 mtu 1400 ip link set dev enp0s31f6.4000 up ``` -------------------------------- ### Install hc-utils on RHEL-based systems Source: https://docs.hetzner.com/networking/networks/server-configuration Installs the hc-utils package on RHEL-based systems like AlmaLinux, CentOS, Rocky Linux, and Fedora. Uses dnf for installation. ```bash dnf install https://packages.hetzner.com/hcloud/rpm/hc-utils-0.0.9-1.el$(rpm -E %rhel).noarch.rpm ``` -------------------------------- ### Example lsblk Output Source: https://docs.hetzner.com/cloud/volumes/faq An example output of the 'lsblk -So NAME,MODEL,SERIAL' command, showing how to distinguish Hetzner Cloud Volumes by their 'Volume' model and serial ID. ```bash # lsblk -So NAME,MODEL,SERIAL NAME MODEL SERIAL sda QEMU_HARDDISK drive-scsi0-0-0-0 sdb Volume 16246638 sdc Volume 16246643 sdd Volume 16246652 sr0 QEMU_DVD-ROM QM00003 ``` -------------------------------- ### Routed Configuration: Guest eth0 Setup Source: https://docs.hetzner.com/robot/dedicated-server/network/net-config-cent-os Configure the guest system's network interface (eth0) for a routed setup. Assign the additional IP address and specify the gateway. ```bash # /etc/sysconfig/network-scripts/ifcfg-eth0 DEVICE=eth0 ONBOOT=yes BOOTPROTO=none IPADDR= NETMASK=255.255.255.255 SCOPE="peer
" IPV6INIT=yes IPV6ADDR=2a01:4f8:XXX:YYYY::4/64 IPV6_DEFAULTGW=2a01:4f8:XXX:YYYY::2 ``` -------------------------------- ### Start Subversion Daemon Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Starts the Subversion server daemon in the background. ```bash svnserve -d ``` -------------------------------- ### Setup SabreDAV Directories Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Creates necessary directories for SabreDAV data and server files. Replace with your actual username. ```bash mkdir /usr/home//sabredata mkdir /usr/www/users//sabredav ``` -------------------------------- ### Install and Update rkhunter Source: https://docs.hetzner.com/cloud/servers/how-to-rescue/check-malware Install the rkhunter rootkit scanner and update its definitions. ```bash apt install rkhunter -y rkhunter --update ``` -------------------------------- ### Dedicated Server Route Example Source: https://docs.hetzner.com/networking/networks/connect-dedi-vswitch Example output of 'ip route show' on a dedicated root server, showing routes for the vSwitch subnet and the cloud network via the configured VLAN interface. ```text 10.0.0.0/16 via 10.0.1.1 dev enp0s31f6.4000 10.0.1.0/24 dev enp0s31f6.4000 proto kernel scope link src 10.0.1.2 ``` -------------------------------- ### Install Apache Solr Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Use this command to install the Apache Solr software package. ```bash software install solr ``` -------------------------------- ### Install FFmpeg on Web Hosting with SSH Source: https://docs.hetzner.com/managed/administration-on-konsoleh/installation-of-additional-software Download, extract, and move FFmpeg binaries on web hosting accounts with SSH access. ```bash wget https://johnvansickle.com/ffmpeg/releases/ffmpeg-release-amd64-static.tar.xz tar xJf ffmpeg-release-64bit-static.tar.xz mv $(ls | grep ffmpeg-[1-9]*) ffmpeg ``` -------------------------------- ### Install and Update ClamAV Source: https://docs.hetzner.com/cloud/servers/how-to-rescue/check-malware Install the ClamAV malware scanner and update its virus definitions. ```bash apt update apt install clamav -y freshclam ``` -------------------------------- ### Start RAID Initialization with perccli Source: https://docs.hetzner.com/robot/dedicated-server/dell-quickstart/dell-poweredge-quickstart-guide Manually start the initialization process for a newly created logical drive if it is not automatically detected by the operating system. Replace 'v0' with the correct logical drive identifier. ```bash perccli /c0/v0 start init ```