> For the complete documentation index, see [llms.txt](https://23yun.gitbook.io/23yun/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://23yun.gitbook.io/23yun/al_admin_esx/installation.md).

# Installation

### Preface

* There’s no need to install any additional environments like Node.js or PHP, nor run any extra services. <mark style="color:orange;">This is a plug-and-play solution.</mark>
* The default access address for the panel is `IP:23001`. For example: <mark style="color:orange;">`http://111.222.333.444:23001`</mark>. After [Installation](/23yun/al_admin_esx/installation.md), please open [Config](/23yun/al_admin_esx/config.md) to review the necessary configuration.
* If you require specific features or compatibility with certain plugins, please contact the author via **WeChat: wwc981222 or Discord:** [**https://discord.gg/crgjBszkKx**](https://discord.gg/crgjBszkKx)
* <mark style="color:red;">Do not use a VPN or proxy to log in</mark>, as this will cause the login verification to fail.

### Dependencies

1. oxmysql
2. [screenshot-basic](https://github.com/citizenfx/screenshot-basic), You can click the link or directly download the compressed file provided below.

{% file src="/files/v0zz3fZPVet2rmxgzqS7" %}

### Necessary Steps

1. Import all SQL files in the `sql` folder <mark style="color:orange;">**in ascending order**</mark>.
2. Open the `config.lua` file and configure the framework, inventory and other related information.
3. Navigate to `dist/static/config.js` and input your server’s information. Usually, you only need to modify the **IP** and **port**. The web panel port and WebSocket port generally do not require changes.
4. Open the `es_extended/server/classes/player.lua` file. Locate the line with `return self` near the bottom of the file. Insert the following code <mark style="color:red;">**above**</mark> that line, as shown in the example image.![](/files/QR3x7g3qUal0iBBb46Np)

```lua
local followInsert = {
    ['setAccountMoney'] = true,
    ['addAccountMoney'] = true,
    ['removeAccountMoney'] = true,
    ['setGroup'] = true,
    ['syncInventory'] = true,
    ['addInventoryItem'] = true,
    ['removeInventoryItem'] = true,
    ['setInventoryItem'] = true,
    ['setJob'] = true,
    ['addWeapon'] = true,
    ['removeWeapon'] = true,
}
for k, func in pairs(self) do
    if type(func) == 'function' then
        if followInsert[k] then
            self[k] = function(...)
                local args = { ... }
                local customData = {
                    resource = GetInvokingResource() or GetCurrentResourceName() or '',
                }
                TriggerEvent('al_admin:logger:insert', k, customData, self, ...)
                return func(...)
            end
        end
    end
end
```

5. Add the following line at the very bottom of your server.cfg file: `ensure al_admin`
6. (only ox\_inventory) Open the `es_extended/server/classes/overrides/oxinventory.lua` file. Locate the `syncInventory` function and add a parameter after the return function as shown in the diagram.![](/files/HGJjhjygYvCpKznQchGg)
7. (only ox\_inventory) Open the `ox_inventory/modules/bridge/esx/server.lua` file. Rewrite the `server.syncInventory` function as shown in the diagram.![](/files/YnMNuNg4AjHGoNRp0ACJ)

```lua
function server.syncInventory(inv, reason)
	local accounts = Inventory.GetAccountItemCounts(inv)

    if accounts then
        local player = server.GetPlayerFromId(inv.id)
        player.syncInventory(inv.weight, inv.maxWeight, inv.items, accounts, {resource = GetInvokingResource() or GetCurrentResourceName() or '', reason = reason})
    end
end
```

8. (Paid Upgrade)(only ox\_inventory) If you need better compatibility with ox\_inventory, please contact customer support on **WeChat: wwc981222**.

**Preview:**

<div><figure><img src="/files/Cfw1x3mptP4zgBrUCHDf" alt=""><figcaption></figcaption></figure> <figure><img src="/files/rCma1tTr9PJlXG6bpxTq" alt=""><figcaption></figcaption></figure> <figure><img src="/files/UocORTCu1fW7lD7iLT3a" alt=""><figcaption></figcaption></figure></div>

9. Restart your server

### Notes

If you encounter issues such as the webpage not opening or being unable to log in, please refer to the guide for troubleshooting steps.  [FAQ](/23yun/al_admin_esx/faq.md)
