> For the complete documentation index, see [llms.txt](https://docs.linuxgsm.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.linuxgsm.com/commands/update.md).

# update

LinuxGSM comes with an game server `update` command. All [SteamCMD](/steamcmd.md) games servers are supported, as well as some other servers such as Teamspeak, Minecraft, Mumble & Factorio.

## Commands

Standard: `./gameserver update`

Short: `./gameserver u`

Update will check for any available update, taking no action if no update is available. If there is an update it will apply the update, restarting the server if already running.

For game servers that use [LinuxGSM Workshop downloads](/steamcmd/workshop.md#linuxgsm-workshop-downloads) (v26.4.0+), `update` also updates the Workshop mods set in `workshopmods`, the same as [workshop-update](/commands/workshop-update.md).

## Automatic update

### Update on start

It is possible to update a game server on start, by editing the LinuxGSM config.

`updateonstart="on"`

This will take longer for the game server to start but can be useful for servers that are kept offline most of the time.

### Scheduled updates

A [cronjob](/configuration/cronjobs.md) can be set to run `update` at any given time.

To edit cronjobs, type:

`crontab -e`

A cronjob can be run as the `gameserver user` or as `root`, this choice is down to personal preference. Remember to amend the examples to match a specific game server.

Here is an example of a user based cronjob to check for an update once an hour.

```
0 * * * * /home/username/gameserver update > /dev/null 2>&1
```

Here is an example of a root based cronjob to check for an update once an hour.

{% hint style="info" %}
The extra `su - username -c` indicates which user to run the script as.
{% endhint %}

```
0 * * * * su - username -c '/home/username/gameserver update' > /dev/null 2>&1
```

It is recommended to check for updates once per hour.

[crontab.guru](https://crontab.guru/) is a great resource to generate cronjobs.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.linuxgsm.com/commands/update.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
