godmode
Makes you invulnerable. When enabled, it restores health, energy, stamina, and fullness, disables hunger, thirst, and cold, and keeps energy and stamina full.
- Syntax
godmode <on|off|toggle>- Example
godmode on

The Forest cheats at a glance: all 6 title-screen cheat codes, from veganmode to developermodeon, and 77 console commands such as godmode, additem, buildhack, and goto in a searchable list with examples you can copy. For each command, see whether it works for you, only for the host, or for admins on a dedicated server. Plus a command builder for items, enemies, animals, and teleporting. Free, no sign-up required, in your browser.
Built by Florian Galz
Cheats in co-op? Set the rules with your own server.
Cheat codes for the title screen
Just type them on the main menu; there’s no input field. What each code does is listed below under “Cheat Codes”.
Searches command names, explanations, syntax, and notes. All search words must match.
77 of 77 commands
As of The Forest build 3488796
Makes you invulnerable. When enabled, it restores health, energy, stamina, and fullness, disables hunger, thirst, and cold, and keeps energy and stamina full.
godmode <on|off|toggle>godmode onKeeps energy and stamina at 100. Health and hunger remain normal.
energyhack <on|off>energyhack onsurvival off disables survival mechanics: hunger, thirst, cold, and lack of air underwater no longer harm you. survival on enables them again.
survival <on|off>survival offSets a character stat. setstat full restores health, energy, stamina, and fullness and sets thirst to 0.
setstat full | setstat <Health|Stamina|Energy|Fullness|BatteryCharge|sanity|strength|weight> <Wert>setstat sanity 100Sets your sanity to 100.
Enemies can no longer see you. invisible off makes you visible again.
invisible <on|off>invisible onRun and swim very fast. The game changes running speed from 9 to 60 and swimming speed from 3 to 20.
speedyrun <on|off>speedyrun onHairspray for the flamethrower no longer runs out.
unlimitedhairspray <on|off>unlimitedhairspray onDamages you, taking armor into account. Useful for testing armor or healing.
hitlocalplayer <Schaden>hitlocalplayer 20Kills your character instantly, ignoring armor.
killlocalplayerkilllocalplayerRevives your character while the game considers them dead. If you're still alive, the game reports that there's nothing to revive.
revivelocalplayerrevivelocalplayerInfects you with blood poisoning (on) or cures it (off).
infection <on|off>infection offPoisons your character, for example to test antidote plants.
poisonpoisonSaves the game immediately without a shelter or tent.
savesaveAdds an item directly to your inventory, as many as will fit. Find its name or ID with listitems or in the item list.
additem <Name|ID>additem 143Gives you the Rebreather (ID 143).
Removes an item completely from your inventory.
removeitem <Name|ID>removeitem 78Removes all logs (Log, ID 78).
Prints all item names and IDs to the console in alphabetical order.
listitemslistitemsFills your inventory with all items except story items.
addallitemsaddallitemsEmpties your inventory except for story items.
removeallitemsremoveallitemsGives you all story items, such as photos, letters, and keycards.
addallstoryitemsaddallstoryitemsRemoves all story items from your inventory.
removeallstoryitemsremoveallstoryitemsPlaces an item on the ground two meters in front of you instead of adding it to your inventory.
spawnitem <Name|ID>spawnitem 53 --10Places ten rocks (Rock, ID 53) in front of you.
Drops an item as though you threw it from your inventory, even if you don't have it.
spawnpickup <Name|ID>spawnpickup 54The inventory treats every item as present and unlimited. Crafting and using items no longer consumes anything.
itemhack <on|off>itemhack onCarry unlimited logs. If you have no log, the game adds one to your inventory.
loghack <on|off>loghack onSpawns an enemy four meters in front of you, from a regular cannibal to Armsy, Virginia, or the Worm.
spawnenemy <male|female|male_skinny|female_skinny|skinny_pale|pale|fireman|dynamiteman|armsy|vags|baby|fat|girl|worm>spawnenemy armsyKills all active cannibals and mutants and removes Worm nests.
killallenemieskillallenemiesKills the nearest enemy.
killclosestenemykillclosestenemyKnocks down the nearest enemy without killing them.
knockdownclosestenemyknockdownclosestenemyResets and respawns all enemies in numbers appropriate for the current day.
resetallenemiesresetallenemiesenemies off removes all enemies and keeps them away until you enter enemies on.
enemies <on|off|toggle>enemies offToggles Vegan Mode during gameplay. According to the in-game message, it only takes effect after you reload the save.
veganmode <on|off>veganmode onKills the final boss if it is loaded nearby. Otherwise, the game reports that no boss is present.
killendbosskillendbossKills all Worms that emerge from Worm nests.
killallwormskillallwormsSpawns an animal two meters in front of you.
spawnanimal <rabbit|lizard|deer|turtle|tortoise|raccoon|squirrel|boar|crocodile>spawnanimal deer --3Three deer in front of you.
Like spawnanimal, but the animal is trapped immediately and cannot run away.
spawnanimalquiet <rabbit|lizard|deer|turtle|tortoise|raccoon|squirrel|boar|crocodile>spawnanimalquiet rabbitKills the nearest animal.
killclosestanimalkillclosestanimalKills all active animals.
killallanimalskillallanimalsanimals off removes all animals, including geese, and prevents new ones from spawning; animals on brings them back.
animals <on|off|toggle>animals offTurns birds off (off) or back on (on).
birds <on|off>birds offTeleports you to a position or a named object in the game world. y is the height. If the position is more than 6 meters below the terrain, the game switches to cave mode.
goto <x> <y> <z> | goto <Objektname>goto 326 120 1231Teleports you to x 326, height 120, z 1231.
Teleports you to the first active enemy.
gotoenemygotoenemySets the day counter to a specific day. This affects how many enemies appear and which types.
setcurrentday <Tag>setcurrentday 50Skips from day to night or from night to morning.
advancedayadvancedayForces light, medium, or heavy rain, clouds, or sunshine. If omitted, the game chooses a random rain intensity.
forcerain <light|medium|heavy|cloud|sunny>forcerain heavyFreezes the lighting at a time of day while the in-game clock keeps running. off reverses this.
lightingtimeofdayoverride <morning|noon|sunset|night|HH:MM|off>lightingtimeofdayoverride 12:00Changes the speed of the entire game: 0.5 is slow motion, 2 is twice as fast, and 1 is normal.
timescale <Faktor>timescale 0.5Only changes how quickly in-game time passes, not movement speed.
gametimescale <Faktor>gametimescale 2Fully reveals the cave map in-game. Nothing happens if the map is not currently loaded.
revealcavemaprevealcavemapCuts down trees across the entire island. A number cuts down that many trees; a percentage cuts down that share of all trees. A negative number regrows felled trees. count only shows the current count.
cutdowntrees <count|Anzahl|Prozent%|-Anzahl>cutdowntrees 10%Cuts the grass around you. The default radius is 1.
cutgrass <Radius>cutgrass 10Build without materials: You can complete blueprints without having the resources. Hold down the build button to place the pieces in rapid succession.
buildhack <on|off|toggle>buildhack onAll creative building cheats in one: buildhack, no enemies, godmode, survival off, and all items at once.
buildermode <on|off>buildermode onCompletes all placed blueprints; the game supplies any missing materials.
buildallghostsbuildallghostsCancels all unfinished blueprints at once.
cancelallghostscancelallghostsPlants in every empty plot in all gardens.
plantallgardensplantallgardensAdvances the growth of plants in all garden plots by one stage.
growalldirtpilesgrowalldirtpilesShows the dedicated server admin commands in chat.
/help/helpKicks a player from the server. They can rejoin afterward.
/kick <SteamID|Name>/kick 76561197986247731Permanently bans a player from the server.
/ban <SteamID|Name>/ban 76561197986247731Lifts a ban.
/unban <SteamID|Name>/unban 76561197986247731Kicks a player from the server using their connection ID if their name or SteamID does not work.
/kickbycid <Verbindungs-ID>/kickbycid 2Bans a player by their connection ID.
/banbycid <Verbindungs-ID>/banbycid 2Saves the game on the server. Add a number from 1 to 5 to save to that slot.
/save [Slot]/saveRestarts the server. All players are disconnected and must reconnect.
/restart/restartShuts down the server without restarting it.
/shutdown/shutdownOpens or closes the log window in the server console. Equivalent to showLogs in config.cfg.
/openlogs | /closelogs/openlogsAllows players to use the developer console (on) or blocks it (off) until the server restarts. /allowdebugconsole does the same thing.
/allowcheats <on|off>/allowcheats onTurns tree regrowth during sleep on or off until the server restarts.
/treeregrowmode <on|off>/treeregrowmode onSets whether buildings can be destroyed. off makes them indestructible until the server restarts.
/allowbuildingdestruction <on|off>/allowbuildingdestruction offSets whether enemies spawn in Creative Mode until the server restarts.
/allowenemiescreative <on|off>/allowenemiescreative onLists all developer console commands, including developer-only tools.
helphelpClears the console output.
clearclearChanges the difficulty in the game setup: Peaceful, Normal, Hard, or Hard Survival.
setdifficultymode <peaceful|normal|hard|hardsurvival>setdifficultymode hardSets the game mode for the next launch: Standard or Creative. getgamemode shows the current mode.
setgamemode <standard|creative|mod>setgamemode creativeSkips the intro sequence when you start a new game.
faststart <on|off>faststart onShows or hides the developer overlay. Key: F2.
toggleoverlaytoggleoverlayShows or hides your character's stats. Key: F3.
toggleplayerstatstoggleplayerstatsCheat codes
Just type these codes on your keyboard in The Forest's main menu. There's no input field; the game detects the keystrokes. If you make a typo, start again from the first letter.
| Code | Mode | What it does | How to turn it off | On the server (config.cfg) |
|---|---|---|---|---|
| veganmode | Vegan Mode | No enemies: the game no longer spawns cannibals or mutants; enemy spawners stay off. | Enter meatmode to return to normal mode. | veganMode |
| vegetarianmode | Vegetarian Mode | Enemies only at night: no cannibals appear during the day; at night, they appear as usual. | Enter meatmode to return to normal mode. | vegetarianMode |
| rawmeatmode | Perma Death | Permadeath: if you die, the game deletes your save. | Enter meatmode to return to normal mode. | – |
| meatmode | Normal Mode | Return to normal mode: disables Vegan Mode, Vegetarian Mode, and Perma Death. | Nothing needed; this is the default. | – |
| woodpaste | Wood Paste | Removes holes from player-built floors and roofs the next time a save is loaded. Only works if you host the game or play alone. | Automatically turns off when you return to the main menu. | resetHolesMode |
| developermodeon | Developer Mode | Enables the developer console. You can then open it in-game with F1. | Remains active until you restart the game. | allowCheats |
With veganmode, vegetarianmode, rawmeatmode, and meatmode, the main menu title changes to the new mode. The mode remains saved even after restarting the game. woodpaste and developermodeon show no confirmation.
Older guides also mention regrowmode, ironforest. The current version (Build 3488796) no longer recognizes these title-screen codes: set regrowing trees and indestructible buildings in the game options, or on a server using treeRegrowMode, allowBuildingDestruction in config.cfg.
These codes and commands come from the PC version's game files. The game reads them from the keyboard. We couldn't verify them against the PS4 version's game files, so we can't say whether they work there.
Developer console
Console commands require Developer Mode. Four steps to your first command:
Step 1
In the main menu, before loading a game. No notification appears.
Step 2
Whether you're playing solo, hosting or joining another player. If you're joining, the host or server must allow cheats.
Step 3
F1 opens and closes the command line. F2 shows the developer overlay, and F3 shows your character's stats.
Step 4
Commands are case-insensitive, but type on and off in lowercase. Add --5 at the end to run a command five times.
Multiplayer & servers
A dedicated server has no developer console. Set game modes such as Vegan or Vegetarian in config.cfg, and manage players with admin commands in chat.
Runs in the developer console (F1) in your game. If you're another player, it only works when the host or Dedicated Server allows cheats.
Changes the shared world. If you're another player, the game sends the command to the host, who can only run it with their own console open. That's why it has no effect on a Dedicated Server.
Enter it in chat with / on a Dedicated Server. This only works if you entered the server's admin password when joining.
| config.cfg | Value | Effect | Instead of a code or command |
|---|---|---|---|
| veganMode | on | No enemies on the server. | veganmode |
| vegetarianMode | on | Enemies appear only at night. | vegetarianmode |
| difficulty | Peaceful | Normal | Hard | Difficulty for a new save. | setdifficultymode |
| treeRegrowMode | on | When you sleep, 10% of felled trees regrow. | regrowmode |
| allowBuildingDestruction | off | Buildings cannot be destroyed. | ironforest |
| resetHolesMode | on | Reset holes in floors and roofs on load. | woodpaste |
| allowEnemiesCreativeMode | on | Enemies appear even in Creative Mode. | – |
| allowCheats | on | Other players can use the developer console. | developermodeon |
You can set all these options without editing anything manually in the The Forest Server Config Generator, which creates a ready-to-use config.cfg for you. To use admin commands in chat, enter the admin password (serverPasswordAdmin) when you join.
Expected result
For each command, you'll see its syntax, an explanation, an example you can copy, and where it works. Three examples:
Input:
godmodeInput: select additem, item Rebreather (ID 143)
Output:
additem 143Input: filter “Server admin chat”
Results: 14 commands, including
/help, /kick, /ban, /unban, /kickbycid, /banbycid, /save, /restart, /shutdown, /openlogs, /allowcheats, /treeregrowmode, /allowbuildingdestruction, /allowenemiescreative
How it works
Four steps from code to console command, no download needed.
Step 1
For Vegan Mode, Vegetarian Mode, or Perma Death, type the code on the title screen. To enable the console, type developermodeon there.
Step 2
F1 opens the developer console in-game. As a player, you can only use it if the host or server allows cheats.
Step 3
Search the list for a command or keyword such as teleport or rain, then filter by category and where it works.
Step 4
Copy the example or assemble the command in the builder, paste it into the console, and press Enter.
Overview
77 commands, sorted by category. You'll find explanations and examples above in the list.
Discover more
Choose an item, name, lore, and enchantments—a ready-to-use /give command with the correct syntax for each Java version.
Built by Rugile Rutkauskaite
A searchable list of Valheim console commands and cheats, most with examples you can copy, plus admin setup, launch parameters, and a command generator for spawn, event, and goto.
Built by Dimitri Heissler
Interactive island map: caves, bunkers, villages, and locations of the Rebreather, Katana, Rope Gun, and more, with coordinates and markers.
Built by Dimitri Heissler
Interactive map of The Forest island: cave entrances, cave interiors, cannibal villages, landmarks, and items such as the rebreather, modern axe, and modern bow, with coordinates and distance from your location.
Built by Dimitri Heissler
Describe config.cfg to ZapX AI Agent in your own words or set the options in the form — with a live preview for your The Forest server.
Built by Florian Galz
Your feedback helps us prioritize and improve content.
FAQ
Quick answers about cheat codes, the console, items, God Mode, and server cheats.
There are two types. You type cheat codes such as veganmode on the title screen using your keyboard, without an input field. You enter console commands such as godmode in the developer console during the game. Enable it with developermodeon on the title screen, then open it with F1.
The current version recognizes six codes: veganmode (no enemies), vegetarianmode (enemies only at night), rawmeatmode (Perma Death), meatmode (return to normal mode), woodpaste (resets holes in floors and roofs on load), and developermodeon (enables the console). regrowmode and ironforest from older guides are now game options.
Type developermodeon on the title screen, then start your game and press F1. No confirmation appears. F2 shows the developer overlay, and F3 shows your character's stats. Developer mode stays enabled until you restart the game.
Use additem with the item ID or name, such as additem 143 for the Rebreather or additem 261 for the Chainsaw. As many as will fit go into your inventory. The game's database contains 231 items; listitems displays them all with their IDs in the console. addallitems fills your inventory with everything except story items.
Yes: enter godmode on in the console. You'll be invulnerable, your energy and stamina will stay full, and hunger, thirst, and cold will be disabled. godmode off restores everything. For full energy and stamina without invulnerability, use energyhack on.
As a player, you can only use the console if the host or server allows cheats (allowCheats on in config.cfg). Only a host with the console open can run commands that change the shared world, such as spawnenemy or killallenemies. A dedicated server has no console: set modes in config.cfg and use admin commands such as /kick or /save in chat.
On a dedicated server, no one types in codes. Set veganMode on in config.cfg for no enemies, or vegetarianMode on for enemies only at night. treeRegrowMode, allowBuildingDestruction, and difficulty are in the same file. Our Server Config Generator creates it for you.
Use goto followed by three numbers: X, height Y, and Z, such as goto 326 120 1231. You can find coordinates and terrain heights on our The Forest Map, or select places such as the Yacht, cannibal villages, or cave entrances directly in the command builder. Use the terrain height plus 2 for Y to land on the ground.
Still have questions?
Contact SupportSet Vegan Mode, Vegetarian Mode, difficulty, and cheats in config.cfg. DDoS protection included.
No setup. No risk. Online in 60 seconds.
Codes, commands, and item IDs: The Forest Build 3488796. Looking for more tools? View all The Forest tools