How to Install Hiawatha on NixOS Latest

Hiawatha is a secure and lightweight webserver that is regularly updated to provide the best performance and security to its users. Here’s a step-by-step guide to install Hiawatha on NixOS latest.

  1. Open your terminal or command prompt.

  2. Update your system with the following command:

$ sudo nixos-rebuild switch
  1. Install Hiawatha using the following command:
$ sudo nix-env --install hiawatha
  1. After installing, edit the Hiawatha configuration file hiawatha.conf located at /etc/hiawatha/hiawatha.conf:
$ sudo nano /etc/hiawatha/hiawatha.conf
  1. Configure your website and its root directory inside the VirtualHost section, for example:
VirtualHost {
     Hostname = www.example.com
     WebsiteRoot = /home/user/example
}
  1. Save the configuration file using Ctrl+O and exit nano using Ctrl+X.

  2. Start the Hiawatha webserver:

$ sudo service hiawatha start
  1. You can verify if Hiawatha is running by typing the following command:
$ sudo service hiawatha status
  1. To access your website, open your web browser and type the following address: http://localhost/ or http://[your_ip_address].

Congratulations, you have successfully installed Hiawatha on NixOS latest version.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!