> For the complete documentation index, see [llms.txt](https://knowledgebase.flaik.com/flaik-knowledge-base/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.flaik.com/flaik-knowledge-base/for-it-specialists/pos-integration-how-flaik-connects-to-your-pos/pos-integration-api-overview/how-to-install-the-flaik-resort-api-and-expose-it-to-an-external-url.md).

# HOW TO: Install the flaik Resort API and Expose It to an External URL

> [Install Folder for Current releases](https://drive.google.com/drive/folders/1Safce3aAGzvwe1EoADroFAzmqpvg09XN).

### System requirements

* **Database:** Microsoft SQL Server 2012 or above.&#x20;
* **Service host:** Windows 10 or Windows Server 2016 or above, 64-bit.
* **.NET runtime:** none required. From 2.6.0 the service is published self-contained (.NET 8, x64) — the installer ships everything it needs.
* **Network:** TCP 1433 (or your SQL instance port) from the service host to the POS database server; outbound HTTPS to flaik IP's (will be supplied); inbound TCP 8001 (production) / 8002 (staging) if exposing the API externally.
* **SQL user:** a `FlaikId` SQL user with `db_owner` on the flaik database both SQL Authentication and Integrated options supported.
* flaik server IP addresses allow listed on the resort firewall. (supplied by flaik)

### Install (version 2.6.0 and later)

The 2.6.0 release ships a rebuilt MSI installer. If the machine currently runs a version installed **before 2.6.0** (up to and including 2.5.11), follow the upgrade guide instead — the old installation must be captured and removed first.

1. Download the installer for your environment (from the link provided by flaik):
   * Production: `Flaik.POS.Integration.Installer.<version>.msi`
   * Staging: `Flaik.POS.Integration.Installer.Staging.<version>.msi`
2. Run the MSI as an administrator and accept the license agreement.
3. Confirm the install folder. Default:
   * Production: `C:\Program Files\Flaik\Flaik POS Integration API\`
   * Staging: `C:\Program Files\Flaik\Flaik POS Integration API Staging\`
4. On the **flaik configuration** screen, select your POS software and enter a short site identifier (e.g. `YourEnterpriseName`):
   * RTP One
   * Siriusware
5. Finish the wizard. The installer registers a Windows service and attempts to start it:
   * Service name: `FlaikResortService` (production) / `FlaikResortServiceStaging` (staging)
   * Display name: "Flaik POS Integration API" (+" Staging")
   * Runs as `NT AUTHORITY\Local Service`, startup type Automatic (Delayed Start) On a fresh install the service will not stay running until the connection strings below are set — that is expected.

### Configure

Edit `appsettings.json` in the install folder. All values sit inside the `FlaikServiceSettings` section:

| Key                              | Value                                                                                                                                                                                                                                         |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `ApiKey`                         | **Leave empty.** The service generates a fresh key on first start and flaik central picks it up automatically via the Handshake endpoint. Do not paste keys from an older installation — they are machine/account-bound and will not decrypt. |
| `FlaikDatabaseConnectionString`  | Connection string to the flaik database                                                                                                                                                                                                       |
| `ResortDatabaseConnectionString` | Connection string to the POS database                                                                                                                                                                                                         |
| `ResortPosSoftwareCode`          | Set by the installer dialog. RTP One = 1, Siriusware = 2, InTouch = 5 (legacy — see note below), Guest Connect (FlaikV1) = 8                                                                                                                  |
| `InstallIdentifier`              | Set by the installer dialog — short site label used in flaik diagnostics                                                                                                                                                                      |

Provider-specific settings live in their own file alongside it: `appsettings.rtpone.json`, `appsettings.siriusware.json`, or `appsettings.InTouch.json`.

> **InTouch resorts:** new InTouch connections use flaik's direct API integration and do not install this service. The InTouch option in the installer supports existing sites only while they are migrated. Contact flaik support before setting up a new InTouch connection.

flaik encrypts the API key and database values on service startup.

After editing, restart the service (`Restart-Service FlaikResortService` or via services.msc).

Your configuration is preserved from now on: `appsettings.json` and the provider files are never overwritten by future upgrades or uninstalls.

Example database connection string:

```
Server=YourDatabaseServer;Database=FlaikStagingDatabaseHere;Trusted_Connection=True;MultipleActiveResultSets=True;Integrated Security=False;TrustServerCertificate=True;User Id=FlaikId;Password=YourPassword
```

### Database scripts

The installer places SQL migration scripts in the `SQL` subfolder of the install directory (e.g. `C:\Program Files\Flaik\Flaik POS Integration API\SQL\`), organised per provider (`RtpOne\`, `Siriusware\`, ...). Run the flaik scripts plus the folder matching your POS, or contact flaik support to run them with you.

1. **Create the flaik Database**:
   * You will need a small database created named `flaik` for production or `flaik_staging` for staging.
2. **Create SQL Logins**:
   * Create a SQL user called `FlaikId`, and grant it `db_owner` role for the flaik database. You can use AD or SQL server authentication.
   * Ensure the user has read permissions on the resort’s POS database.
3. **Run SQL Scripts**:
   * Execute any provided SQL scripts to modify the database schema as required. These are located inside the API's program files.

### Expose the API to an external URL

The service listens on **HTTP 8001** (production) or **8002** (staging) by default.

* Open the port on the resort firewall, or publish it via NAT / a reverse proxy.
* To change the listen port, set the environment variable `Kestrel__EndPoints__Http__Url` (e.g. `http://*:9000`) for the service. Do not change it by editing `appsettings.Production.json` — that file is replaced on every upgrade and the edit will be lost.
* For HTTPS, terminate TLS at your reverse proxy, or configure Kestrel with a `.pfx` certificate path and password. *(carried over from live page — Kestrel HTTPS config keys not re-verified this audit)*

### Verify

Browse to `http://<host-or-external-url>:8001/health` (production) or `:8002/health` (staging). A healthy response includes the service version and, from 2.6.0, the detected POS software version inside the provider configuration section.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://knowledgebase.flaik.com/flaik-knowledge-base/for-it-specialists/pos-integration-how-flaik-connects-to-your-pos/pos-integration-api-overview/how-to-install-the-flaik-resort-api-and-expose-it-to-an-external-url.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
