Install the OpenHAB Ubuntu Appliance for an Intel NUC

Download the OpenHAB image


Installation instructions

We will walk you through the steps of flashing your OpenHAB Ubuntu Appliance on to your Intel NUC and getting logged in.


What you'll need

  • Two USB 2.0 or 3.0 flash drives (2GB minimum)
  • An Intel NUC with BIOS updated to the latest version (update instructions)
  • A Mini HDMI to HDMI cable
  • A monitor with VGA or HDMI interface
  • A VGA or HDMI cable
  • A USB keyboard and a mouse
  • A network connection with Internet access
  • An Ubuntu 20.04 LTS desktop image
  1. Generate Secure Shell (SSH) keys

    The 'Secure Shell' protocol provides access to your Ubuntu Appliance and uses cryptographic keys to authenticate you to the device. You need SSH software and keys.

    Run the following command:

    ssh-keygen -t rsa
    1. This starts the key generation process. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key
    2. Press the ENTER key to accept the default location. The ssh-keygen utility prompts you for a passphrase
    3. Type in a passphrase

    You now have a public and private key that you can use to authenticate.

  2. Create an Ubuntu SSO account

    Your Ubuntu Appliance will be added to your Ubuntu cloud account and use your SSH keys to identify you. Add your keys to your account at https://login.ubuntu.com/ssh-keys.

    To do so, run the following command in your terminal.

    cat ~/.ssh/id_rsa.pub

    Copy the result into the text field on the website. Click import and will have the key set up.

  3. Flash the USB drives

    1. Download and copy the Ubuntu Desktop 20.04 LTS image on the first USB flash drive by following the live USB Ubuntu Desktop tutorial for Ubuntu
    2. Copy the Ubuntu Appliance image you downloaded on to the second USB flash drive
  4. Install your appliance image

    1. Connect your USB hub, keyboard, mouse and monitor to the NUC
    2. Insert the first USB flash drive, containing Ubuntu Desktop 20.04 LTS
    3. Start the NUC and push F10 to enter the boot menu
    4. Select the USB flash drive as a boot option
    5. Select Try Ubuntu without installing
    6. Once the Ubuntu session has started, insert the second USB flash drive containing the appliance image file
    7. Open a terminal and use the following command to find out the target disk device to install the appliance to:
      sudo fdisk -l
    8. Run the following command, where <disk label> is the label of the second USB flash drive:
      xzcat /media/ubuntu/<disk label>/dawson-uc18-m7-20190122-10.img.xz | sudo dd of=/dev/<target disk device> bs=32M status=progress; sync
    9. Reboot the system and remove the flash drives when prompted. It will then boot from the internal memory where your appliance image has been flashed
  5. First boot

    1. The system will boot then become ready to configure
    2. The device will display the prompt Press enter to configure
    3. Press enter then select Start to begin configuring your network and an administrator account. Follow the instructions on the screen, you will be asked to configure your network and enter your Ubuntu SSO credentials

    At the end of the process, you will see your credentials to access your device:

    This device is registered to <Ubuntu SSO email address>.
    Remote access was enabled via authentication with the SSO user <Ubuntu SSO user name>
    
    Public SSH keys were added to the device for remote access.
  6. That's it

    Once setup is done, you can login to a machine on the same network with SSH:

    ssh <Ubuntu SSO user name>@<device IP address>

    Your user name is your Ubuntu SSO user name.

We will walk you through the steps of flashing your OpenHAB Ubuntu Appliance on to your Intel NUC and getting logged in.


What you'll need

  • Two USB 2.0 or 3.0 flash drives (2GB minimum)
  • An Intel NUC with BIOS updated to the latest version (update instructions)
  • A Mini HDMI to HDMI cable
  • A monitor with VGA or HDMI interface
  • A VGA or HDMI cable
  • A USB keyboard and a mouse
  • A network connection with Internet access
  • An Ubuntu 20.04 LTS desktop image
  1. Install OpenSSH

    The 'Secure Shell' protocol provides access to your Ubuntu Appliance and uses cryptographic keys to authenticate you to the device. You will need SSH software and keys.

    Some versions of Windows 10 include an SSH client already, but if yours does not or you're unsure, follow these steps to install one.

    1. OpenSSH client is an installable feature of Windows 10.

      To install OpenSSH, start Settings then go to Apps > Apps and Features > Manage Optional Features.

    2. Scan this list to see if OpenSSH client is already installed. If not, at the top of the page select Add a feature, then, to install the OpenSSH client, locate OpenSSH Client and click Install

      Once the installation completes, return to Apps > Apps and Features > Manage Optional Features and you should see the OpenSSH component(s) listed.

    To install OpenSSH using PowerShell, first launch PowerShell as an Administrator. To make sure that the OpenSSH features are available for install type the command:

    Get-WindowsCapability -Online | ? Name -like 'OpenSSH*'

    This should return:

    Name  : OpenSSH.Client~~~~0.0.1.0
    State : NotPresent

    Then, install the client features:

    Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

    Both commands should return:

    Path          :
    Online        : True
    RestartNeeded : False
    
  2. Generate Secure Shell (SSH) keys

    After you have installed OpenSSH client you will need to generate user SSH keys to secure the connection to your Raspberry Pi.

    Launch 'Windows PowerShell' as an Administrator, and type:

    ssh-keygen

  3. Create an Ubuntu SSO account

    Your Ubuntu Appliance will be added to your Ubuntu cloud account and use your SSH keys to identify you. Add your keys to your account at https://login.ubuntu.com/ssh-keys.

    To do so, run the following command in your terminal, which will copy your public key to your keyboard.

    type ~\.ssh\id_rsa.pub | clip.exe

    You can then paste your key result into the text field on your Ubuntu One account. Click import and will have the key set up.

  4. Flash the USB drives

    1. Download and copy the Ubuntu Desktop 20.04 LTS image on the first USB flash drive by following the live USB Ubuntu Desktop tutorial for Windows
    2. Copy the Ubuntu Appliance image you downloaded on to the second USB flash drive
  5. Install your appliance image

    1. Connect your USB hub, keyboard, mouse and monitor to the NUC
    2. Insert the first USB flash drive, containing Ubuntu Desktop 20.04 LTS
    3. Start the NUC and push F10 to enter the boot menu
    4. Select the USB flash drive as a boot option
    5. Select Try Ubuntu without installing
    6. Once the Ubuntu session has started, insert the second USB flash drive containing the appliance image file
    7. Open a terminal and use the following command to find out the target disk device to install the appliance to:
      sudo fdisk -l
    8. Run the following command, where <disk label> is the label of the second USB flash drive:
      xzcat /media/ubuntu/<disk label>/dawson-uc18-m7-20190122-10.img.xz | sudo dd of=/dev/<target disk device> bs=32M status=progress; sync
    9. Reboot the system and remove the flash drives when prompted. It will then boot from the internal memory where your appliance image has been flashed
  6. First boot

    1. The system will boot then become ready to configure
    2. The device will display the prompt Press enter to configure
    3. Press enter then select Start to begin configuring your network and an administrator account. Follow the instructions on the screen, you will be asked to configure your network and enter your Ubuntu SSO credentials

    At the end of the process, you will see your credentials to access your device:

    This device is registered to <Ubuntu SSO email address>.
    Remote access was enabled via authentication with the SSO user <Ubuntu SSO user name>
    
    Public SSH keys were added to the device for remote access.
  7. That's it

    Once setup is done, you can login to a machine on the same network with SSH:

    ssh <Ubuntu SSO user name>@<device IP address>

    Your user name is your Ubuntu SSO user name.

We will walk you through the steps of flashing your OpenHAB Ubuntu Appliance on to your Intel NUC and getting logged in.


What you'll need

  • Two USB 2.0 or 3.0 flash drives (2GB minimum)
  • An Intel NUC with BIOS updated to the latest version (update instructions)
  • A Mini HDMI to HDMI cable
  • A monitor with VGA or HDMI interface
  • A VGA or HDMI cable
  • A USB keyboard and a mouse
  • A network connection with Internet access
  • An Ubuntu 20.04 LTS desktop image
  1. Generate Secure Shell (SSH) keys

    The 'Secure Shell' protocol provides access to your Ubuntu Appliance and uses cryptographic keys to authenticate you to the device. You will need SSH software and keys.

    Terminal is the terminal emulator which provides a text-based command-line interface (CLI) to the Unix shell of macOS.

    To open the macOS Terminal:

    1. In Finder, select Utilities from the Applications folder.
    2. Find Terminal in the utilities list.
    3. Enter the following command:

      ssh-keygen -t rsa

      This starts the key generation process. When you execute this command, the ssh-keygen utility prompts you to indicate where to store the key

    4. Press the ENTER key to accept the default location. The ssh-keygen utility prompts you for a passphrase
    5. Type in a passphrase

    You now have a public and private key that you can use to authenticate.

    Your private key is saved to the id_rsa file in the .ssh directory and is used to verify the public key you use belongs to the same account.

  2. Create an Ubuntu SSO account

    Your Ubuntu Appliance will be added to your Ubuntu cloud account and use your SSH keys to identify you. Add your keys to your account at https://login.ubuntu.com/ssh-keys.

    To do so, run the following command in your terminal.

    cat ~/.ssh/id_rsa.pub

    Copy the result into the text field on the website. Click import and will have the key set up.

  3. Flash the USB drives

    1. Download and copy the Ubuntu Desktop 20.04 LTS image on the first USB flash drive by following the live USB Ubuntu Desktop tutorial for macOS
    2. Copy the Ubuntu Appliance image you downloaded on to the second USB flash drive
  4. Install your appliance image

    1. Connect your USB hub, keyboard, mouse and monitor to the NUC
    2. Insert the first USB flash drive, containing Ubuntu Desktop 20.04 LTS
    3. Start the NUC and push F10 to enter the boot menu
    4. Select the USB flash drive as a boot option
    5. Select Try Ubuntu without installing
    6. Once the Ubuntu session has started, insert the second USB flash drive containing the appliance image file
    7. Open a terminal and use the following command to find out the target disk device to install the appliance to:
      sudo fdisk -l
    8. Run the following command, where <disk label> is the label of the second USB flash drive:
      xzcat /media/ubuntu/<disk label>/dawson-uc18-m7-20190122-10.img.xz | sudo dd of=/dev/<target disk device> bs=32M status=progress; sync
    9. Reboot the system and remove the flash drives when prompted. It will then boot from the internal memory where your appliance image has been flashed
  5. First boot

    1. The system will boot then become ready to configure
    2. The device will display the prompt Press enter to configure
    3. Press enter then select Start to begin configuring your network and an administrator account. Follow the instructions on the screen, you will be asked to configure your network and enter your Ubuntu SSO credentials

    At the end of the process, you will see your credentials to access your device:

    This device is registered to <Ubuntu SSO email address>.
    Remote access was enabled via authentication with the SSO user <Ubuntu SSO user name>
    
    Public SSH keys were added to the device for remote access.
  6. That's it

    Once setup is done, you can login to a machine on the same network with SSH:

    ssh <Ubuntu SSO user name>@<device IP address>

    Your user name is your Ubuntu SSO user name.

Start using your OpenHAB Ubuntu Appliance

When you start openHAB for the first time, it only starts the dashboard. So let's have a look at it: open a browser and browse to your openHAB dashboard:

http://<IP-of-your-machine>:8080

Now just follow the instructions on the screen to use your new openHAB Ubuntu Appliance. For more information or more documentation, the openHAB website is the best place to go next.