Docker Installation
How to use Docker to setup a nanos world server.
Community Resource
The Docker setup is maintained by the community. For more details, visit the open source GitHub repository: nanos-world-server Docker.
You can run nanos world server in a containerized environment using Docker. This method works on any system that supports Docker (Linux, Windows, macOS).
Prerequisitesβ
- Docker (version 20.10 or higher)
- Docker Compose (version 2.0 or higher)
- At least 100MB of free disk space
Quick Start with Docker Composeβ
1. Create a docker-compose.yml file:β
services:
nanos-world-server:
image: olivatooo/nanos-world-server:latest
restart: unless-stopped
# Uncomment to always have the latest version
# pull_policy: always
ports:
- "7777:7777/udp"
- "7777:7777/tcp"
volumes:
- ./Packages:/app/Packages
- ./Assets:/app/Assets
# Uncomment and modify to pass parameters to the server
# command: ["--port", "7777", "--map", "MyMap"]
2. Start the server:β
docker-compose up -d
3. View logs:β
docker-compose logs -f
4. Stop the server:β
docker-compose down
Using Docker CLIβ
Alternatively, you can run the server directly with Docker:
docker run olivatooo/nanos-world-server
Configurationβ
You can pass server parameters by modifying the command section in docker-compose.yml:
command: ["--max-players", "32", "--announce"]
Persistent Dataβ
The Docker configuration mounts a volume to /app inside the container. This allows you to:
- Persist server configuration files
- Add custom packages and assets
- Access server logs
- Maintain saved data between container restarts
Updating the Serverβ
To update to the latest version:
docker-compose pull
docker-compose up -d