How to disable the day cycle in your Minecraft server

Freezing time is one of the most common requests server owners have, and for good reason. A locked daytime makes building, terraforming, and screenshot sessions painless because hostile mobs stop spawning in the light and you never lose your view to nightfall. A locked nighttime is great for a horror map, a PvP arena, or a perpetual mob-farming environment. Whatever the goal, the mechanic behind it is a single vanilla game rule: doDaylightCycle. This guide walks through exactly how to stop the day/night cycle on a Minecraft server, how to pin the world to a specific time of day, how the related weather rule works, what changed in recent Minecraft versions, and how to put everything back the way it was.

Everything here is for Java Edition unless a section says otherwise, and there is a dedicated Bedrock section near the end because the two editions handle this slightly differently. All commands assume you have operator access. If you do not yet have op on your own box, set that up first with our walkthrough on adding an op admin via ops.json and /op.

The short answer: doDaylightCycle false

The day/night cycle is governed by a boolean game rule. When it is true (the default), time advances normally — the sun rises and sets, the moon goes through its phases, and a full day lasts 20 real-world minutes. When you set it to false, the clock simply freezes at whatever value it currently holds. Run this command from in-game chat as an operator, or from the server console (in the console you drop the leading slash):

/gamerule doDaylightCycle false

That is the whole trick. But freezing time “wherever it happens to be” is rarely what people want — you usually want it locked to a clean midday or a clean midnight. That is where the /time set command comes in, and the standard workflow is to set the time first, then freeze the cycle.

Lock the server to permanent day

To pin a world to eternal daytime, set the time to day (or to the exact tick value 1000, which is bright morning sun) and then stop the cycle:

/time set day
/gamerule doDaylightCycle false

The order matters in practice. If you freeze the cycle before setting the time, you simply lock whatever moment you happened to be in. Setting the time first guarantees you land on the visual you want, and freezing it second nails it in place. With permanent day and full light, hostile mobs that require darkness will no longer spawn on the surface, which is exactly why creative-build servers reach for this.

Useful /time set values

You can use named keywords or raw tick numbers. A full day is 24,000 ticks long, starting at tick 0 (sunrise). The keywords map to specific ticks:

CommandTick valueWhat you get
/time set day1000Bright morning, sun well up
/time set noon6000Sun at its absolute peak (brightest)
/time set night13000Just after sunset, dark
/time set midnight18000Moon at its peak (darkest)
/time set sunrise23000Sun on the eastern horizon

For the brightest possible permanent day with zero shadows on the horizon, /time set noon (tick 6000) is the cleanest choice. For a normal “morning forever” feel, day (tick 1000) is what most people expect.

Lock the server to permanent night

Permanent night uses the exact same two-step pattern, just with a night-time value:

/time set midnight
/gamerule doDaylightCycle false

Use night (tick 13000) for the moment the sky goes dark, or midnight (tick 18000) for the darkest point with the moon high. There is one important consequence to keep in mind for permanent night: hostile mobs spawn continuously in the dark, and players who go too long without sleeping become eligible for phantom attacks. If you want eternal night but without the phantom nuisance, disable the insomnia rule alongside it:

/gamerule doInsomnia false

On Minecraft Java 1.21.11 and newer this rule was renamed to spawn_phantoms (more on the rename below). And because a frozen night means players can never sleep through to morning, sleeping simply will not skip time while the cycle is locked — beds still set your respawn point, but the clock will not move.

Freezing the weather too: doWeatherCycle

Stopping time does not stop the weather. Rain and thunderstorms run on their own independent game rule, doWeatherCycle, which is also true by default. If you want a server that is permanently sunny and clear in addition to permanently daytime, you need to handle both. Set the weather to clear, then freeze the weather cycle:

/weather clear
/gamerule doWeatherCycle false

This is the single most common follow-up question after locking time, because a frozen midday world that still randomly clouds over and rains looks broken. Freezing the weather cycle keeps it whatever you last set it to. You can force a storm and freeze that too (handy for an atmospheric horror map) by running /weather thunder before freezing the cycle. Note that doWeatherCycle kept its name through the recent rename era; under the newer snake_case scheme it becomes advance_weather.

Version differences you need to know in 2026

Minecraft Java changed how game rules are named, and this directly affects the daylight commands. If you are running a very recent server, the classic doDaylightCycle you have seen in every old tutorial may not be the name your server expects.

  • Java 1.21.10 and earlier — game rules use camelCase. The daylight rule is doDaylightCycle and the weather rule is doWeatherCycle. This is the era almost every existing server and guide uses.
  • Java 1.21.11 (released December 9, 2025) and newer — game rules were renamed to snake_case. doDaylightCycle became advance_time, doWeatherCycle became advance_weather, doInsomnia became spawn_phantoms, and mobGriefing became mob_griefing, among many others. The defaults did not change — only the names.

So on a brand-new server the daylight command is:

/gamerule advance_time false

If you are unsure which scheme your server uses, the safest approach is to start typing /gamerule in chat and let the in-game tab-completion show you the valid rule names for your exact version. The old camelCase names continue to work on 1.21.10 and earlier; the new snake_case names are required on 1.21.11 and up. Mojang also moved to calendar-style version numbers in 2026 (for example “26.30 Chaos Cubed”), so the 1.21.x line is the last of the old “1.x” numbering — anything in the new numbering scheme uses snake_case rules.

Old name (≤1.21.10)New name (1.21.11+)DefaultControls
doDaylightCycleadvance_timetrueWhether day/night and moon phases progress
doWeatherCycleadvance_weathertrueWhether weather changes naturally
doInsomniaspawn_phantomstrueWhether phantoms spawn for sleep-deprived players

Where to run these commands

There are three places the daylight game rule can be applied, and they all reach the same world:

  • In-game chat — type /gamerule doDaylightCycle false as an operator. This is the fastest method for a quick change and is what most owners use.
  • The server console — the live terminal or your host’s web console runs at the equivalent of full operator level, so type the command without the leading slash: gamerule doDaylightCycle false. This is ideal when you want to make the change without logging into the game at all.
  • Per-world, persisted in level data — game rules are stored in each world’s level.dat, so once you set the rule it survives restarts automatically. You do not need to re-run it after every reboot. The rule is also per-dimension-set as part of the world, not a server.properties line, so there is no config file to hand-edit for this one.

If your host gives you a console but you are not sure how to reach it, our Minecraft server documentation walks through the panel, the console, and where world files live. Owners running a managed box with us can apply any of these from our one-click Minecraft hosting panel without touching SSH.

How to check the current value

Game rules can be queried by running the command with no value. This is the quickest way to confirm whether the cycle is currently frozen:

/gamerule doDaylightCycle

The server replies with the current value (true or false). You can also check the in-game clock value with /time query daytime, which returns the current tick within the day — handy for confirming you are actually locked at noon (6000) or midnight (18000) and not somewhere in between.

Restoring the normal day/night cycle

Turning the cycle back on is the exact inverse — set the rule back to true:

/gamerule doDaylightCycle true

The moment you do this, time resumes from wherever it was frozen and continues advancing normally. If you also froze the weather, remember to restore that rule as well, or your server will stay clear forever:

/gamerule doWeatherCycle true

And if you turned off doInsomnia for a permanent-night setup, set it back to true to bring phantoms back. On 1.21.11+ servers, use the snake_case equivalents (advance_time true, advance_weather true, spawn_phantoms true) instead. Because these rules persist in the world data, you only need to flip them once and they stay put across restarts.

Stopping the day/night cycle on Bedrock servers

Bedrock Dedicated Server (BDS) also exposes a /gamerule command, and the day/night logic works the same conceptually — but the two editions do not share an identical rule set, so never assume a Java rule name exists on Bedrock or vice versa. The daylight concept is present on Bedrock, and you stop time with the same idea: set the time, then disable the daylight cycle via gamerule. Bedrock does not load Java plugins or use server.jar — it runs Mojang’s BDS and uses behavior packs/add-ons for extended functionality. A few other Bedrock-specific facts worth knowing while you are in there: Bedrock servers run on UDP with default port 19132 (IPv4) and 19133 (IPv6), whereas Java uses TCP on port 25565. If a Java gamerule tutorial does not work on your Bedrock box, that edition difference — not a typo on your part — is almost always why.

Related rules people freeze at the same time

Locking time is often part of a broader “tame the world” setup. A few sibling game rules commonly get toggled in the same session:

  • keepInventory (default false) — players keep items and experience on death. Great for build servers where dying mid-project should not cost your gear.
  • doMobSpawning (default true) — set to false to stop all natural mob spawning, which pairs well with a permanent-day creative world.
  • mobGriefing (default true) — controls whether mobs modify blocks, including creeper terrain damage. If you are locking time to protect a build, you may also want to stop explosions tearing it up. See our guide on disabling creeper explosions and TNT damage for the precise way to do that while keeping functional TNT.

Frequently asked questions

How do I stop the day cycle on a Minecraft server permanently?

Run /gamerule doDaylightCycle false (or advance_time false on 1.21.11+). This setting is stored in the world’s level.dat file, so it is already permanent — it survives server restarts automatically and you never need to re-enter it. To control which time of day it locks to, run /time set day or /time set midnight first, then freeze the cycle.

Does stopping the daylight cycle also stop rain and thunderstorms?

No. Weather runs on a completely separate game rule called doWeatherCycle (renamed advance_weather in 1.21.11+). A world with frozen time can still cloud over and rain. To get a permanently clear, sunny day, run /weather clear and then /gamerule doWeatherCycle false in addition to freezing the daylight cycle.

Why isn’t doDaylightCycle working on my server?

The most likely cause in 2026 is the game-rule rename. On Java 1.21.11 and later, doDaylightCycle no longer exists under that name — it is now advance_time. Start typing /gamerule in chat and use tab-completion to see the exact rule names your version recognizes. The other common cause is permissions: you must be a server operator (or use the console) to set game rules at all.

How do I lock the time to noon for the brightest possible day?

Run /time set noon (tick 6000, the sun’s absolute peak) and then /gamerule doDaylightCycle false. Using noon rather than day puts the sun directly overhead with no horizon shadows, which is ideal for screenshots and building. To confirm, run /time query daytime and you should see 6000.

Will players still spawn mobs or get attacked by phantoms during a frozen night?

Yes. Freezing time at night keeps the world dark, so hostile mobs spawn continuously, and because players can never sleep through to morning, they remain eligible for phantom attacks once the insomnia counter is reached. Disable phantoms with /gamerule doInsomnia false (or spawn_phantoms false on 1.21.11+), and use /gamerule doMobSpawning false if you want to stop natural mob spawning entirely.

How do I turn the day/night cycle back on?

Set the rule back to true: /gamerule doDaylightCycle true (or advance_time true on newer versions). Time immediately resumes from where it was frozen. If you also froze the weather, restore it with /gamerule doWeatherCycle true, and re-enable phantoms with /gamerule doInsomnia true if you had turned them off.

Wrapping up

Stopping the day/night cycle comes down to one game rule and one habit: set the time you want with /time set first, then lock it with /gamerule doDaylightCycle false. Add /gamerule doWeatherCycle false if you want clear skies too, watch out for the 1.21.11 snake_case rename (advance_time / advance_weather), and flip the rules back to true whenever you want normal time and weather to return. Every one of these settings is stored per-world and persists across restarts, so you configure it once and forget it. While you are tuning world rules, you might also want to read up on disabling fall damage or stopping warden spawning — both follow the same gamerule pattern you just learned here.

Free Minecraft Tools

Speed up your server with our free Minecraft tools:

Ready to play?

Run your own Minecraft server with XGamingServer

Spin up an always-on Minecraft server your friends can join in minutes — no port-forwarding, no tech headaches.

99.9%Uptime SLA
< 5 minInstant setup
24/7Human support
DDoSProtected
Instant setup Your server is live in minutes with a one-click control panel.
Mods & plugins Install mods, plugins and workshop content in a few clicks.
DDoS protected Enterprise DDoS mitigation keeps your server online 24/7.
Low-latency hardware Premium CPUs & NVMe SSDs for lag-free multiplayer.
Free backups Automatic backups so your world is never lost.
Real human support Gamers helping gamers — 24/7, no bots, no scripts.

Pick your Minecraft plan & play in minutes

See all plans
Starter $8.40/mo 4 GB RAM Renews $12/mo Buy now
Rookie $17.50/mo 8 GB RAM Renews $25/mo Buy now
Pro $24.50/mo 12 GB RAM Renews $35/mo Buy now