# Install naisdevice

## Device-specific installation steps

**macOS**

1. Install [Homebrew](https://brew.sh/) unless you already have it.
2. Run these commands in a terminal

```bash
brew tap nais/tap
brew trust nais/tap
brew install naisdevice-tenant
```

1. You will be asked for your local device account's password to finish the installation.
2. Turn on your freshly installed `naisdevice` app.
3. Use `<Command> + <Space>` to find your `naisdevice.app` and press `<Enter>`.

**Windows (Scoop)**

1. Install [Scoop](https://scoop.sh) unless you already have it.

```powershell
Scoop makes it possible to install and maintain programs from the command line.
```

1. Use the following command in the command line to add the nais bucket to let Scoop know where to get and update files from. Do not worry about where it will be installed, we got you covered.

```powershell
scoop bucket add nais https://github.com/nais/scoop-bucket
```

1. When the bucket is added, you are ready to install naisdevice, by typing the following in the command line:

```powershell
scoop install naisdevice-tenant
```

(you will be asked for administrator access to run the installer)

1. Start *naisdevice* from the *Start menu*

**Windows (Manual)**

1. Go to [github.com/nais/device](https://github.com/nais/device/releases/latest).
2. Download and run the newest `naisdevice-tenant.exe` installer (you will be asked for administrator access when you run the installer).
3. Start *naisdevice* from the *Start menu*.

**Ubuntu**

> **Warning**
> Using Gnome DE on latest Ubuntu LTS - only supported variant

1. Install curl

```
sudo apt install curl
```

1. Add the nais PPA repo:

```
NAIS_GPG_KEY="/etc/apt/keyrings/nav_nais_gar.asc"
curl -sfSL "https://europe-north1-apt.pkg.dev/doc/repo-signing-key.gpg" | sudo dd of="$NAIS_GPG_KEY"
echo "deb [arch=amd64 signed-by=$NAIS_GPG_KEY] https://europe-north1-apt.pkg.dev/projects/nais-io nais-ppa main" | sudo tee /etc/apt/sources.list.d/nav_nais_gar.list
sudo apt update
```

1. Install the naisdevice package:

```
sudo apt install naisdevice-tenant
```

1. Find `naisdevice` in your application menu, or use the `naisdevice` command in a terminal to start the application.

## Connect Naisdevice through task/sys -tray icon

![A macOS systray exemplifying a red-colored `naisdevice` icon.](/assets/naisdevice-systray-icon.svg)

When you have started Naisdevice the Naisdevice icon appears in your Systray (where all your small program icons are located - see above picture for how it looks on Mac):

1. Start the Naisdevice agent/app.
2. Find your `naisdevice` icon (pictured above).- Can't find the icon? Make sure it is installed (See [macOS](#__tabbed_1_2), [Windows (Scoop)](#__tabbed_1_1) or [Ubuntu](#__tabbed_1_4))
3. Left-click it and select `Connect`.
4. Left-click the `naisdevice` icon again and click `Connect`.- You might need to allow ~20 seconds to pass before clicking `Connect` turns your `naisdevice` icon green.
