TransWikia.com

Why won’t my server.properties file changes take effect on my Minecraft server?

Arqade Asked by David Morse on January 4, 2021

I’ve recently set up a 1.15.2 Minecraft server for my friends and I using my raspberry pi 4 model b as the host. Of course, this isn’t the fastest option, so I wanted to make some changes to the server. However, when I try to edit the server.properties file, nothing changes on the server. I’m making sure to stop the server, edit it and then save, and then launch it back up, but none of the edits are actually appearing. The same thing happens if I try to add a server icon. I followed this tutorial to set it up.

I’ve looked in many different places but all I’m really getting is “make sure your server isn’t open and you save the file.” No one else seems to have this problem.

In the picture I have here, I have the max players set to 10, yet it still says that the max players is 20 when I connect to it on my laptop.

Files on my raspberry pi

How the server appears on my laptop

One Answer

With the additional info from the comments, I think, I can provide you with a walkthrough to your issue.

  1. Stop and disable your minecraft server, and clean-up the config files, if it's configured to start on boot. (I'm assuming you followed the tutorial all the way through). You can do this by using the following commands.
sudo systemctl stop minecraftserver
sudo systemctl disable minecraftserver
sudo rm /lib/systemd/system/minecraftserver.service
sudo systemctl daemon-reload
  1. Backup your world data, because we are going to purge the non-functional server.
    In your setup, world data is found in three folders: /home/pi/world, /home/pi/world_nether and /home/pi/world_the_end.
cd /home/pi
mkdir mc_world_backup
cp -r world world_nether world_the_end mc_world_backup/
  1. Now that your save is in safety, you have to clean-up (move or delete) the remains of the old server. Based on your screenshot, this is the list of files and folders, that have to be cleaned-up.
  • logs/

  • plugins/

  • world/

  • world_nether/

  • world_the_end/

  • banned-ips.json

  • banned-players.json

  • bukkit.yml

  • commands.yml

  • eula.txt

  • help.yml

  • ops.json

  • permissions.yml

  • server.properties

  • spigot.yml

  • usercache.json

  • whitelist.json

    Note: You shouldn't delete the minecraft folder.

    If you want to delete these files, you can use the following command:

rm -rf logs/ plugins/ world/ world_nether/ world_the_end/ banned-ips.json banned-players.json bukkit.yml commands.yml eula.txt help.yml ops.json permissions.yml server.properties spigot.yml usercache.json whitelist.json
  1. Start a new directory and place the server executable and an eula.txt file in that folder. This will be the server's directory from now on.
mkdir mcserver
cd mcserver
cp /home/pi/minecraft/spigot-1.15.2.jar .
echo "eula=true" > eula.txt
  1. Create a run script and start your server from the terminal.
echo "java -Xms512M -Xmx1008M -jar spigot-1.15.2.jar nogui" > run.sh
chmod 755 run.sh
./run.sh

Note: This isn't the most optimalized command to start your server, but this will work. If you want to run your server in the most optimalized way, you should copy and paste this to your run.sh file

java -Xms512M -Xmx1008M -XX:+UseG1GC -XX:+UnlockExperimentalVMOptions -XX:MaxGCPauseMillis=100 -XX:+DisableExplicitGC -XX:TargetSurvivorRatio=90 -XX:G1NewSizePercent=50 -XX:G1MaxNewSizePercent=80 -XX:G1MixedGCLiveThresholdPercent=35 -XX:+AlwaysPreTouch -XX:+ParallelRefProcEnabled -Dusing.aikars.flags=mcflags.emc.gs -jar spigot-1.15.2.jar nogui
  1. Test your server. Connect to it, and see if it loads properly. If everything works fine, shut down your server by entering stop, and proceed to the next step.

  2. Import your world saves. Delete the freshly generated folders world, world_nether and world_the_end, and replace them with your folders, that we backed up in step 2.

rm world world_nether world_the_end
cp -r ../mc_world_backup/* .
  1. Change the server.properties file as you wish.

  2. Test again your results. If you've done everything correctly, by this point you should have a perfectly functional minecraft server with your old maps.

Now if you wan't to start your server, you have to cd into the mcserver directory, and start your server with the ./run.sh command.

cd /home/pi/mcserver
./run.sh

Optionally you could configure linux to automatically start the server for you at start-up. (Based on the tutorial you linked, with minor changes)

Create and open /lib/systemd/system/minecraftserver.service file with a text editor. You could use nano for this, as it comes preinstalled.

sudo nano /lib/systemd/system/minecraftserver.service

Enter the following text into the editor.

[Unit]
Description=Minecraft Spigot Server
[Service]
User=pi
Group=pi
Restart=on-abort
WorkingDirectory=/home/pi/mcserver/
ExecStart=/usr/bin/env bash run.sh
[Install]
WantedBy=multi-user.target

Save this file using the Ctrl + X keyboard shortcut, and then press the y and Enter keys when prompted.

Now you should enable and start your server.

sudo systemctl enable minecraftserver
sudo systemctl start minecraftserver

And done! Your Minecraft server should start with your Raspberry Pi.


Troubleshooting

You can check the status of your server with the following command, to see if it's even running, and to see the latest few lines of log.

sudo systemctl status minecraftserver

The Raspberry Pi isn't too powerful, so your server might take some time to start. If you can't connect to it after a reboot, check the status and give it up to 15 minutes to fully start up.

Your server logs will be saved to /home/pi/mcserver/logs folder. Here you'll find every error message your server outputs, and you could ask a separate question about them.

If you are on a local network, between restarts, your device's IP might have changed, if you can't connect with "unreachable" error messages, you might want to check out the IP of your Pi with:

sudo hostname -I

Correct answer by Andruida on January 4, 2021

Add your own answers!

Ask a Question

Get help from others!

© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP