If you have bought a Domain name, say from Cloudflare, you will be able to setup DNS records to your public IP address, and instead of joining via IP, you will be able to assign a website, e.g. minecraft.example.com, which is easier to remember than an IP address.
See backups
Things to be aware of:
Server Seeker is a bot that automatically searches for Minecraft servers on the default port. Random people will join you if you are not careful
There are various ways to deal with server seeker. The best is to simply change your port to not be the default Java port, from 25565 to another random port.
Then, to ensure you don’t want random people joining, go to server.properties
and set whitelist
as true.
This does increase the amount of work needed to allow others to join, however it does create an aspect of safety.
If you do not want to do this, then I recommend not having a base anywhere near world spawn. If your base is near world spawn, griefers will be able to join and ruin your progress.
Operators are administrators and have access to most commands like set daytime. See https://minecraft.wiki/w/Commands/op for more details.
To stop a player from being an OP, you can run DEOP.
You can ban users per Playername and IP Address. Banning per IP address can simply be done if you know their name and they are logged into the game. If they are not logged into the game, you would have to find out their IP address through the server’s logs.
As such, you have two options:
ban-ip [username]
ban [username]
, and then go into logs to ban-ip
them aswell[ADMIN]
and the like~~~
Since you have now set up the server, you probably want it to run without your action. You can do this in 2 ways.
To set up a bash script that runs automatically, you use a tool called cron. Cron schedules certain things to run in the background if you set it up correctly. It is complicated, and more effort than the next option.
Below are links that you can use to help you learn cron. If I ever do cron for my server, this section will be updated with a proper guide.
This is the simpler way of doing this, but there is no automation to it, so if your server crashes you will have to log in to reactivate it.
What it basically simulates is tabs or windows of an application on the server side, so you can have a terminal window running a web server, and another a ftp server, and another working as a firewall for example. These will run in the background so long as the server is active, hence the analogy of tabs.
After you connect to your server via ssh, you can run the command ‘screen’.
Alternatively, navigate to your server’s directory and simply run ‘screen run.sh’, this will start the server in a new screen.
Both of these create a second window that you can detaching from the terminal later on with ‘ctrl-a d’. Detaching is basically putting it in the background and it will work by itself.
When you want to check up on it, you can use two commands to rejoin this screen.
screen -ls
will display all screens that haven’t been killed (ie ongoing screens),
and then screen -r [abcde]
where abcde is a number that ‘screen -ls’ showed you that identifies a specific screen instance.
You can also name it by using the command screen -S name
, and you can use the name to reattach to later on.
Now you can check up on the screen, see what has been running, and so on.
To stop a screen instance, you can kill it in a simlar method to detaching it. The specifics are