Skip to content

Requirements

Thomas T. Jarløv edited this page Aug 15, 2018 · 4 revisions

The following requirements needs to be installed before you install NimHA.

Nim requirements

  • nim >= 0.18.1
  • (nimble) bcrypt >= 0.2.1
  • (nimble) jester >= 0.4.0
  • (nimble) multicast >= 0.1.1
  • (nimble) recaptcha >= 1.0.2
  • (nimble) websocket >= 0.3.1

Third party requirements

The requirements below are used within NimHA until they can be replaced with pure Nim. Make sure they are installed on your system.

  • curl (Pushbullet)
  • mosquitto (nearly all modules)
  • openssl (ssl)

External access requirements

If you are going to expose NimHA to the internet, you should setup a reverse proxy, e.g. Nginx (see the NimHA tutorial).

To allow access to users on the internet, you have to forward the ports and maybe open them in your firewall.

  • Webserver HTTP: When using HTTP open port 80
  • Webserver HTTPS: When using HTTPS open port 443
  • MQTT: When using the settings from NimHA tutorial open port 8883

Install Nim

The official instructions can be found here https://nim-lang.org/install.html

Choosenim

Installing with choosenim is very easy. Just run:

curl https://nim-lang.org/choosenim/init.sh -sSf | sh
choosenim devel

Raspberry Pi

Choosenim does currently (2018 August) not support amd. You need to follow the instructions on https://github.com/nim-lang/Nim#compiling. After compiling Nim symlink your executable:

ln -sf /the/path/to/nim/git/Nim/bin/nim /usr/bin/nim
ln -sf /the/path/to/nim/git/Nim/bin/nimble /usr/bin/nimble

Install Nim packages

The Nim packages can all be installed with Nimble.

Run the following commands:

nimble install bcrypt
nimble install jester
nimble install multicast
nimble install recaptcha
nimble install websocket

Install Third party packages

Adjust the commands to your package manager.

Please see the wiki page about NimHA Wiki - Mosquitto

sudo pacman -S curl
sudo pacman -S mosquitto
sudo pacman -S openssl