# Installation

{% hint style="danger" %}
If you are transferring files using FTP transfer your files using [winscp ](https://winscp.net/eng/download.php)program. Filezilla transfers files as corrupted.

If you are switching from v1 to v2, you need to remove the gksphone\_\* tables in the database.
{% endhint %}

{% embed url="<https://www.youtube.com/watch?v=06a9iddaCrw>" %}

## Step 1: File Location <a href="#step-1-file-location" id="step-1-file-location"></a>

* Create a \[phone] folder inside the main source file and extract the files in the zip to this folder.

{% hint style="info" %}
If you are using ox\_inventory, follow the steps on the [documentation page](https://docs.gkshop.org/gksphone-v1/gksphonev2/pages/Gj9n0AG6XcPyzB7I4g0R#id-1.-ox_inventory)
{% endhint %}

## Step 2: Insert SQL Query <a href="#step-2-insert-sql-query" id="step-2-insert-sql-query"></a>

{% hint style="danger" %}
Before running the SQL file, make sure to delete all tables starting with `gksphone_` in your database.
{% endhint %}

* Run the **gksphone/gksphonev2.sql** file into your database.

{% embed url="<https://www.youtube.com/watch?v=40rEUkF2mso>" %}

## Step 3: Serverconfig.lua Configuration <a href="#step-3-serverconfig.lua" id="step-3-serverconfig.lua"></a>

* You can use any media service you want. The media upload systems we recommend are GKS Media, Discord Webhook, Fivemerr and Fivemanage.

{% hint style="info" %}
Write the following code in the relevant places in the serverconfig.lua file and edit only the AuthToken section.
{% endhint %}

{% code title="serverconfig.lua" %}

```lua
--Options: "gksmedia", "fivemanage", "fivemerr", "discord", "customMedia"
Cfg.MediaService = "gksmedia"  

-- Fill in these fields according to the service you selected:
Cfg.AuthTokenImage = ""    -- Token/API/webhook for image sharing
Cfg.AuthTokenAudio = ""    -- Token/API/webhook for audio sharing
Cfg.AuthTokenVideo = ""    -- Token/API/webhook for video sharing
```

{% endcode %}

### **Music and Playtube App Configuration**

{% hint style="info" %}
You must write your gksphone purchase tbx-id in Cfg.TebexTransactionID in serverconfig.lua file. If you don't know tbx-id, check your [tebex purchase history.](https://checkout.tebex.io/payment-history/login)
{% endhint %}

<figure><img src="/files/QQYJWU0JGbqgtgYEALyq" alt=""><figcaption><p>gksphone/config/serverconfig.lua</p></figcaption></figure>

{% hint style="warning" %}
if you lose your Tebex ID, we will not be able to help you find it.
{% endhint %}

### **Log Configuration of Applications**

{% hint style="info" %}
In this section of the serverconfig.lua file, you only need to enter the discord webhooks for the applications you want to log.
{% endhint %}

<figure><img src="/files/t9ikUhbQ2B3BwcBssjYN" alt=""><figcaption><p>gksphone/config/serverconfig.lua</p></figcaption></figure>

## Step 4: Server.cfg Configuration <a href="#step-6-server.cfg-configuration" id="step-6-server.cfg-configuration"></a>

Just start the phone file is enough.

```
-- First we will start the framework, never below
ensure oxmysql
ensure es_extended or qb-core

-- These resources must be started before the phone
ensure your_banking
ensure your_inventory
ensure your_housing
ensure your_garages

-- the other scripts don't matter - they can be started before or after no difference


-- The phone system
ensure [phone]
```


---

# 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://docs.gkshop.org/gksphone-v1/gksphonev2/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.
