Don't Starve TogetherGuideType these in your server's Console card to check the world, change the time and season, message players, ban, and save. No / at the start. Capital letters…
Type these in your server's Console card to check the world, change the time and season, message players, ban, and save. No / at the start. Capital letters matter, so copy each line as shown.
Open your server in My Servers, type in the Console card's command box and press Enter. Your server must be online. Swap the made-up names, numbers and messages in the examples for your own. To stop or restart, use the Power buttons.

Show the game version.
print(APP_VERSION)Show the server name.
print(TheNet:GetServerName())Show the world seed.
print(TheWorld.meta.seed)Show how many players can join.
c_getmaxplayers()Show the mods the server loaded. One line per mod.
for _,m in ipairs(ModManager:GetEnabledServerModNames()) do print(m, KnownModIndex:GetModFancyName(m)) endCount one kind of thing in the world. Put its name in the quotes.
c_countprefabs("beefalo")Count players online.
print(#GetPlayerClientTable())Count players on the surface.
c_getnumplayers()List players online. Admins have a star.
c_listplayers()List players on the surface only.
c_listallplayers()Kick a player. Use their KU id. Needs the player online.
TheNet:Kick("KU_hsTest01")Show day, time of day and season.
print(TheWorld.state.cycles + 1, TheWorld.state.phase, TheWorld.state.season, TheWorld.state.remainingdaysinseason)Show the day number and time of day.
print(TheWorld.net.components.clock:GetDebugString())Show the season and days left.
c_dumpseasons()Show temperature, moisture and rain.
print(TheWorld.net.components.weather:GetDebugString())Set the time of day. Use day, dusk or night.
TheWorld:PushEvent("ms_setphase", "night")Skip to the next part of the day.
TheWorld:PushEvent("ms_nextphase")Jump to the next day.
TheWorld:PushEvent("ms_nextcycle")Skip ahead whole days. Everything in the world ages by that many days.
c_skip(1)Change the season. Use autumn, winter, spring or summer. The season starts again from its first day.
TheWorld:PushEvent("ms_setseason", "winter")Make it rain or snow.
TheWorld:PushEvent("ms_forceprecipitation", true)Stop the rain or snow.
TheWorld:PushEvent("ms_forceprecipitation", false)Announce a message to everyone.
c_announce("Server restarts in 5 minutes")Repeat an announcement. The number is the seconds between messages.
c_announce("Be kind in chat", 600)Stop a repeating announcement.
if TheWorld.__announcementtask then TheWorld.__announcementtask:Cancel() TheWorld.__announcementtask = nil endBan a player. Use their KU id.
TheNet:Ban("KU_hsTest01")List banned players.
for i,v in ipairs(TheNet:GetBlacklist()) do print(i, v.userid, v.netid) endUnban a player. Change the KU id in both places.
local l={} for _,v in ipairs(TheNet:GetBlacklist()) do if v.userid ~= "KU_hsTest01" and v.netid ~= "KU_hsTest01" then table.insert(l,v) end end TheNet:SetBlacklist(l)End a running vote.
c_stopvote()All of these need the player online. Put the player's name in the quotes.
Bring a ghost back to life.
UserToPlayer("TestPlayer01"):PushEvent("respawnfromghost")Fill health, hunger and sanity.
local p=UserToPlayer("TestPlayer01") p.components.health:SetPercent(1) p.components.hunger:SetPercent(1) p.components.sanity:SetPercent(1)Turn god mode on or off. Send it again to switch back.
c_godmode("TestPlayer01")Teleport one player to another.
c_goto("TestPlayer01", "TestPlayer02")Give the first player who joined an item.
c_give("log", 20)Give a named player a stack of an item.
local p=UserToPlayer("TestPlayer01") for i=1,20 do p.components.inventory:GiveItem(SpawnPrefab("log")) endSpawn something next to a player.
local p=UserToPlayer("TestPlayer01") local x,y,z=p.Transform:GetWorldPosition() SpawnPrefab("beefalo").Transform:SetPosition(x,y,z)Unlock every recipe for a player.
c_freecrafting("TestPlayer01")Reveal the whole map for everyone online. It can't be undone.
for _,p in ipairs(AllPlayers) do local w,h=TheWorld.Map:GetSize() for tx=0,w,5 do for ty=0,h,5 do p.player_classified.MapExplorer:RevealArea(TheWorld.Map:GetTileCenterPoint(tx,ty)) end end endSave the world now.
c_save()Send us the command and what the Console printed, on Discord or at support@haptic.gg.