Enterprise

# Install a standalone Driver

> Install the Synnax Driver on a computer other than the Core, log it in to the Core, and start it.

Each Core includes the [Driver](https://docs.synnaxlabs.com/reference/hardware), which connects the devices on the Core’s computer. To connect devices on a different computer, install a standalone Driver on that computer. It connects to one Core over the network.

## Step 1Install the Driver

**NI Linux Real-Time**

Before you install:

* Set the data acquisition modules of the controller to the NI-DAQmx real-time programming mode in NI MAX. See the [NI CompactRIO user manual](https://www.ni.com/docs/en-US/bundle/ni-compactrio/page/programming-modes.html).
* Turn on SSH on the controller. You can turn it off after you install the Driver.

Open an SSH connection to the controller and log in as `admin`. On NI Linux Real-Time, `admin` is root, so the commands on this page need no `sudo` there. Run:

```bash
curl -LO https://github.com/synnaxlabs/synnax/releases/download/driver/v0.60.1/install-driver-nilinuxrt.sh && chmod +x install-driver-nilinuxrt.sh && ./install-driver-nilinuxrt.sh
```

The script installs the Driver as a service and starts it. The service also starts each time the controller starts. The Driver runs as root.

**Linux**

> The Driver needs a recent glibc. See [Requirements](https://docs.synnaxlabs.com/reference/enterprise/requirements) for the supported Linux versions.

Download the Driver:

```bash
curl -LO https://github.com/synnaxlabs/synnax/releases/download/driver/v0.60.1/synnax-driver-v0.60.1-linux
```

Move it into a folder on your `PATH`, and make it executable:

```bash
sudo mv synnax-driver-v0.60.1-linux /usr/local/bin/synnax-driver
```

```bash
sudo chmod +x /usr/local/bin/synnax-driver
```

Install the systemd service:

```bash
sudo synnax-driver install
```

The `install` command creates a `synnax` system user, the empty environment file `/etc/synnax/driver.env`, and the `synnax-driver` service. It copies the binary to `/var/lib/synnax-driver/bin/`, which the `synnax` user owns, and makes `/usr/local/bin/synnax-driver` a link to it. It does not start the service. It gives the service real-time permission and writes the udev rule `/etc/udev/rules.d/99-synnax-driver-latency.rules`, so Arc automations can run with [precise timing](https://docs.synnaxlabs.com/reference/control/arc/timing?platform=Linux#get-the-best-timing-from-a-computer). For [EtherCAT](https://docs.synnaxlabs.com/reference/hardware/ethercat/configure-device#network-interface-access), it gives the service raw Ethernet access and writes the udev rule `/etc/udev/rules.d/99-synnax-driver-ethercat.rules`. After you upgrade the Driver, run `sudo synnax-driver install` again.

**Windows**

Download the Driver:

```powershell
Invoke-WebRequest -Uri "https://github.com/synnaxlabs/synnax/releases/download/driver/v0.60.1/synnax-driver-v0.60.1-windows.exe" -OutFile "synnax-driver.exe"
```

Move `synnax-driver.exe` to a permanent folder, such as `C:\Program Files\Synnax\`. Then add that folder to the `Path` system environment variable, so that each terminal can run `synnax-driver`.

Open a new terminal as administrator, and install the Windows service:

```powershell
synnax-driver install
```

The `install` command copies the binary to `C:\Program Files\Synnax Driver\` and creates the `SynnaxDriver` service, which runs that copy. The service runs as LocalSystem and starts with the computer. Windows restarts it when it stops with an error. `install` does not start the service. To upgrade the Driver, replace the binary, run `install` again, and start the service.

**macOS**

Download the Driver:

```bash
curl -LO https://github.com/synnaxlabs/synnax/releases/download/driver/v0.60.1/synnax-driver-v0.60.1-macos
```

Move it into a folder on your `PATH`, and make it executable:

```bash
sudo mv synnax-driver-v0.60.1-macos /usr/local/bin/synnax-driver
```

```bash
sudo chmod +x /usr/local/bin/synnax-driver
```

Install the launchd service:

```bash
sudo synnax-driver install
```

The `install` command copies the binary to `/Library/Application Support/synnax-driver/bin/`, creates the service `com.synnaxlabs.driver` in `/Library/LaunchDaemons`, which runs that copy, and creates the empty environment file `/etc/synnax/driver.env`. The service runs as root and starts with the computer. launchd restarts it when it stops with an error. `install` does not start the service. After you upgrade the Driver, run `sudo synnax-driver install` again, and start the service.

Check the installation:

```bash
synnax-driver version
```

The output ends with the version:

```text
Synnax Driver v0.60.1
```

## Step 2Log in to the Core

You need the username and password of a user who can create racks. Run `login` with admin rights, so that the service reads the login: with `sudo` on Linux and macOS, in an administrator terminal on Windows, and as `admin` with no `sudo` on NI Linux Real-Time:

```bash
sudo synnax-driver login
```

The command asks for the address of the Core, and checks that it can reach the Core. Then it asks for the username and the password:

```plaintext
Host [localhost]: 10.0.0.45
Port [9090]:
Secure (Y/N) [N]:
Username: driver
Password:
```

The command then creates a rack for the Driver and an API key for that rack. It saves only the API key, never the password, and the Driver logs in as its rack with the key. When the output shows `API key saved successfully!`, the Driver is logged in.

An upgraded Driver that saved a username and password does this at its first start, and keeps its rack. If that user cannot create racks, the Driver logs the warning `Failed to enroll Driver`, and keeps logging in with the password. To fix it, run `login` as a user that can create racks, or create an API key for the rack in the Console and set it as `api_key` in the [configuration](https://docs.synnaxlabs.com/reference/enterprise/driver/configuration#parameters).

### Log in to a Core that uses TLS

Answer `Y` to `Secure` when the Core uses TLS, and give the host name of the certificate, not an IP address. A certificate from a public authority, such as Let’s Encrypt, needs no more setup.

For a certificate from your own authority, or from a Core that runs with `--auto-cert`:

* **Linux, NI Linux Real-Time, and Windows** -> add the CA certificate to the trust store of the operating system. See [Install certificates](https://docs.synnaxlabs.com/reference/enterprise/certificates).
* **macOS** -> the Driver does not read the macOS keychain. See the macOS tab of [Install the certificate](https://docs.synnaxlabs.com/reference/enterprise/certificates?platform=macOS#install-the-certificate). Set `GRPC_DEFAULT_SSL_ROOTS_FILE_PATH` in `/etc/synnax/driver.env`, before you run `login`.

On Linux and NI Linux Real-Time, you can instead set the same variable in `/etc/synnax/driver.env`, before you run `login`. See [Environment file](https://docs.synnaxlabs.com/reference/enterprise/driver/configuration#environment-file). The Driver then trusts only the certificates in that file.

## Step 3Start the Driver

**NI Linux Real-Time**

The Driver started before you logged in, so restart it:

```bash
synnax-driver restart
```

**Linux**

Set the service to start when the computer starts, then start it:

```bash
sudo systemctl enable synnax-driver
sudo synnax-driver start
```

**Windows**

In an administrator terminal, start the service:

```powershell
synnax-driver start
```

**macOS**

Start the service:

```bash
sudo synnax-driver start
```

## Step 4Check the Driver

**NI Linux Real-Time**

Check the service:

```bash
synnax-driver status
```

A running Driver prints:

```plaintext
Synnax Driver is running (PID: 28191)
```

**Linux**

Check the service:

```bash
synnax-driver status
```

**Windows**

Check the service:

```powershell
synnax-driver status
```

A running Driver prints:

```plaintext
Synnax Driver is running (PID: 28191)
```

**macOS**

Check the service:

```bash
sudo synnax-driver status
```

The Driver shows in the devices toolbar under the host name of its computer. To connect devices to it, see [Devices](https://docs.synnaxlabs.com/reference/hardware/devices).
