LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-16-2020, 04:30 PM   #1
LloydChristmas
LQ Newbie
 
Registered: Nov 2020
Location: Minneapolis, MN
Distribution: (Runnin Debian most of the time these days). But i do use Arch, CentOS, OpenSUSE, Fedora once awhile
Posts: 21

Rep: Reputation: Disabled
Simple Minecraft-server


Hey linux community I got a question? Does anyone here know a little bit about hosting a simple minecraft server on Debian 10.6 on your PC?. My son likes minecraft and likes to play on my computer once in awhile and he asked me if I knew how to make his own server so I'm in the middle of that right now but need some help with safety precautions I went ahead and made a user " su minecraft " with no password so people can't ssh connect does anyone know how to edit the sudoers file permissions for the minecraft user? to where I don't need to use sudo? thank you for taking your time and reading not in a hurry to get this done so take your time if your helping or working with someone else.
 
Old 12-16-2020, 05:30 PM   #2
lawquest
LQ Newbie
 
Registered: Jan 2005
Location: Reno, Nevada
Distribution: Debian Buster
Posts: 17

Rep: Reputation: 2
My grandson uses minetest in the Debian buster repositories and likes it as well as minecraft (he plays with both).
 
1 members found this post helpful.
Old 12-16-2020, 07:03 PM   #3
LloydChristmas
LQ Newbie
 
Registered: Nov 2020
Location: Minneapolis, MN
Distribution: (Runnin Debian most of the time these days). But i do use Arch, CentOS, OpenSUSE, Fedora once awhile
Posts: 21

Original Poster
Rep: Reputation: Disabled
yeah it definitely keeps him busy I wonder how your grandson secures his server and how he sets his sudo permissions with the sub user the server is running under has for safety reasons has the server will be available online to other players so I dont want people able to mess with our network plus his server and settings.
 
Old 12-16-2020, 07:03 PM   #4
resuni
Member
 
Registered: Oct 2009
Location: Colorado, USA
Distribution: I use Arch btw
Posts: 142

Rep: Reputation: 12
The minecraft user shouldn't need any sudo permissions. You can install java as root, put the jar file in the Minecraft user's home directory, then execute it with
Code:
java -jar server.jar
as the minecraft user.
 
Old 12-16-2020, 07:34 PM   #5
lawquest
LQ Newbie
 
Registered: Jan 2005
Location: Reno, Nevada
Distribution: Debian Buster
Posts: 17

Rep: Reputation: 2
Again, minetest is apparently just as good as minecraft. Grandson says there is little difference.
 
Old 12-16-2020, 10:33 PM   #6
alexibu
LQ Newbie
 
Registered: Dec 2015
Posts: 4

Rep: Reputation: Disabled
I have it configured as a service so it restarts with the machine and you can do sudo service minecraft start/stop/status


In the file "/etc/systemd/system/minecraft.service" I have :

[Unit]
Description=minecraft service.
After=network.target
StartLimitIntervalSec=0[Service]

[Service]
Type=simple
Restart=always
RestartSec=1
User=alex
WorkingDirectory=/home/alex/minecraft
ExecStart=java -Xmx1024M -Xms1024M -jar /home/alex/minecraft/server.jar nogui
#StandardOutput=/home/alex/minecraft/log.txt
#StandardError=/home/alex/minecraft/log.txt

[Install]
WantedBy=multi-user.target
 
Old 12-17-2020, 02:53 AM   #7
ondoho
LQ Addict
 
Registered: Dec 2013
Posts: 19,872
Blog Entries: 12

Rep: Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053Reputation: 6053
Quote:
Originally Posted by LloydChristmas View Post
Hey linux community I got a question? Does anyone here know a little bit about hosting a simple minecraft server on Debian 10.6 on your PC?. My son likes minecraft and likes to play on my computer once in awhile and he asked me if I knew how to make his own server so I'm in the middle of that right now but need some help with safety precautions I went ahead and made a user " su minecraft " with no password so people can't ssh connect does anyone know how to edit the sudoers file permissions for the minecraft user? to where I don't need to use sudo? thank you for taking your time and reading not in a hurry to get this done so take your time if your helping or working with someone else.
If you need to ask questions like that, don't do it.
Get aquainted with Debian stable first, then with running a server in general, and securing it.
 
Old 12-17-2020, 06:41 AM   #8
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554
Quote:
Originally Posted by lawquest View Post
Again, minetest is apparently just as good as minecraft.
No, it's not even close.

 
Old 02-25-2021, 10:38 PM   #9
COBaker
LQ Newbie
 
Registered: Feb 2021
Posts: 2

Rep: Reputation: Disabled
I think you have chosen not a very good option to create. This is a rather complex service
My friend tried to make the server this way, but it did not work out as there was a need for additional knowledge that he did not have. I do not understand anything in this area , but I know a little about it and my friend and I were advised https://minecraftservers.biz/cubecraft/ which we played without problems, thus replacing what my friend tried to do. Thus, we still managed to play a kind of server on which we could play without interruption and together, as if it were our local server , and when we were tired of surviving together, we went to the rest of the games and got acquainted with others.

Last edited by COBaker; 03-06-2021 at 06:41 AM.
 
Old 02-26-2021, 05:36 PM   #10
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
I think you are taking a large risk if you are running a minecraft server and allowing people outside your own LAN to connect.

The suggestion to educate yourself about running a server and securing it is something you need to take to heart.
 
Old 02-27-2021, 03:09 PM   #11
boughtonp
Senior Member
 
Registered: Feb 2007
Location: UK
Distribution: Debian
Posts: 3,616

Rep: Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554Reputation: 2554

((Seems to be a phantom message causing this thread to remain unread; hopefully this post solves that.))

 
Old 03-28-2022, 10:59 AM   #12
ChrisHerlihy
LQ Newbie
 
Registered: Mar 2022
Posts: 1

Rep: Reputation: 0
Wow, is it really difficult to make your own Minecraft server on Linux?! That's why I'm only working on Linux and not trying to install any games on this operating system. To be honest, I have never set up a server for Minecraft on Linux. However, I did it on Windows. And you have several options. One of them is just to open the ports using the settings in your wifi adapter. The second way is to simply purchase to pay for server rent, and the third is to tell your child to try to play on some large minecraft prison servers that he will be interested in (at least my son really likes such servers)

Last edited by ChrisHerlihy; 03-31-2022 at 03:29 AM.
 
Old 03-28-2022, 09:04 PM   #13
computersavvy
Senior Member
 
Registered: Aug 2016
Posts: 3,345

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Quote:
Originally Posted by ChrisHerlihy View Post
Wow, is it really difficult to make your own Minecraft server on Linux?! That's why I'm only working on Linux and not trying to install any games on this operating system.
Managing a server of any type that allows outside connections requires the admin to have a thorough knowledge of security and how to protect his system (and network). Failing that it is only a matter of time until some cracker manages to own the machine (and the network as well).

If the machine is only accessible from within the LAN it does reduce the risk, but does not eliminate it.
 
Old 03-29-2022, 08:15 AM   #14
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 26,675

Rep: Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970Reputation: 7970
Quote:
Originally Posted by ChrisHerlihy View Post
Wow, is it really difficult to make your own Minecraft server on Linux?! That's why I'm only working on Linux and not trying to install any games on this operating system.
Yeah...9 whole steps:
https://phoenixnap.com/kb/minecraft-dedicated-server

And gaming on Linux has come a long way.
 
Old 03-29-2022, 09:01 AM   #15
jmgibson1981
Senior Member
 
Registered: Jun 2015
Location: Tucson, AZ USA
Distribution: Debian
Posts: 1,141

Rep: Reputation: 392Reputation: 392Reputation: 392Reputation: 392
You may be better served by using a prebuilt docker for it. There are tons of them on docker hub. I know I made one myself and use it daily. But opening to the internet is a whole can of worms you may not be up for. In that case it's both safer, and likely cheaper to just pay for a realms sub or renting a server. They are dirt cheap these days for what they offer in regards to proper system admin and security. https://www.g-portal.com/us/en/games...MaAl3lEALw_wcB is one such place. I can't speak to this one's quality but they are everywhere.
 
  


Reply

Tags
debian 10, minecraft, permissions, sudo, sudoers



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Minecraft NFC -- How one man took Minecraft to the next level LXer Syndicated Linux News 0 02-21-2016 05:53 AM
[SOLVED] Launch Minecraft and Minecraft server as non-root user Hasek39 Linux - General 4 01-04-2016 03:06 AM
Minecraft world trickery (and even minecraft on ipad) lhartvik LinuxQuestions.org Member Success Stories 2 05-28-2015 01:32 AM
LXer: GOL MineCraft Weekly. Grab Issue 2 Today, Linux Minecraft server LXer Syndicated Linux News 0 08-04-2013 11:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:10 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration