How the server picks its world
A Java Edition server reads its world from a folder named by level-name in server.properties. The default is world, and the world data is stored in a directory of that name beside the server files. That one fact explains the whole job: put your world in a folder, and tell the server its name.
There is also a start option, --world, that overrides the level-name value. If your world does not load, check that you are not starting the server with that option pointing somewhere else.
Step by step
- Close the world. Quit the game completely if you were playing the world in singleplayer, so nothing is still writing to it.
- Find the world folder. Singleplayer worlds are kept in the
savesfolder inside.minecraft. Each world is one folder. - Make a backup copy of the folder and keep it somewhere else. Treat it as the original.
- Stop the server before you copy anything in. A running server may still be writing to its world.
- Copy the whole folder into the server's directory, next to
server.properties. - Set
level-nameto the exact folder name:level-name=OurSurvivalWorld - Start the server and watch the console while it loads the world.
If you already had a world folder on the server that you do not need, move it aside rather than deleting it. Keeping it under another name costs nothing, and you can switch back by changing level-name.
Why you copy the folder as a whole
A world directory holds more than terrain. It has level.dat with the world's global information, a data folder with shared files such as game rules and weather, a datapacks folder, and player files for each player's data, statistics and advancements. The wiki also records that the layout changed: in the 26.1 versions, the old DIM-1 and DIM1 folders became dimensions/minecraft/the_nether and dimensions/minecraft/the_end, the region files moved under dimensions/minecraft/overworld/, and player data moved into a players folder. Because the structure depends on the game version, copying individual files is a good way to lose something. Move the folder in one piece.
You will also see level.dat_old: the game backs up the current level.dat to it when a world loads. It is normal and you can leave it in place.
Your friends and your own character
Player data lives in the world, so characters, inventories and progress arrive with the folder. If you have turned on the whitelist, add everyone before they try to join; players not on the list will be refused even though their data is in the world. Operators can always connect on Java Edition.
Starting a fresh world instead
To start over, you do not have to delete anything. Change level-name to a new name and the server creates a new world with that name. level-seed sets the terrain of a world that is being generated and uses a random seed if left blank. Leave your old folder where it is so you can come back to it. For a hardcore run, set hardcore=true before that first start, because it applies to newly created worlds. All the properties are covered in the server.properties guide.
Take a proper backup once it is running
Once your world is on the server, back it up regularly. To copy files safely while the server runs, save-off stops the server writing to the level files so you can copy them (it resets at restart), and save-on turns writing back on. save-all flush forces everything to disk immediately and freezes the server briefly. Stopping the server and copying the folder is the simplest option for a small group.
If the server does not load your world
- The console shows a new world being generated:
level-namedoes not match the folder name exactly, including capital letters and spaces. - The server will not start at all: check that the first-run
eula.txthaseula=true, otherwise the server shuts down straight away. - You see an old world: you may have copied the folder into the wrong directory, or
--worldis overridinglevel-name.