Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion docs/configuration/server-properties.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,25 @@ The section symbol (§) and other unicode characters are automatically converted

![](../img/motd-example.png)

To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as
To produce a multi-line MOTD, embed a newline character as `\n` in the string, such as the following example.

!!! example "Multi-line MOTD"

With `docker run`

```
-e MOTD="Line one\nLine two"
```

or within a compose file

```yaml
MOTD: |
line one
line two
# or
# MOTD: "line one\nline two"
```

!!! tip

Expand Down
12 changes: 12 additions & 0 deletions examples/multiline-motd/docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
services:
mc:
image: itzg/minecraft-server
environment:
EULA: true
MOTD: |
line one
line two
# or
# MOTD: "line one\nline two"
ports:
- "25565:25565"