# Installation

## Important when updating

Do **not** delete or overwrite your existing `wlabs-tablet/data/` folder when updating. This folder stores player tablet data such as gallery/app storage and the applied email domain.

Before updating an existing install:

1. Stop the resource or server.
2. Back up your existing `wlabs-tablet/data/` folder.
3. Back up your existing `config.lua` and any custom app/icon changes.
4. Upload the new script files.
5. Restore your saved `data/` folder and merge your config changes.
6. Start the resource again.

Never drop the existing `wlabs_tablet_*` database tables during an update unless you intentionally want to erase player tablet mail/accounts/contacts.

## 1. Place Resource

Place `wlabs-tablet` in your server resources folder and ensure/start it in your server.cfg.

## 2. Import Database

Import:

`sql/wlabs_tablet.sql`

## 3. Configure `config.lua`

Review:

* `Config.UseItem`
* `Config.Framework`
* `Config.ItemName`
* `Config.EnableOpenCommand`
* `Config.Keybind`
* `Config.Apps`
* `Config.Camera.Upload.method`

## 4. Configure Camera Upload Keys

If using `fivemanage`:

```server.cfg
set wlabs_tablet_upload_fivemanage_key "YOUR_FIVEMANAGE_API_TOKEN"
```

If using `fivemerr`:

```server.cfg
set wlabs_tablet_upload_fivemerr_key "YOUR_FIVEMERR_API_KEY"
```

## 5. Start Order

Start `wlabs-tablet` **after**:

* Framework core (`qbx_core`, `qb-core`, or `es_extended`)
* `ox_lib`
* `oxmysql`

## 6. Optional Item Setup

If `Config.UseItem = true`, ensure you add the item with name matching `Config.ItemName` to your inventory (`ox_inventory`, `qb-inventory`, or your ESX inventory/item setup).


---

# 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://w-labs.gitbook.io/w-labs-docs/scripts/wlabs-tablet/getting-started/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.
