# getServerName (Server)

> Returns the server's name, from the `server_name` convar.

- **Platform**: MY Multiplayer (MYMP)
- **Kind**: Lua Function
- **Side**: Server
- **Category**: Server
- **URL**: https://wiki.mymp.gg/en/getServerName

## Syntax

```lua
string getServerName()
```

## Returns

The name. Without configuration, `"reSA server"`.

## Example

```lua
addEventHandler("onPlayerJoin", root, function()
    print(getPlayerName(source) .. " joined " .. getServerName())
end)
```

## See also

- [getServerPassword (Server)](https://wiki.mymp.gg/en/getServerPassword.md): Returns the password a player has to give to join.
- [getServerIP (Server)](https://wiki.mymp.gg/en/getServerIP-server.md): Returns the machine's public IPv4 address, read from its network interfaces at start.
