# Web Configuration

### Configuring the config.php file <a href="#configuring-the-config.php-file" id="configuring-the-config.php-file"></a>

Firstly, find the **config.php** file within the **File Manager**. Right-click, and click **Edit**.

### 1 - Default Timezone

You can set the default timezone of which you'd like the panel to run under. By default it's set to GMT, however, you can change this to your servers' primary timezone. Example: EST.

### 2 - Base URL

You'll want to set the Base URL to the primary domain that your staff panel will run under. For example, if you've created a sub-domain as `staff.hamz.dev`, set it to `https://staff.hamz.dev`. Do not add a trailing slash.

### 3 - MySQL Connection

Going back to the database information you previously created in the [Web Installation](https://docs.hamz.dev/hamz-staff-elite-panel/web-installation) step. Add the information below.

```
// SQL DATABASE CONNECTION \\
define('DB_HOST', 'localhost');
define('DB_USER', 'root');
define('DB_PASSWORD', '');
define('DB_NAME', 'hamzpanel');
```

If you're using SimplisticNode, you can keep the `DB_HOST` as `localhost`, however, if you're using a third party, confirm with them what their host needs to be.

**IMPORTANT:** If you are using cPanel web hosting, ensure you put the full username and database user/name. Example: `coobikxy_staffpanel`

### 4 - Discord OAuth

Next, you'll need to add your Discord bot information here.

```
define('TOKEN', 'INSERT_HERE');
define('GUILD_ID', 'INSERT_HERE');
define('OAUTH2_CLIENT_ID', 'INSERT_HERE');
define('OAUTH2_CLIENT_SECRET', 'INSERT_HERE');
```

Similar to the MySQL Database information above, enter your Discord bot information as per your Developer portal.

**Token** - This is your Bot token, found within Discord Developers > Bot > Token

**Guild ID** - Ensure you have Developer mode turned on in Discord, right-click the server icon, click Copy Server ID, and paste it into the table.

**OAuth Client ID** - This is your Bot token, found within Discord Developers > OAuth2 > General > Client ID

**OAuth Client Secret** - This is your Bot token, found within Discord Developers > OAuth2 > General > Client Secret

Whilst we're here, you can also go ahead and add your Redirect link for the Staff Panel.

Click **Add Redirect** on the OAuth2 page

<figure><img src="https://1343677498-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Fmh5jQDhFVLCuJsqAc1xh%2Fuploads%2F5ZRVQRKF43JYd8LcdA8p%2Fimage.png?alt=media&#x26;token=65e311d6-297a-4b76-8503-77bd64feeaaa" alt=""><figcaption></figcaption></figure>

In the URL box, using the **Base URL** above, copy that link but add the following to it:

```
/actions/register.php
```

So, once it's fully put together it'll look like **<https://staff.hamz.dev/actions/register.php>**

### 5 - General Server Config

Starting with Line 21, you'll want to create a secret code. This can be a word you remember, but ideally, create it as a string of letters and numbers. A [password generator](https://www.random.org/passwords/?num=5\&len=16\&format=html\&rnd=new) usually helps with this.

```
define('SECRET', 'Cgz6cvhmuRjUz9Ns');
```

Next, you'll need to generate a Steam API key, if your server doesn't already have one. Head over to the [Steam Developers portal](https://steamcommunity.com/dev/apikey) to create one.

### 6 - Server Information

Within the array for the server information, fill it out carefully.

```
[
   'server_name' => 'vMenu', // This should match the ingame script config.lua
   'server_ip' => '0.0.0.0',
   'server_port' => '30120',
   'server_rcon_pass' => 'Cgz6cvhmuRjUz9Ns'
]
```

The `server_rcon_pass` needs to be set to the same as what is set in the `server.cfg`.

### 7 - Discord Permissions

Lastly, line 36, enter the Role IDs for users who will have **full** admin access on the panel.

```
$ADMINROLES = [
	"1163293348874956840", // Community Director
	"1191593655224516689" // Developer
];
```
