Fix "You need to agree to the EULA in order to run the server"

Updated · MCJarHub

On its first start the server creates eula.txt and stops. Open that file, change eula=false to eula=true — which means you accept the Minecraft EULA — save it, and start the server again.

What you see

The first time you start a new Vanilla, Paper, Spigot, Fabric or Forge server, it prints a line like this and shuts down:

You need to agree to the EULA in order to run the server. Go to eula.txt for more info.

This is not a crash. Mojang requires every server operator to accept the Minecraft End User License Agreement once, and the server records your answer in eula.txt.

How to accept the EULA

  1. Open the server folder — the folder the server was started from. It now contains eula.txt, server.properties and a logs folder.
  2. Open eula.txt in a plain text editor (Notepad, nano, TextEdit in plain-text mode).
  3. Change the last line from eula=false to eula=true and save the file.
  4. Start the server again. It now generates the world and prints Done when players can join.

From a terminal in the server folder you can do the same in one line:

# Linux / macOS
echo "eula=true" > eula.txt

REM Windows (Command Prompt)
echo eula=true> eula.txt

In the Windows command there is no space before > on purpose — otherwise the trailing space becomes part of the value.

It still asks for the EULA

  • Wrong folder. The server looks for eula.txt in its working directory. If you start it from another folder (e.g. by typing the full path to the jar), it creates a new eula.txt there. Use a start script that changes into its own folder — see server jar not opening / not creating files.
  • Wrong file name. Windows may have saved it as eula.txt.txt. Run dir in the folder to check the real name.
  • Typo. The value must be exactly eula=true — no spaces, no quotes.
  • File not saved or read-only. Check that the file really changed and that the server's user may read it (on Linux: ls -l eula.txt).
  • Hosting panels and Docker. Many panels have an "accept EULA" checkbox that rewrites the file on start, and the itzg/minecraft-server image uses the environment variable EULA=TRUE.

What the EULA means for server owners

Accepting it is a legal agreement with Mojang, so read it — in particular the rules on what you may sell or charge for on a server. MCJarHub cannot accept it for you and does not change it. Proxies such as Velocity and BungeeCord have no EULA step; only the Minecraft servers behind them do.

Next steps: how to run a server jar · download Paper · download the vanilla server.jar

FAQ

Do proxies like Velocity or BungeeCord need eula.txt?
No. The EULA step belongs to Minecraft game servers. Velocity, BungeeCord and Waterfall do not create or read eula.txt; only your backend servers do.
Can I set the EULA without editing the file?
You can create eula.txt with the single line eula=true before the first start, e.g. echo eula=true> eula.txt. Docker images such as itzg/minecraft-server use an EULA=TRUE environment variable for the same purpose.