# How to Add a Custom Spawn to a Project Zomboid Server

Add custom spawn points to a Project Zomboid server with spawnregions.lua and a spawnpoints file, per profession and for map mods, and the SpawnPoint trap.

Updated 2026-10-03. https://gamezservers.com/guides/how-to-add-a-custom-spawn-to-a-project-zomboid-server

To add a custom spawn to a Project Zomboid server, create `servertest_spawnpoints.lua` in `Zomboid/Server/` with your coordinates, for example `unemployed = { { posX = 10606, posY = 9474, posZ = 0 } }`, and add `{ name = "Our Base", serverfile = "servertest_spawnpoints.lua" }` to `servertest_spawnregions.lua` in the same folder. Use your server's name instead of `servertest`. Stop the server first, and keep `SpawnPoint=0,0,0` in the ini, because any other value forces everyone to one spot and hides the spawn list.

## What you are working with

| File | What it does | Where it lives |
| --- | --- | --- |
| `<servername>_spawnregions.lua` | The list of towns players can pick on the spawn screen | `Zomboid/Server/` |
| `<servername>_spawnpoints.lua` (any name ending in `spawnpoints.lua`) | Your own spawn coordinates, per profession | `Zomboid/Server/` |
| `media/maps/<Town>/spawnpoints.lua` | The game's built in spawns for each town | Game files, referenced with `file =` |
| `<servername>.ini`, `SpawnPoint=` | Forces one spawn for everyone when not `0,0,0` | `Zomboid/Server/` |

| Who it affects | Uses the new spawn? |
| --- | --- |
| New characters | Yes |
| Players who die and make a new character | Yes |
| Existing characters | No, they stay where they logged out |

## Before you start

- **Stop the server.** It reads these files on start, and edits made while it runs are ignored.
- **Back up** the ini and the lua files in `Zomboid/Server/`.
- **Know your server name.** Home servers default to `servertest`. Every file name starts with it.
- **Check the build.** This guide uses the Build 42 format. Build 41 notes are at the end.

## Step 1: Find the coordinates

Open the community map at [map.projectzomboid.com](https://map.projectzomboid.com/), choose the right build, and hover over the spot. It shows the world tile coordinates `x, y`. The third number, `z`, is the floor: `0` outdoors and on ground floors, `1` for the first upstairs floor, and so on.

Pick an open tile, not a wall or a locked room. To check a spot in game, an admin can type `/teleportto 10606,9474,0`.

## Step 2: Write the spawnpoints file

Create `Zomboid/Server/servertest_spawnpoints.lua`:

```
function SpawnPoints()
    return {
        unemployed = {
            { posX = 10606, posY = 9474, posZ = 0 },
            { posX = 10612, posY = 9480, posZ = 0 },
        },
        policeofficer = {
            { posX = 10863, posY = 10247, posZ = 0 },
        },
    }
end
```

Each key is a profession, written as its lowercase ID: `unemployed`, `policeofficer`, `fireofficer`, `doctor` and so on. A profession with no list of its own uses the `unemployed` list, so always include `unemployed`. Several points in one list spread players out, and the game picks one at random.

Build 42's own spawn files use these absolute `posX`, `posY`, `posZ` world coordinates, the same numbers the map shows.

## Step 3: Add it to the spawn regions

Open `Zomboid/Server/servertest_spawnregions.lua`. It looks like this, with the default towns:

```
function SpawnRegions()
    return {
        { name = "Muldraugh, KY", file = "media/maps/Muldraugh, KY/spawnpoints.lua" },
        { name = "Riverside, KY", file = "media/maps/Riverside, KY/spawnpoints.lua" },
        { name = "Rosewood, KY", file = "media/maps/Rosewood, KY/spawnpoints.lua" },
        { name = "West Point, KY", file = "media/maps/West Point, KY/spawnpoints.lua" },
        { name = "Our Base", serverfile = "servertest_spawnpoints.lua" },
    }
end
```

Note the two keys. `file` points into the game's `media/maps` folder. `serverfile` points to a file in `Zomboid/Server/`, by file name only. Every entry ends with a comma.

To make your spawn the only choice, delete the town lines and keep yours.

## Step 4: Check SpawnPoint in the ini

Open `Zomboid/Server/servertest.ini` and find:

```
SpawnPoint=0,0,0
```

Leave it at `0,0,0`. Then start the server, make a new character and check that **Our Base** is in the list.

## Spawns for map mods

Map mods usually ship their own `spawnpoints.lua`. With the mod installed and its folder in the ini's `Map=` line, add a region pointing to it:

```
{ name = "My Map Mod", file = "media/maps/<MapFolder>/spawnpoints.lua" },
```

`<MapFolder>` must match the mod's map folder name exactly, the same name you put in `Map=`, which you will find in the mod's files or Workshop description. Getting the map mod itself running is covered in [how to add map mods to a Project Zomboid server](https://gamezservers.com/guides/how-to-add-map-mods-to-a-project-zomboid-server).

![A crowd of zombies at a Kentucky crossroads in Project Zomboid, the reason a safe custom spawn matters](https://gamezservers.com/games/project-zomboid/shot-3.jpg)

## The gotcha: SpawnPoint wins over everything

The ini has one line that silently overrides all of this. When `SpawnPoint=` holds anything other than `0,0,0`, every new character spawns on that exact tile, the spawn region list is skipped, and your carefully written spawn files appear to do nothing. Server owners often set it once for an event or copy an ini from someone else, then forget it. If your custom region never shows up, check `SpawnPoint` first.

The second trap is old tutorials. Build 41 spawn files used a cell format: `worldX` and `worldY` for the cell, then `posX` and `posY` inside the 300 tile cell. Build 42 changed the map's cell size, so numbers worked out the old way land players in the wrong place, sometimes inside walls or in the void. On Build 42, use the plain world coordinates from the map, like the vanilla Build 42 files do.

## Common problems

- **Custom region not in the list:** `SpawnPoint` is not `0,0,0`, the file name in `serverfile` is wrong, or a Lua error (often a missing comma) stops the file loading.
- **Players spawn inside a wall or fall:** wrong coordinates or the wrong `z` floor. Check with `/teleportto`.
- **Only some professions use it:** fine if intended. Otherwise put the points under `unemployed`, which every profession falls back to.
- **Edits did nothing:** the server was running when you saved, or you edited files for a different server name.
- **Map mod spawn missing:** the map is not in `Map=`, or the folder name in `file` does not match.

## Custom spawns on GamezServers

On a [GamezServers Project Zomboid server](https://gamezservers.com/games/project-zomboid), the save name is **GamezServers** unless you changed it, so the files are `.cache/Server/GamezServers_spawnregions.lua`, `GamezServers.ini`, and your own `GamezServers_spawnpoints.lua` in the same folder. Stop the server, edit them in the **Files** tab, press **Backup**, and start again. Our panel rewrites a few ini lines on each start, such as the password, player count, mods and `Map`, but leaves `SpawnPoint` and the spawn files alone. More ini settings are in [best Project Zomboid server settings](https://gamezservers.com/guides/best-project-zomboid-server-settings).

## FAQ

### Where is the spawnregions file in Project Zomboid?

In `Zomboid/Server/` next to your server's ini, named `<servername>_spawnregions.lua`, for example `servertest_spawnregions.lua`.

### How do I make everyone spawn in one place?

Either set `SpawnPoint=x,y,z` in the ini, which forces one tile and hides the town list, or keep a single region in spawnregions with several points in it.

### Do existing players move to the new spawn?

No. Only new characters use spawn points. Existing characters stay where they logged out.

### Can I give each profession its own spawn?

Yes. Add a list per profession ID, like `policeofficer` or `doctor`, in your spawnpoints file, and keep an `unemployed` list as the fallback.
