# Controlling the server and the plugin

## Start the server

The Mediaserver will usually be started automatically when the computer it is installed on is started.

However it also can be started manually from the command line with either of the following commands:

{% tabs %}
{% tab title="Nx Meta" %}

```sh
sudo service networkoptix-metavms-mediaserver start
```

```sh
sudo systemctl start networkoptix-metavms-mediaserver.service
```

{% endtab %}

{% tab title="Nx Witness" %}

```sh
sudo service networkoptix-mediaserver start
```

```sh
sudo systemctl start networkoptix-mediaserver.service
```

{% endtab %}

{% tab title="Nx Go" %}

```sh
sudo service networkoptix-mediaserver start
```

```sh
sudo systemctl start networkoptix-mediaserver.service
```

{% endtab %}

{% tab title="Windows" %}
Open the services application and select the Network Optix Server service that matches your customization.\
The server can then be controlled by the context menu or the start, restart and stop links.
{% endtab %}
{% endtabs %}

## Restarting the server

Restarting the server can be done on the command line too.

{% tabs %}
{% tab title="Nx Meta" %}

```sh
sudo service networkoptix-metavms-mediaserver restart
```

```sh
sudo systemctl restart networkoptix-metavms-mediaserver.service
```

{% endtab %}

{% tab title="Nx Witness" %}

```sh
sudo service networkoptix-mediaserver restart
```

```sh
sudo systemctl restart networkoptix-mediaserver.service
```

{% endtab %}

{% tab title="Nx Go" %}

```sh
sudo service networkoptix-mediaserver restart
```

```sh
sudo systemctl restart networkoptix-mediaserver.service
```

{% endtab %}

{% tab title="Windows" %}
Open the services application and select the Network Optix Server service that matches your customization.\
The server can then be controlled by the context menu or the start, restart and stop links.
{% endtab %}
{% endtabs %}

But it can also be done on the built-in Nx Meta Server web interface by accessing the webpage at port `:7001` for instance, at `https://localhost:7001/` or use the IP address for localhost `https://127.0.0.1:7001/`  or use your external IP address with the same port.&#x20;

<figure><img src="https://content.gitbook.com/content/kP02geOjtLSPAt4JiZUv/blobs/Z8Q3e49FzRfqlvT9ou5S/image.png" alt=""><figcaption></figcaption></figure>

## Stopping the server

Stopping the server on the command line is similar to starting and restarting.

{% tabs %}
{% tab title="Nx Meta" %}

```sh
sudo service networkoptix-metavms-mediaserver stop
```

```sh
sudo systemctl stop networkoptix-metavms-mediaserver.service
```

{% endtab %}

{% tab title="Nx Witness" %}

```sh
sudo service networkoptix-mediaserver stop
```

```sh
sudo systemctl stop networkoptix-mediaserver.service
```

{% endtab %}

{% tab title="Nx Go" %}

```sh
sudo service networkoptix-mediaserver stop
```

```sh
sudo systemctl stop networkoptix-mediaserver.service
```

{% endtab %}

{% tab title="Windows" %}
Open the services application and select the Network Optix Server service that matches your customization.\
The server can then be controlled by the context menu or the start, restart and stop links.
{% endtab %}
{% endtabs %}

## Starting the plugin

To start the plugin the plugin needs to be enabled by toggling the switch next to the title and then also enabling the 'Device Active' toggle that will then appear.

<figure><img src="https://4052997117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkP02geOjtLSPAt4JiZUv%2Fuploads%2FKLbc5pOiUScUF8EsqSvn%2Fsettings%20aimanager%20disabled.png?alt=media&#x26;token=ddb6f01f-9378-4bdb-aeb2-a28ab4d473e1" alt=""><figcaption><p>The popup window showing that the plugin is disabled for this device</p></figcaption></figure>

<figure><img src="https://4052997117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkP02geOjtLSPAt4JiZUv%2Fuploads%2FlHEAtimIhk7yMZBdbZ3S%2Fsettings%20aimanager%20device%20inactive.png?alt=media&#x26;token=0fd615ee-4a37-471e-a77e-6de49a45bbe0" alt=""><figcaption><p>The popup window showing that the plugin is enabled for this device, but the device is not active.</p></figcaption></figure>

## Stopping the plugin

Stopping the plugin when it is running can be done from within the Nx Client.

To stop the plugin all devices on a server need to be disabled by switching the 'Device Active' toggle to off.

<figure><img src="https://4052997117-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FkP02geOjtLSPAt4JiZUv%2Fuploads%2F0AQPUq39v7r9qF94NFy0%2Fsettings%20aimanager%20device%20active.png?alt=media&#x26;token=25a5d400-4850-4c8b-8849-e0e982007a70" alt=""><figcaption><p>The popup window showing that the plugin is enabled and the device is active.</p></figcaption></figure>
