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

# Applying Updates

When a new version ships, the customer portal lists a download. The download is a single ZIP that updates both the server and the client. This guide walks through installing it.

{% hint style="info" %}
The portal dashboard shows an "Update Available" banner once your servers fall behind the latest release. Required updates (security hotfixes, deadline-driven) close the running server with a popup; you must apply them before it will start again.
{% endhint %}

## 1. Download the bundle

[axiomemu.com/portal/updates](https://www.axiomemu.com/portal/updates) → click the latest version → **Download**. You'll get a file named like `axiom-update-1.0.1.zip`.

## 2. Read the release notes

Extract the ZIP somewhere outside your server install (e.g. `C:\AxiomUpdates\1.0.1\`). Open `NOTES.md` first — it lists what changed in this version and any special steps. If it says something like "schema change, run migrations", do not skip step 6.

## 3. Back up everything

{% hint style="info" %}
You can skip the database backup part if there are no migrations in the update.
{% endhint %}

Two things to back up before touching anything:

**Database** — in SSMS, right-click `muonline` → **Tasks** → **Back Up...**, or run:

```sql
BACKUP DATABASE [muonline] TO DISK = 'C:\AxiomBackups\muonline_pre_1.0.1.bak' WITH INIT
```

**Server install folder** — close all servers first (next step), then zip the entire install folder (e.g. `C:\AxiomServer`) and put the zip somewhere safe. Same for the client folder if Main.exe is changing.

If anything goes wrong in steps 4–7, restoring these two backups puts you exactly where you started.

## 4. Stop the servers

Open `Tools\ServerStartUP\ServerStartUP.exe` → **Stop All**. Wait until every row says it's not running. If you launched the EXEs by hand, close each console window and confirm there are no `GameServer.exe`/`DataServer.exe`/`ConnectServer.exe`/`JoinServer.exe` processes left in Task Manager.

{% hint style="warning" %}
Do not skip this. Overwriting an EXE while it's running either fails outright or corrupts the file on disk.
{% endhint %}

## 5. Apply the bundle

Inside the extracted update folder you'll see these subfolders. Each one tells you what to do with the files inside it:

| Folder in the update | What to do                                                                                                               |
| -------------------- | ------------------------------------------------------------------------------------------------------------------------ |
| `binaries/`          | Copy each file over the same path in your install. These are full replacement EXEs and DLLs — overwrite without merging. |
| `added/`             | Brand new files. Copy them into the same path in your install.                                                           |
| `changed/`           | Existing files that were edited. See "Reading a `.diff` file" below.                                                     |
| `removed/`           | Files that should no longer exist. Each `.removed` marker tells you which file to delete from your install.              |
| `migrations/`        | SQL files. See step 6.                                                                                                   |

Paths inside the bundle mirror your install. For example, `binaries/server/GameServer/GameServer.exe` goes to `C:\AxiomServer\GameServer\GameServer.exe`. `binaries/client/Main.exe` goes to your client folder's `Main.exe`.

### Reading a `.diff` file

For each changed file you'll see two entries — a `.new` and a `.diff`:

```
changed/server/GameServer/DATA/GameServerInfo - Command.dat.new
changed/server/GameServer/DATA/GameServerInfo - Command.dat.diff
```

* `.new` is the full new version of the file. If you have **never edited** this file yourself, just overwrite your copy with the `.new` and rename it back (drop the `.new` extension).
* `.diff` shows you exactly what was added and removed. Use it when you have customized the file and don't want to lose your edits.

A `.diff` looks like this:

```diff
--- server/GameServer/DATA/GameServerInfo - Command.dat (prev)
+++ server/GameServer/DATA/GameServerInfo - Command.dat (new)
@@ -1,8 +1,4 @@
 [GameServerInfo]
-;==================================================
-; Post Command Settings
-;==================================================
-CommandPostType = 4

 ;==================================================
 ; Add Point Command Settings
```

How to read it:

* `---` line is the old file, `+++` line is the new file.
* `@@ -1,8 +1,4 @@` says "this section starts at line 1; old version had 8 lines here, new has 4."
* Lines starting with `-` were **removed**.
* Lines starting with `+` were **added**.
* Lines starting with a space ( ) are unchanged context, shown so you can find your spot in the file.

To apply it: open your version of the file in Notepad (or any editor), find the surrounding context lines, then delete the `-` lines and add the `+` lines. Save.

{% hint style="info" %}
**Conflicts.** If you customized a value the update also touches (e.g. you set `CommandPostType = 9` and the update removes the line), keep your customization unless `NOTES.md` says the change is required. When in doubt, ask in Discord.
{% endhint %}

## 6. Run database migrations

If the bundle has a `migrations/` folder with `.sql` files, run them in filename order against the `muonline` database. Filenames are numbered for this reason — `001_*.sql` before `002_*.sql`.

In SSMS: connect to your SQL Server instance → **File → Open → File...** → pick the first `.sql` → make sure the dropdown at the top shows `muonline` → **Execute** (F5). Repeat for the next file.

{% hint style="warning" %}
Run each migration **once**. Running the same migration twice can fail or duplicate data. If a migration fails partway through, restore the database backup from step 3 and ask in Discord before retrying.
{% endhint %}

If there is no `migrations/` folder in the bundle, skip this step.

## 7. Start the servers

`ServerStartUP.exe` → **Run All**, or launch the four EXEs manually in this order:

```
DataServer  ->  JoinServer  ->  ConnectServer  ->  GameServer
```

Each console should print a line confirming it activated the new version. Watch for red error lines in the first 30 seconds — those are usually a config field that wasn't merged correctly in step 5.

## 8. Distribute the client update

If the bundle changed `Main.exe` (or anything else under `client/`), your players need it too. Drop the new client files into your patch folder so your launcher picks them up on the next run. Players who launch the game will auto-download the new files.

If you don't run a launcher, hand the new client files out the same way you distributed the original install.

## 9. Verify

Within about 30 minutes the customer portal dashboard updates to show all four servers running the new version. Once it does, click **Mark as Updated** on the update banner.

In-game, check anything called out in `NOTES.md` actually behaves as described.

## Rolling back

If the new version misbehaves and you can't fix it quickly:

1. Stop the servers (step 4).
2. Restore the install folder from the zip you made in step 3.
3. Restore the database backup:

```sql
USE master;
ALTER DATABASE [muonline] SET SINGLE_USER WITH ROLLBACK IMMEDIATE;
RESTORE DATABASE [muonline] FROM DISK = 'C:\AxiomBackups\muonline_pre_1.0.1.bak' WITH REPLACE;
ALTER DATABASE [muonline] SET MULTI_USER;
```

4. Start the servers.

Then report what went wrong in Discord with the relevant log excerpt.

## Troubleshooting

<details>

<summary>"Update available" banner still shows after I updated</summary>

One of the four servers wasn't restarted, or one of them is still on the old EXE. Check each console — the activation line on startup includes the version. If one is wrong, stop that server, copy the EXE again, and start it.

</details>

<details>

<summary>I overwrote a file before reading the diff and lost my customization</summary>

Restore that file from the install-folder zip you made in step 3, then re-apply the diff by hand.

</details>

<details>

<summary>The update folder has only some of the listed subfolders</summary>

Normal. Small updates often only contain `binaries/` and a couple of `changed/` files. Folders only appear when there's something inside them.

</details>

<details>

<summary>SQL migration fails with "object already exists" or similar</summary>

The migration was likely run before. Check what changed by opening the `.sql` and comparing to the database (e.g. does the new column already exist on the table?). If everything in the migration is already applied, you can skip that file. If only some of it ran, restore the DB backup and ask in Discord — running it a second time may corrupt data.

</details>
