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

== Creating backups ==

Creating a backup of your server is important, because if your server were to crashed, or your world's corrupted, you can always restore it back from your latest backup without losing any important progress.

In order to make a backup of your server, you'd need to close your server first. Run {{cmd|save-all}} command before closing to save the world, then run {{cmd|stop}} to stop the server. Create a copy of your entire server directory, and put it in another drive or storage. To keep track of your server backup, you can put a date or a {{w|UNIX time|timestamp}} on your backup server directory.

If you only need to create a world backup, you can create a copy of the server's {{cd|world}} directory. Usually backing up the entire server directory is recommended, as you get to copy and backup your server configurations, such as {{cd|banned-ips.json}}, {{cd|banned-players.json}}, and {{cd|[[server.properties]]}}.

== Managing players ==

=== Reset player ===

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 and no items in their ender chest.  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 ===

If you want to ban a player from playing on your server, edit the "minecraft\banned-ips.json" file, 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 "{{cmd|ban-ip ipaddress}}", where "ipaddress" is the IP address of the user you wish to ban.  This can be undone by editing the server's banned-ips.json file or via the operator issuing the "pardon-ip ipaddress" command.

=== Edit player ===

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 [[Player.dat format|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). This requires an NBT editor: opening this file with a regular text editor, like Notepad on Windows, will show symbols and random letters/numbers.

== Setting textures ==

=== Setting the server's resource pack ===

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)
# Choose or create a resource pack.
# Upload the resource pack to Dropbox, or similar. The important thing is that you can have a DIRECT link to the .zip file. (i.e. For Dropbox, find "dl=0" in the link and change it to "dl=1" to make it downloadable)
# Set the file to public. (at least on Dropbox or any other file host provider)
# Open your server.properties file.
# Find <code>resource-pack=</code> and edit it like this: <code>resource-pack=<link to your .zip></code>.
# Restart the server & log on to check the resource pack.

=== Setting the server's icon ===

Servers can have an icon that will show up in the Multiplayer list.
# Create a PNG image with a size of 64 by 64 pixels, transparency is supported.
# Save (or rename) it to <code>server-icon.png</code>.
# Move it to the server's directory.
# Restart the server.
# Server icons will display next to the server name.

== Resetting the Nether or the End ==

* Ensure there are no players in that dimension, stop the server.
* In your server world folder, delete the "DIM-1" folder to reset the [[Nether]], and 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 to apply the changes.

== Trimming chunks ==
Minecraft's world save can grow massively the more players explore. To reduce the world save file size and make travelling to newly generated [[chunks]] easier, it makes sense to occasionally remove chunks that have been generated but nothing of note has been built in.

This can be done by manually removing the region files in the {{code|world}}, {{code|DIM-1}}, and {{code|DIM1}} folders for each [[region]] that has been untouched. However, it is easier to use a dedicated tool like [https://github.com/Querz/mcaselector mcaselector] for automatically selecting chunks that players have spent little time in.
{{yt|BQrkLmawqUg}}

== Navigation ==
{{Navbox tutorials|servers}}

[[ja:チュートリアル/サーバーの管理]]
[[pt:Comunidade:Tutoriais/Como fazer a manutenção de servidores de Minecraft]]
[[zh:Tutorial:服务器维护]]
