User Tools

Site Tools


games:minecraft:create_a_minecraft_server

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
games:minecraft:create_a_minecraft_server [2021/07/08 12:06] – created petergames:minecraft:create_a_minecraft_server [2021/07/08 19:48] (current) – [References] peter
Line 1: Line 1:
 ====== Games - Minecraft - Create a Minecraft Server ====== ====== Games - Minecraft - Create a Minecraft Server ======
  
-Install Ubuntu Server+<WRAP info> 
 +**NOTE:**  These instructions are for installing a basic vanilla Minecraft server without any add-ons or plugins. 
 +</WRAP> 
 + 
 +---- 
 + 
 +===== Install Ubuntu Server ===== 
 + 
 +Install the Ubuntu OS as usual. 
 + 
 + 
 +----
  
 ===== Update the packages ===== ===== Update the packages =====
Line 64: Line 75:
 ==== Obtain the link for the Minecraft download ==== ==== Obtain the link for the Minecraft download ====
  
-Visit the official Minecraft site, https://minecraft.net/download/server, and right-click on the download link and select Copy Link Location from the context menu.+Visit the official Minecraft site, https://minecraft.net/download/server, and right-click on the **Download** link and copy the Link Location from the context menu.
  
 ---- ----
Line 108: Line 119:
   * To shut down your server, enter the command **stop**.   * To shut down your server, enter the command **stop**.
 </WRAP> </WRAP>
 +
 +<WRAP info>
 +**NOTE:**  Some people suggest the server runs quicker using <code bash>
 +java -jar server.jar --nogui
 +</code>
 +
 +  * But this prevents a GUI for typing commands, so only use this option is that is not a concern.
 +
 +</WRAP>
 +
 +
 +----
 +
 +===== Enhance the Minecraft Server =====
 +
 +For add-ons, mods and to personalize the Minecraft experience consult this official documentation: https://help.mojang.com/.
  
 ---- ----
Line 117: Line 144:
 Install and launch the client and sign in. Install and launch the client and sign in.
  
 +----
 +
 +===== Create a Server startup script =====
 +
 +Create /etc/systemd/system/minecraft.service.
 +
 +<file bash /etc/systemd/system/minecraft.service>
 +[Unit]
 +Description=Minecraft server
 +Documentation=
 +Wants=network.target
 +After=network.target
 +
 +[Service]
 +WorkingDirectory=/home/minecraft/server
 +User=minecraft
 +Group=minecraft
 +Type=forking
 +# Run it as a non-root user in a specific directory
 +
 +ExecStart=/usr/bin/tmux -s new minecraft "java -jar server.jar"
 +
 +# Send "stop" to the Minecraft server console
 +ExecStop=/usr/bin/tmux kill-session -t minecraft
 +# Wait for the PID to die - otherwise it is killed after this command finishes!
 +ExecStop=/bin/bash -c "while ps -p $MAINPID > /dev/null; do /bin/sleep 1; done"
 +# Note that absolute paths for all executables are required!
 +
 +[Install]
 +WantedBy=multi-user.target
 +</file>
 +
 +----
 +
 +===== Run the Startup Script =====
 +
 +<code bash>
 +systemctl daemon-reload
 +systemctl start minecraft
 +</code>
 +
 +===== References =====
 +
 +https://www.minecraft.net/en-us/download/server
 +
 +https://teilgedanken.de/Blog/post/setting-up-a-minecraft-server-using-systemd/
 +
 +https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_server
 +
 +https://minecraft.fandom.com/wiki/Tutorials/Setting_up_a_server#Configuring_the_environment
 +
 +http://techtips-tom.blogspot.com/2013/01/mineos-turnkey-on-proxmox-vm-server.html
games/minecraft/create_a_minecraft_server.1625745986.txt.gz · Last modified: 2021/07/08 12:06 by peter

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki