1. Stop your Minecraft server.
  2. Open the server.properties file using a text editor.
  3. Look for the level-type property and change its value from default to flat.
  4. Save and close the server.properties file.
  5. Delete your world folder.
  6. Start your Minecraft server.

Your server will now generate a new flat world when you start it up.

Optional: If you want to customize your flat world, you can modify the generator-settings property in the server.properties file. The generator-settings property allows you to adjust the layers and biomes of your flat world.