# Edge Installation

Senseforce Edge is capable of running on Windows and Linux operating systems, including ARM-based architectures. For Windows, a graphical installer tool is provided, for Linux, the binaries are provided as an archived package.

## Windows

Use the Windows installer package which guides you through the process of installation.

![Windows Installer](/files/-Lt4Z3ZV3SkQfk66AVG_)

### Register SF Edge as a Windows service

Open Luna.Setup.exe in the main SF Edge install directory. The installer needs to run with admin privileges.&#x20;

![SF Edge Windows installer](/files/-Lt4ZrjN51AjxFYVv97Q)

Press "1" (without "") and press Enter to confirm your selection.

![Choose service name](/files/-Lt4_D8yN1VQxGJtizQN)

Enter a descriptive service name. To make the subsequent configuration of the SF Edge services easier, please choose service names which uniquely identify what the task of this SF Edge service is. Example: EdgeForMachine1234567. Press Enter to confirm.

![Automatically start at Windows startup](/files/-Lt4_MyBYGGmRu19u0fK)

Choose whether to automatically start the newly created service at Windows startup. For most use-cases, enter "yes" and confirm with enter.

A final summary of your service settings is presented, asking you to confirm your configuration. Enter "yes" and confirm with enter to start the installation.

After the service is registered, the registration results are presented. Please make sure the results state "Successfully registered \[yourServiceName]". Otherwise please check whether the installer was executed with admin privileges. &#x20;

![Successfully registered SF Edge as a Windows service](/files/-Lt4aEEyZIrajLsPnAME)

When installing an SF Edge service, the service is registered in the Windows service facilities. Additionally, an SF Edge configuration environment is created for every SF Edge service installed. The service configuration folders are placed in&#x20;

```
C:/ProgramDate/Senseforce/Luna Data/[YourServiceName_ID] (Please note, that the ID is automatically generated).
```

For each installed service, a separate configuration folder is created.&#x20;

![SF Edge service configuration folders](/files/-Lt4b8dq7MO9ufmUut3m)

A default set of configurations is automatically placed in the configuration folder.&#x20;

{% hint style="danger" %}
Do not rename the folders, as the folder names are critical to uniquely identify the configurations for the Windows services.
{% endhint %}

#### Open the service configuration file location

To easily manage the SF Edge service configurations, the service installer application provides an easy method to locate the configuration files for the wiservices.&#x20;

Simply press "2" (without "") and confirm with enter in the SF Edge service installer main menu. A Windows Explorer Window is automatically opened, pointing to the Luna service configuration folders.

#### Removing an SF Edge Windows service

To uninstall a previously installed SF Edge service, press "3" and confirm with enter in the service installer main menu. (Please note that the service installer application needs to be started with administrator privileges). A list of all installed Luna services is presented:

![SF Edge uninstall](/files/-Lt4c0AWjPWyW_7Nm3xu)

Enter "all" (without "") and press enter to confirm uninstalling all the listed SF Edge services. If only one of the listed services should be removed, enter the index number of the desired service (e.g. 2) and confirm with enter. Alternatively, enter "abort" (without "") to navigate back to main menu.

In the next step, select whether to delete the configuration and log files of the service chosen. Enter "yes" to delete these files, or "no" to keep them in the configuration folder. Enter "abort" to abort the uninstalling process.

Finally, you see a summary of your selection, and you are asked to finally confirm the uninstallation by entering "yes" or aborting by entering "no".

![SF edge uninstall summary](/files/-Lt4csPfsFcuSfsa6I15)

After deleting the services and log/config-files (if chosen to do so), the uninstallation results are presented.

![SF Edge uninstall results](/files/-Lt4czDx0c6pJl1yxAYd)

Please note, that uninstalling the Luna services may take up to 60 seconds per service.

#### Starting and stopping registered SF Edge services

To start or stop an SF Edge service, open the Windows service environment by entering "4" in the SF Edge service installer application and confirm by pressing enter. The Windows service environment opens.

![Windows service environment](/files/-Lt4e5gDaVoF-3lP2Icp)

Navigate to the service which should be started/stopped.&#x20;

Right-click on the service and select "Start" or "Stop".

## Linux

To install Luna as a Linux systemd service, follow the steps below:

{% hint style="info" %}
The service file has to be called sfedge\[postfix].service!
{% endhint %}

1. Create a new systemd service file /etc/systemd/system/sfedge.service
2. The file contains the following lines of configuration

```
Description=senseforce linux edge service
After=network.target
[Service]
# KillMode is required to tell systemd to NOT kill our updater child process. Otherwise the update will fail. IMPORTANT!
KillMode=process
WorkingDirectory=/path/to/EdgeBinaries
ExecStart=/path/to/EdgeBinaries/Luna.Service -f /path/to/config/appsettings.xml -o /path/to/config/otasettings.xml -s "sfedge"
User=root
SyslogIdentifier=senseforce-edge
Restart=always
RestartSec=10
[Install]
WantedBy=default.target
```

3\. Register the edge for autostart by executing the following command

```
systemctl enable sfedge.service
```

4\. Start or stop the service with following commands

```
systemctl start sfedge.service
systemctl stop sfedge.service
```

The above steps register a systemd service called edge.service.

{% hint style="warning" %}
Make sure to replace /path/to/EdgeBinaries in the above edge.service file with the real disk location of your edge binaries.&#x20;
{% endhint %}

{% hint style="warning" %}
Make sure to replace /path/to/config in the above sfedge.service file with the real disk location of your configuration files (appsettings.xml and otasettings.xml)
{% endhint %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://manual.senseforce.io/manual/senseforce-edge/edge-installation.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
