# FiveM

Complete guides for setting up and managing your FiveM server.

# Getting Started

## Starting the Server

<span style="white-space:pre-wrap;">Start your server from the panel by clicking </span>**Start**. The server console will display the startup logs.

<p class="callout info">If this is the first time the server has been started, the startup process may take slightly longer while the server initializes.</p>

## Accessing txAdmin

<span style="white-space:pre-wrap;">If </span>**txAdmin**<span style="white-space:pre-wrap;"> is enabled, the server will automatically start the txAdmin management interface.</span>

<span style="white-space:pre-wrap;">You can access it using the txAdmin address shown in the </span>**Network**<span style="white-space:pre-wrap;"> tab of your server panel.</span>

```
http://SERVER_IP:TxAdminPort
```

<p class="callout info">txAdmin may take a few seconds to become available after the server starts.</p>

When accessing txAdmin for the first time you will be prompted to create an administrator account and complete the server setup.

## Important Server Settings

Your server has several configurable startup settings available in the panel.

#### FiveM License Key

Your server's CFX license key. This is required for the server to start.  
The key is automatically passed to the server during startup.

#### FXServer Artifact Version

Controls which FXServer artifact build will be used by the server.  
The artifact version determines which version of the FiveM server runtime is installed.  
  
Valid values include:  
  
**latest** – Automatically install the newest available artifact (recommended)  
A specific artifact number – Installs that exact server build

#### Enable txAdmin

<span style="white-space:pre-wrap;">Controls whether the server starts with </span>**txAdmin**<span style="white-space:pre-wrap;"> enabled.</span>

- **On**<span style="white-space:pre-wrap;"> – Start using txAdmin</span>
- **Off**<span style="white-space:pre-wrap;"> – Start the server directly using the configuration file</span>

<p class="callout info">Most users should keep txAdmin enabled as it provides the easiest way to manage your server.</p>

#### txAdmin Port

The port used for the txAdmin web interface.  
You normally do not need to change this unless you want to change the port, must be one of your allocated ports.

#### Git Repository URL

If set, the server will automatically pull files from the specified Git repository every time the server starts.

Any files in the target folder will be overwritten to match the repository.

<p class="callout warning">Local file changes will be discarded when Git deployment is enabled.</p>

#### Git Branch

The branch that will be used when pulling the repository.

<span style="white-space:pre-wrap;">Default: </span>**main**

#### Git Target Path

The folder where the repository will be deployed.

Default:

```
/home/container/nontxserver
```

#### Git Username and Git Token

If you are using a private repository, these fields allow the server to authenticate when pulling from Git.

<p class="callout info">These values are not required when using public repositories.</p>

## Server File Locations

The server uses the following folder structure:

```
/home/container
├── .internal/        (server runtime files)
├── nontxserver/      (server files when not using txAdmin)
```

<p class="callout info">Most users will manage their server through txAdmin and will not need to interact with these folders directly.</p>

## If the Server Fails to Start

Check the server console for error messages. Startup errors are usually caused by:

- Invalid server configuration
- Missing or incorrect license key
- Errors in resources or scripts

# Understanding the FiveM Server Layout

<span style="white-space:pre-wrap;">Your FiveM server stores its files inside the </span>`<span class="editor-theme-code">/home/container</span>`<span style="white-space:pre-wrap;"> directory. This directory contains both the server runtime files and your actual server files.</span>

## Main Server Directory

```
/home/container
├── .internal/        (FXServer runtime files)
├── nontxserver/      (server files when not using txAdmin)
```

<span style="white-space:pre-wrap;">Most users will interact with files through </span>**txAdmin**<span style="white-space:pre-wrap;"> rather than editing these folders directly.</span>

<p class="callout info"><span style="white-space:pre-wrap;">Files inside </span>`<span class="editor-theme-code">.internal</span>`<span style="white-space:pre-wrap;"> are part of the server runtime and should not be modified.</span></p>

## The nontxserver Folder

<span style="white-space:pre-wrap;">This folder contains the server files used when the server is started </span>**without txAdmin**.

Typical contents include:

```
/home/container/nontxserver
├── server.cfg
├── resources/
└── other server files
```

<span style="white-space:pre-wrap;">If you are deploying your server using </span>**Git**, the repository will normally be placed in this folder.

## The server.cfg File

<span style="white-space:pre-wrap;">The </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> file is the main configuration file for your server.</span>

This file controls:

- Server name and description
- Resource loading
- Permissions and settings
- Database configuration

When running without txAdmin, this file is loaded automatically from:

```
/home/container/nontxserver/server.cfg
```

## The Resources Folder

<span style="white-space:pre-wrap;">Server scripts and mods are placed inside the </span>`<span class="editor-theme-code">resources</span>`<span style="white-space:pre-wrap;"> folder.</span>

```
/home/container/nontxserver/resources
```

<span style="white-space:pre-wrap;">Each resource must be started inside your </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> file.</span>

## Using Git Deployment

<span style="white-space:pre-wrap;">If </span>**Git deployment**<span style="white-space:pre-wrap;"> is enabled in the server settings, the server will pull files from the configured repository every time the server starts.</span>

<span style="white-space:pre-wrap;">The repository is deployed to the folder defined in </span>**Git Target Path**. By default this is:

```
/home/container/nontxserver
```

<p class="callout warning">When Git deployment is enabled, local file changes inside the target folder will be overwritten on server start.</p>

## txAdmin Managed Servers

<span style="white-space:pre-wrap;">When </span>**txAdmin**<span style="white-space:pre-wrap;"> is enabled, the server configuration and resources are typically managed directly through the txAdmin interface.</span>

txAdmin may create additional folders to store server profiles and configuration data.

<p class="callout info">For most users it is recommended to manage resources and server configuration through txAdmin</p>

# Accessing and Setting Up txAdmin

txAdmin is the web-based management interface used to configure and control your FiveM server.

## Accessing txAdmin

After starting your server, txAdmin will become available automatically.

<span style="white-space:pre-wrap;">You can access it from the </span>**Network**<span style="white-space:pre-wrap;"> tab in your server panel using the txAdmin port.</span>

```
http://SERVER_IP:txAdminPort
```

<p class="callout info">txAdmin may take a few seconds to start after the server begins running. If the page does not load immediately, wait a moment and refresh the page.</p>

## First Time Setup

The first time you open txAdmin you will be guided through a setup process.

During this process you will:

- Create a txAdmin administrator account
- Select a server configuration
- Configure your server settings

<p class="callout info">Your FiveM license key is automatically provided to the server by the hosting platform. You do not need to enter it during setup.</p>

## Selecting a Server Configuration

<span style="white-space:pre-wrap;">txAdmin provides several </span>**recipes**<span style="white-space:pre-wrap;"> for installing common server frameworks such as ESX or QBCore.</span>

You can either:

- Use a recipe to automatically install a framework
- Deploy an existing server configuration

<p class="callout info">Recipes install the framework, dependencies, and recommended resources automatically.</p>

## Database Configuration

Many server recipes require a database connection. During the setup process txAdmin will ask for database information.

Some fields may already be pre-filled automatically.

The following values are typically required:

- **Database Host**
- **Database Port**
- **Database Name**
- **Database Username**
- **Database Password**

<p class="callout danger">Make sure to create a database in the game control panels database tab if your FiveM server requires one!</p>

<p class="callout info">The database host is usually the same as your server IP But you can find all your database information from the game control panels database page.</p>

<p class="callout warning">The database name, username, and password must match the credentials created for your database. If these values are incorrect the server will fail to connect to the database.</p>

## Completing Setup

Once the configuration process is finished, txAdmin will automatically start your server.

You will then be able to manage your server through the txAdmin dashboard.

From the dashboard you can:

- Start and stop your server
- Install and manage resources
- View logs and console output
- Manage administrators

<p class="callout success">Your server is now ready for further configuration and resource installation.</p>

# Installing Resources on Your FiveM Server

Resources are the scripts and mods that add features to your FiveM server.

## Before You Start

Resources can be installed in different ways depending on how you manage your server.

- <span style="white-space:pre-wrap;">If you are using </span>**txAdmin recipes**, many resources may already be installed for you
- <span style="white-space:pre-wrap;">If you are using </span>**Git deployment**, resources should usually be added to your Git repository instead of uploaded manually
- <span style="white-space:pre-wrap;">If you are managing the server manually, resources are usually placed inside your server's </span>`<span class="editor-theme-code">resources</span>`<span style="white-space:pre-wrap;"> folder</span>

<p class="callout warning">If Git deployment is enabled and the resource folder is inside your Git target path, manual file changes will be overwritten the next time the server starts.</p>

## Where to Place Resources

When running without txAdmin, resources are typically stored in:

```
/home/container/nontxserver/resources
```

If you are using txAdmin, the resource location depends on how your server was deployed.

<p class="callout info"><span style="white-space:pre-wrap;">If you are unsure where your active resource folder is, check your </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> or the resource paths configured by txAdmin.</span></p>

## Uploading a Resource

To install a resource manually:

1. Download the resource files
2. <span style="white-space:pre-wrap;">Upload the resource folder to your server's </span>`<span class="editor-theme-code">resources</span>`<span style="white-space:pre-wrap;"> directory</span>
3. Make sure the resource stays inside its own folder
4. <span style="white-space:pre-wrap;">Edit your </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> to start the resource</span>

Example resource layout:

```
/home/container/nontxserver/resources/my_resource
├── fxmanifest.lua
├── client.lua
├── server.lua
```

<p class="callout warning">The resource folder itself must be uploaded, not just the files inside it.</p>

## Uploading Resources Using SFTP

<p class="callout danger">The web file manager does not support uploading folders directly.</p>

You have two options when uploading resources:

- <span style="white-space:pre-wrap;">Upload the resource as a </span>**.zip**<span style="white-space:pre-wrap;"> file and extract it using the </span>**Unarchive**<span style="white-space:pre-wrap;"> option in the file manager</span>
- <span style="white-space:pre-wrap;">Upload the resource using </span>**SFTP**, which allows you to transfer folders directly

<p class="callout info">SFTP is recommended when uploading larger resources or full server packs.</p>

To connect using SFTP:

1. <span style="white-space:pre-wrap;">Open the </span>**SFTP**<span style="white-space:pre-wrap;"> tab in your server panel</span>
2. <span style="white-space:pre-wrap;">Use the provided connection details with an SFTP client such as </span>**FileZilla**<span style="white-space:pre-wrap;"> or </span>**WinSCP**
3. <span style="white-space:pre-wrap;">Upload your resource folder to the server's </span>`<span class="editor-theme-code">resources</span>`<span style="white-space:pre-wrap;"> directory</span>

## Starting a Resource

<span style="white-space:pre-wrap;">After uploading the resource, add it to your </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> so the server starts it automatically.</span>

Example:

```
ensure my_resource
```

<span style="white-space:pre-wrap;">Add one </span>`<span class="editor-theme-code">ensure</span>`<span style="white-space:pre-wrap;"> line for each resource you want to load.</span>

<p class="callout info"><span style="white-space:pre-wrap;">Some older resources may state </span>`<span class="editor-theme-code">start resource_name</span>`<span style="white-space:pre-wrap;">, but </span>`<span class="editor-theme-code">ensure</span>`<span style="white-space:pre-wrap;"> is recommended.</span></p>

## Restarting the Server

Once the resource has been uploaded and added to your configuration, restart your server.

You can also start a resource manually from the console using:

```
ensure my_resource
```

## Installing Resources with Git

If your server uses Git deployment, resources should normally be added to your Git repository instead of uploaded in the file manager.

Typical workflow:

1. Add the resource to your repository
2. Commit and push the changes
3. Restart the server

On startup, the server will pull the latest version of the repository and update the files automatically.

<p class="callout warning">If Git deployment is enabled, manually uploaded resources inside the Git target folder will be removed or overwritten if they are not present in the repository.</p>

## Common Issues

If a resource does not load, check the following:

- <span style="white-space:pre-wrap;">The folder name matches the name used in </span>`<span class="editor-theme-code">ensure</span>`
- <span style="white-space:pre-wrap;">The resource contains a valid </span>`<span class="editor-theme-code">fxmanifest.lua</span>`<span style="white-space:pre-wrap;"> or </span>`<span class="editor-theme-code">__resource.lua</span>`
- All required dependencies are installed
- The files were uploaded to the correct resources folder

<p class="callout danger">If the server fails to start after adding a resource, check the console for errors. A broken resource, missing dependency, or invalid configuration can stop the server from loading correctly.</p>

# Deploying Your Server Using Git (Optional - Advanced Feature)

Your server supports automatic deployment from a Git repository. When configured, the server will pull the latest version of the repository every time the server starts.

This allows you to manage your server files using version control and update your server by pushing changes to your repository.

<p class="callout warning">When Git deployment is enabled, local file changes inside the Git target folder will be overwritten when the server starts.</p>

## How Git Deployment Works

If a repository URL is configured, the server will perform the following steps during startup:

1. Connect to the configured Git repository
2. Pull the selected branch
3. Overwrite the contents of the Git target folder
4. Start the server using the updated files

This ensures the server always runs the latest version of your repository.

## Configuring Git Deployment

Git deployment is configured using the startup variables in the server panel.

### Git Repository URL

The URL of the repository that contains your server files.

Example:

```
https://github.com/example/my-fivem-server.git
```

### Git Branch

The branch that should be deployed.

Default:

```
main
```

### Git Target Path

The folder where the repository will be deployed.

Default:

```
/home/container/nontxserver
```

<p class="callout info"><span style="white-space:pre-wrap;">Your </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> and resources should normally be located inside this folder when using Git deployment.</span></p>

### Git Username and Git Token

These fields are used when accessing private repositories.

Enter your Git username and a personal access token with repository access.

<p class="callout info">These values are not required for public repositories.</p>

## Typical Workflow

Once Git deployment is configured, updating your server becomes very simple:

1. Make changes to your server files locally
2. Commit and push the changes to your repository
3. Restart the server

On startup, the server will pull the latest version of the repository and update the server files automatically.

## Example Repository Layout

```
repository-root
├── server.cfg
├── resources/
│   ├── resource_one/
│   ├── resource_two/
│   └── resource_three/
```

## Common Issues

If Git deployment fails, check the following:

- The repository URL is correct
- The branch name exists
- Git credentials are correct when using a private repository
- The server has permission to access the repository

<p class="callout danger"><span style="white-space:pre-wrap;">If Git deployment fails, the server may not start if required files such as </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> are missing.</span></p>

# Troubleshooting Server Startup Issues

<span style="white-space:pre-wrap;">If your server fails to start, the most useful information will always be found in the </span>**server console**. The console shows the full startup process and any errors that occur.

<p class="callout info">Always check the console logs first when diagnosing startup issues.</p>

## Common Causes

### Invalid or Missing License Key

Your server requires a valid FiveM license key to start.

If the key is missing or invalid, the server may stop during startup.

<span style="white-space:pre-wrap;">Make sure the </span>**FiveM License Key**<span style="white-space:pre-wrap;"> variable is correctly set in the server panel.</span>

<p class="callout info">License keys can be generated at https://keymaster.fivem.net</p>

### Broken or Missing Resources

If a resource fails to load, it may stop the server from starting.

Common problems include:

- Missing files inside a resource
- <span style="white-space:pre-wrap;">A missing </span>`<span class="editor-theme-code">fxmanifest.lua</span>`<span style="white-space:pre-wrap;"> or </span>`<span class="editor-theme-code">__resource.lua</span>`
- <span style="white-space:pre-wrap;">Incorrect resource names in </span>`<span class="editor-theme-code">server.cfg</span>`
- Missing dependencies

<p class="callout warning">If the server stops during resource loading, check the last resource listed in the console logs.</p>

### Incorrect server.cfg Configuration

<span style="white-space:pre-wrap;">Errors in your </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> file can prevent the server from starting.</span>

Common issues include:

- Invalid configuration values
- Incorrect database settings
- Resources listed that do not exist

<span style="white-space:pre-wrap;">Check your </span>`<span class="editor-theme-code">server.cfg</span>`<span style="white-space:pre-wrap;"> file and confirm all referenced resources exist.</span>

### Database Connection Errors

If your server uses a framework such as ESX or QBCore, a database connection is usually required.

If the database credentials are incorrect, the server may fail to start.

Verify the following values:

- Database host
- Database port
- Database name
- Database username
- Database password

<p class="callout warning">If the database cannot be reached, the framework may fail to load and stop the server.</p>

### Git Deployment Issues

If Git deployment is enabled, the server will pull files from the configured repository during startup.

Startup may fail if:

- The repository URL is incorrect
- The branch does not exist
- Git credentials are invalid
- The repository does not contain required server files

<p class="callout warning">Git deployment will overwrite the contents of the configured target folder during startup.</p>

## Still Having Issues?

If you are unable to identify the issue, review the server console logs and look for the first error message shown during startup.

<p class="callout danger">If the server fails repeatedly during startup, avoid repeatedly restarting it without reviewing the console logs. This can make diagnosing the problem more difficult.</p>