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

# Updating

## Updating Bonsai Radio

Updating Bonsai Radio only takes a few minutes, but following the correct update process will help prevent configuration loss.

{% hint style="danger" %}
Always make a backup before updating the resource.
{% endhint %}

***

## Step 1 - Backup Your Current Resource

Before replacing any files, make a copy of your current resource.

For example:

```
bonsai_radio/
```

Rename the backup:

```
bonsai_radio_backup/
```

This allows you to quickly restore your previous version if something goes wrong.

***

## Step 2 - Download the Latest Version

Download the latest release from your cfx protal or Tebex account.

Extract the archive.

***

## Step 3 - Read the Changelog

Every update includes a changelog describing:

* New features
* Improvements
* Bug fixes
* Breaking changes
* Configuration changes

{% hint style="info" %}
Always read the changelog before updating.\
Some updates may require additional configuration changes.
{% endhint %}

***

## Step 4 - Add the Resource

Add the new version of bonsai\_radio to your resources folder.

***

## Step 5 - Compare Your config.lua

Do **not** simply overwrite your existing configuration.

Instead:

1. Open your old `config.lua`
2. Open the new `config.lua`
3. Compare both files
4. Copy any **new settings** from the updated config into your existing configuration

This ensures you keep all of your:

* Radio stations
* Metadata
* Advertisements
* Jingles
* Audio settings
* Custom logos
* Keybinds

{% hint style="warning" %}
Never replace your existing `config.lua` without checking for new configuration options first.
{% endhint %}

***

## Step 6 - Keep Your Custom Media

Updating the resource should not remove your custom media.

Your existing folders can simply be copied into the new resource.

For example:

```
audio/
images/stations/
images/covers/
```

If you have added your own advertisements or jingles, make sure these folders are copied as well.

***

## Step 7 - Run the Media Scanner

If you have:

* Added new songs
* Added advertisements
* Added jingles
* Moved media files

run:

```
auto_media_scanner.bat
```

This regenerates:

* `data/media_library.json`
* `metadata_template.lua`

***

## Step 8 - Restart the Resource

Restart Bonsai Radio:

```
restart bonsai_radio
```

Or restart your server.

***

## Need Help?

If you experience issues after updating:

1. Read the changelog.
2. Compare your configuration with the latest version.
3. Ensure all custom media has been copied.
4. Run `auto_media_scanner.bat` if your media has changed.
5. Restart the resource.

If the issue persists, please open a support ticket in discord and include:

* Your resource version
* The latest server console errors
* A description of the issue
* Any changes you made to the resource before updating


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://bonsai-docs.gitbook.io/bonsai-docs/bonsai-radio/updating.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
