How to make a simple systemd minecraft server startup service
So I have spent around a month searching online and figuring out how to start a vanilla Minecraft server as soon ubuntu server boots, but I couldn't make it work.
Using Ubuntu Server 18.04LTS on Pentium G4560 with Intel 545s 512GB SSD with 8GB of RAM (its a physical box inside my basement so if for some reason direct access is needed)
Simply I have a Minecraft server instance in /home/petar/Minecraft
and a script that i can use manually to start it up /home/username/petar/run.sh
, what i found out is that you need a systemd service to run it so i made: sudo nano /etc/systemd/system/vanilla-mc.service
and it goes like this:
[Unit]
Description=mc-vanilla-startup-service
[Service]
ExecStart=/home/petar/minecraft/run.sh
[Install]
WantedBy=multi-user.target
than i used sudo systemctl enable vanilla-mc.service
and i rebooted my server
after it booted i typed in systemctl status vanilla-mc.service and got:
vanilla-mc.service - mc-vanilla-startup-service
Loaded: loaded (/etc/systemd/system/vanilla-mc.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-02-14 17:28:06 CET; 2h 36min ago
Main PID: 969 (code=exited, status=1/FAILURE)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
WHY IT DOESN'T WORK ???
BTW here is ./run.sh
from minecraft folder:`
#!/bin/sh
java -Xms1024M -Xmx3072M -jar server.jar -o true`
sorry for some reson i cant get formating to work correctly
server 18.04 java systemd minecraft
New contributor
add a comment |
So I have spent around a month searching online and figuring out how to start a vanilla Minecraft server as soon ubuntu server boots, but I couldn't make it work.
Using Ubuntu Server 18.04LTS on Pentium G4560 with Intel 545s 512GB SSD with 8GB of RAM (its a physical box inside my basement so if for some reason direct access is needed)
Simply I have a Minecraft server instance in /home/petar/Minecraft
and a script that i can use manually to start it up /home/username/petar/run.sh
, what i found out is that you need a systemd service to run it so i made: sudo nano /etc/systemd/system/vanilla-mc.service
and it goes like this:
[Unit]
Description=mc-vanilla-startup-service
[Service]
ExecStart=/home/petar/minecraft/run.sh
[Install]
WantedBy=multi-user.target
than i used sudo systemctl enable vanilla-mc.service
and i rebooted my server
after it booted i typed in systemctl status vanilla-mc.service and got:
vanilla-mc.service - mc-vanilla-startup-service
Loaded: loaded (/etc/systemd/system/vanilla-mc.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-02-14 17:28:06 CET; 2h 36min ago
Main PID: 969 (code=exited, status=1/FAILURE)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
WHY IT DOESN'T WORK ???
BTW here is ./run.sh
from minecraft folder:`
#!/bin/sh
java -Xms1024M -Xmx3072M -jar server.jar -o true`
sorry for some reson i cant get formating to work correctly
server 18.04 java systemd minecraft
New contributor
Please note that ./run.sh is a working script, i use it every time manually on the server itself, tho i am running it as root every time...
– Pequla
7 hours ago
Have you read minecraft.gamepedia.com/Tutorials/Server_startup_script ?
– MatsK
6 hours ago
It's something wrong in ther script. Dobra zastava :)
– Itra
5 hours ago
add a comment |
So I have spent around a month searching online and figuring out how to start a vanilla Minecraft server as soon ubuntu server boots, but I couldn't make it work.
Using Ubuntu Server 18.04LTS on Pentium G4560 with Intel 545s 512GB SSD with 8GB of RAM (its a physical box inside my basement so if for some reason direct access is needed)
Simply I have a Minecraft server instance in /home/petar/Minecraft
and a script that i can use manually to start it up /home/username/petar/run.sh
, what i found out is that you need a systemd service to run it so i made: sudo nano /etc/systemd/system/vanilla-mc.service
and it goes like this:
[Unit]
Description=mc-vanilla-startup-service
[Service]
ExecStart=/home/petar/minecraft/run.sh
[Install]
WantedBy=multi-user.target
than i used sudo systemctl enable vanilla-mc.service
and i rebooted my server
after it booted i typed in systemctl status vanilla-mc.service and got:
vanilla-mc.service - mc-vanilla-startup-service
Loaded: loaded (/etc/systemd/system/vanilla-mc.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-02-14 17:28:06 CET; 2h 36min ago
Main PID: 969 (code=exited, status=1/FAILURE)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
WHY IT DOESN'T WORK ???
BTW here is ./run.sh
from minecraft folder:`
#!/bin/sh
java -Xms1024M -Xmx3072M -jar server.jar -o true`
sorry for some reson i cant get formating to work correctly
server 18.04 java systemd minecraft
New contributor
So I have spent around a month searching online and figuring out how to start a vanilla Minecraft server as soon ubuntu server boots, but I couldn't make it work.
Using Ubuntu Server 18.04LTS on Pentium G4560 with Intel 545s 512GB SSD with 8GB of RAM (its a physical box inside my basement so if for some reason direct access is needed)
Simply I have a Minecraft server instance in /home/petar/Minecraft
and a script that i can use manually to start it up /home/username/petar/run.sh
, what i found out is that you need a systemd service to run it so i made: sudo nano /etc/systemd/system/vanilla-mc.service
and it goes like this:
[Unit]
Description=mc-vanilla-startup-service
[Service]
ExecStart=/home/petar/minecraft/run.sh
[Install]
WantedBy=multi-user.target
than i used sudo systemctl enable vanilla-mc.service
and i rebooted my server
after it booted i typed in systemctl status vanilla-mc.service and got:
vanilla-mc.service - mc-vanilla-startup-service
Loaded: loaded (/etc/systemd/system/vanilla-mc.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Thu 2019-02-14 17:28:06 CET; 2h 36min ago
Main PID: 969 (code=exited, status=1/FAILURE)
Warning: Journal has been rotated since unit was started. Log output is incomplete or unavailable.
WHY IT DOESN'T WORK ???
BTW here is ./run.sh
from minecraft folder:`
#!/bin/sh
java -Xms1024M -Xmx3072M -jar server.jar -o true`
sorry for some reson i cant get formating to work correctly
server 18.04 java systemd minecraft
server 18.04 java systemd minecraft
New contributor
New contributor
edited 5 hours ago
MatsK
436210
436210
New contributor
asked 7 hours ago
PequlaPequla
11
11
New contributor
New contributor
Please note that ./run.sh is a working script, i use it every time manually on the server itself, tho i am running it as root every time...
– Pequla
7 hours ago
Have you read minecraft.gamepedia.com/Tutorials/Server_startup_script ?
– MatsK
6 hours ago
It's something wrong in ther script. Dobra zastava :)
– Itra
5 hours ago
add a comment |
Please note that ./run.sh is a working script, i use it every time manually on the server itself, tho i am running it as root every time...
– Pequla
7 hours ago
Have you read minecraft.gamepedia.com/Tutorials/Server_startup_script ?
– MatsK
6 hours ago
It's something wrong in ther script. Dobra zastava :)
– Itra
5 hours ago
Please note that ./run.sh is a working script, i use it every time manually on the server itself, tho i am running it as root every time...
– Pequla
7 hours ago
Please note that ./run.sh is a working script, i use it every time manually on the server itself, tho i am running it as root every time...
– Pequla
7 hours ago
Have you read minecraft.gamepedia.com/Tutorials/Server_startup_script ?
– MatsK
6 hours ago
Have you read minecraft.gamepedia.com/Tutorials/Server_startup_script ?
– MatsK
6 hours ago
It's something wrong in ther script. Dobra zastava :)
– Itra
5 hours ago
It's something wrong in ther script. Dobra zastava :)
– Itra
5 hours ago
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "89"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Pequla is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1118310%2fhow-to-make-a-simple-systemd-minecraft-server-startup-service%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Pequla is a new contributor. Be nice, and check out our Code of Conduct.
Pequla is a new contributor. Be nice, and check out our Code of Conduct.
Pequla is a new contributor. Be nice, and check out our Code of Conduct.
Pequla is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Ask Ubuntu!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1118310%2fhow-to-make-a-simple-systemd-minecraft-server-startup-service%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Please note that ./run.sh is a working script, i use it every time manually on the server itself, tho i am running it as root every time...
– Pequla
7 hours ago
Have you read minecraft.gamepedia.com/Tutorials/Server_startup_script ?
– MatsK
6 hours ago
It's something wrong in ther script. Dobra zastava :)
– Itra
5 hours ago