Ir para o conteúdo principal
Version: bleeding-edge 🩸

Configuração Servidor

Tudo que você precisa saber para configurar seu servidor!

Arquivo de configuração

O arquivo de configuração do servidor Config.toml é gerado automaticamente quando o servidor é iniciado pela primeira vez. Este arquivo será sempre substituído com o padrão adequado depois que o servidor é carregado.


nanos world Config files use TOML (Tom’s Obvious, Minimal Language), please refer to for more information and syntax.


Configurações Detalhadas

NomeNome do Servidor
DescriçãoDescrição do Servidor
LogotipoURL da imagem a ser exibida na lista de servidores
alto_jogadoresMax amount of players allowed to join
SenhaSenha para conectar
ipIP do servidor. Recomendamos deixar em branco
PortaServer main Port and HTTP Port (UDP/TCP)
query_portServer query Port (UDP)
anunciarSe deseja anunciar ou não na Lista de Servidores
índice_deMarcação do Servidor em ms. Nós recomendamos sair disso 33
nível_logQual nível de log para a saída
modo_jogogame-mode package to load - you can only load one game-mode at once.
carregando_telaloading-screen package to load - you can only load one loading-screen at once.
pacotesscript packages to load
mídiasRecursos adicionais para carregar forçadamente
MapaQual mapa carregar
tokenServer Token used for authorize downloads through CLI
banned_idsList of banned nanos account IDs

Mapa & Nível

The Map (or Level) is defined in the Server’s config file, this level will be loaded when the player joins the server and the Path is supposed for be or a built-in asset or an asset which is located at Assets/ folder.

nanos world counts on (for now) 4 built-in maps: nanos-world::BlankMap, nanos-world::EmptyMap, nanos-world::OceanMap and nanos-world::TestingMap which can be used in your server without needing to download any Asset Pack.

Console do Servidor

Comandos Integrados

chat [message]Envia uma mensagem de bate-papo
map [map_path]Changes the Map, reloads all Packages and reconnect all Players
PararInterrompe o servidor
executar pacote [package_name] [lua_code]Executa um código em um pacote
recarregar pacote [package_name]Recarrega um pacote
recarregar todos os pacotesRecarrega todos os pacotes
descarga de pacote [package_name]Descarrega um pacote
carga do pacote [package_name]Carrega um pacote

Comandos personalizados

All (non built-in) commands will be sent into an event to the scripting/server-side:

Server.Subscribe("Console", function(my_input)
Package.Log("Comando de Console recebido: " .. meu_input)

Parâmetros da linha de comando

É possível substituir a configuração do servidor com parâmetros de linha de comando. Nota: isto não irá gravar no arquivo de configuração.

ParameterTipo de ValorDescription
--namestringNome do servidor
--descriçãostringDescrição do servidor
--logostringServer Logo
--senhastringSenha do servidor
--ipstringIP do Servidor
-mapastringMapear para carregar
--PortanumberPorta do servidor
--query_portnumberServer Query port
--anunciar0 ou 1Se anunciar na lista mestra
--game_modestringServer game-mode
--loading_screenstringServer loading-screen
--pacoteslista de stringsPacotes de servidores
--assetslista de stringsServer assets
--tokenstringServer authorization token
--max_playersnumberMáximo de jogadores permitidos
--salvar0 ou 1Se salvar os parâmetros em Config.toml
--profiling0 ou 1Enables Performance Profiling Logs for debugging
--auto_download0 ou 1Automatically downloads Packages and Assets from Vault if needed
--dedicated_server0 ou 1If to start as a Dedicated Server or P2P
--async_log0 ou 1If to use async or sync logs (async provides better performance) - default is 1

One-liner Server Configuration

With Command Line Parameters and Command Line Interface (CLI), it is also possible to automate the full server installation, here's an example:

# Installs/Updates the server through SteamCMD
steamcmd +force_install_dir /home/nanos-world-server +login anonymous +app_update "1936830 -beta bleeding-edge" validate +quit

# Installs all needed Packages (this will install needed Assets as well)
./ --cli install package sandbox battlefield-kill-ui ts-fireworks-tools

# Starts the server with all configs set
./ --name "nanos world Amazing Sandbox" --description "Awesome Sandbox Server" --map "nanos-world::TestingMap" --gamemode "sandbox" --packages "battlefield-kill-ui,ts-fireworks-tools" --port 7777 --query_port 7778 --max_players 32 --logo ""

Another shorter example:

# Starts the server with all configs set and auto downloads the packages and assets if needed
./ --name "nanos world Amazing Sandbox" --description "Awesome Sandbox Server" --map "nanos-world::TestingMap" --gamemode "sandbox" --packages "battlefield-kill-ui,ts-fireworks-tools" --port 7777 --query_port 7778 --max_players 32 --auto_download 1 --logo ""

Common Console Messages and Errors

Clique no servidor também/extrema alta! Verifique a performance do servidor! Server got stuck for Xms...

It means the server got stuck for X milliseconds. The warning (yellow) is not something to worry about, but too many messages in red) could mean your server infrastructure is not that good or your scripting code is not that optimized.

Usually the server runs at 33 ticks per second (or the value configured at Config.toml), the server runs in an infinite loop in that frequency, and inside that loop all server operations are executed, such as receiving and sending network packets, triggering lua events, executing functions or callbacks, and so on.

If a single tick takes more than 33 milliseconds, this warning will appear up.


In some shared VPS, this warning may appear up more frequently due how the VPS handles the scaling of it's machines, sometimes the provider may think your VPS is "idle" (due nanos world server using extremely low CPU) and may decrease your processing power, causing this warning show up as well.

Assertion Failed: [...] problem (5002) We don't have cert, and self-signed certs not allowed...

This is an internal problem from Steam Library when you attempt to connect to a server too fast (when it has just started). The server automatically fixes it by retrying the connection, there is nothing to worry about.

Lua Stack Error: Should be X, is Y...

This is an internal error and should not supposed to happen. Those are guards set around our Lua Scripting implementation to prevent bad things from happening. If this error appears it means a implementation bug happened. Please communicate immediately with the devs, and if possible how to reproduce that!