Tutorials/Server maintenance

From Minecraft Wiki
Jump to: navigation, search

Once setting up a server, there are various maintenance tasks required to keep a server in good shape.

Creating backups[edit | edit source]

Use the save-all command ingame (as a server op) or from the server's console to save the world.
Create a copy of the world directory to create the backup. Do not move the directory as this might crash the server.
No restart is required.

Managing players[edit | edit source]

Reset player[edit | edit source]

If you want to reset a player's inventory, position, or any other related data about them, you can remove the player's .dat file. Navigate to the Minecraft server directory, open the world folder, open the player's folder, and delete the .dat file which has the UUID that corresponds to the player's current username. This folder is at "minecraft\world\players", where "minecraft" is the folder where Minecraft was installed on the server. This will cause the player to start over at the spawn point with no inventory. The player's changes to the world will be untouched, along with any inventory stored in chests. This will not ban the player that has been deleted.

Ban player[edit | edit source]

If you want to ban a player from playing on your server, edit the minecraft\banned-ips.json", where "minecraft" is the folder where minecraft was installed on the server and add the user you want to ban to this banned-ips.json file. To ban an IP address from the server, the full IP address must be specified; wildcards are not valid. Players who are banned through this method will see "Your IP address is banned from this server!" when attempting to connect. Alternatively, an operator can use the "ban-ip" command via "/ban-ip ipaddress", where "ipaddress" is the IP address of the user you wish to ban. This can be undone via the operator issuing the "pardon-ip ipaddress" command or editing the server's banned-ips.json file.

Edit player[edit | edit source]

If you don't want to delete a player completely, but want to remove something from them or move them to a different spot, or even give them an enchanted item, you can edit the PLAYERUUID.dat file with an NBT editor similar to how you would a level save. (The player in question must be offline during this operation, but you do not need to restart the server afterwards)

Setting textures[edit | edit source]

Setting the server's resource pack[edit | edit source]

You can set a default resource pack for your server and the client has the option to download it and use it for your server. (Please note that the client can turn off the resource pack)

  1. Choose or create a resource pack.
  2. Upload the resource pack to Dropbox, or similar. The important thing is that you can have a DIRECT link to the .zip file.
  3. Set the file to public. (at least on Dropbox or any other file host provider)
  4. Open your server.properties file.
  5. Find resource-pack= and edit it like this: resource-pack=<link to your .zip>.
  6. Restart the server & log on to check the resource pack.

Setting the server's icon[edit | edit source]

Servers can have an icon that will show up in the Multiplayer list.

  1. Create a PNG image with a size of 64 by 64 pixels, transparency is supported.
  2. Save (or rename) it to server-icon.png.
  3. Move it to the server's directory.
  4. Restart the server.
  5. Server icons will display next to the server name.

Resetting the Nether or the End[edit | edit source]

Ensure there are no players in that dimension, stop the server. Delete the "DIM-1" folder to reset The Nether, delete the "DIM1" folder to reset The End. Any builds inside those dimensions will be lost, the Ender Dragon will also reappear for The End.
Restart the server.