0

My friends and I wanted to start a minecraft server on one of my computers, a private server just for us, we wanted to play a modpack called Skyfactory 2, but I am having trouble starting up the server. My friend wants me to control it remotely, and I have been using PuTTy and filezilla to do just about everything on the server. In the ATlauncher, the launcher that I have been using to play Skyfactory 2, has a feature that allows you to "Download a server" for the modpack, I have been trying every which way to run the server with the mods installed, but I havent figured out how. If I run the LaunchServer.bat on my desktop it will I think set up the server with the mods, but I havent figured out how to run it on my server and get it set up to play with my friends. Any help would be appreciated.

Edit: Patrick Negus asked for the .bat file contents, I opened it in notepad on my desktop computer and copied them. They are:

@ECHO OFF

:: When setting the memory below make sure to include the amount of ram letter. M = MB, G = GB. Don't use 1GB for example, it's 1G ::

:: This is 64-bit memory ::
set memsixtyfour=2G

:: This is 32-bit memory - maximum 1.2G ish::
set memthirtytwo=1G

:: Don't edit past this point ::

if $SYSTEM_os_arch==x86 (
  echo OS is 32
  set mem=%memthirtytwo%
) else (
  echo OS is 64
  set mem=%memsixtyfour%
)
java -Xmx%mem% -XX:MaxPermSize=256M -jar forge-1.7.10-10.13.3.1395-1710ls-universal.jar nogui
PAUSE
pa4080
  • 29,831
Drake
  • 1
  • 1
    You would have to run it in Wine. However, if you post the contents of the .bat file with a text editor (sudo gedit <something>.bat), in your question, we may be able to help you. – negusp Nov 30 '16 at 13:32
  • .BAT files are uniquely Windows/DOS. To run ATILauncher on Ubuntu, you will need to execute the .jar file found here: https://www.atlauncher.com/downloads. This is off topic for AskUbuntu, and should be asked in their forums here: https://forums.atlauncher.com/. To run the jar, you will need to install OpenJDK, and will need to learn to admin the server via CLI. – AnotherKiwiGuy Nov 30 '16 at 13:55
  • @Thatguy That wasnt the question I was trying to ask, I was trying to ask for help with a .bat file that you are supposed to run to start up the server with mods installed. – Drake Nov 30 '16 at 17:38
  • @PatrickNegus I posted the contents in the original question. – Drake Nov 30 '16 at 17:38
  • I understand exactly what you're asking, but it is still not related to Ubuntu or its software, and is off topic for AskUbuntu.com – AnotherKiwiGuy Nov 30 '16 at 22:06
  • @ThatGuy: I disagree. This query is very much on topic if you interpret it more broadly like "How can I do in Ubuntu what this batch file does in Windows?" – David Foerster Dec 01 '16 at 06:41
  • You may be right, as an interpretation. But even then, wouldn't it fall under Linux in general, rather than Ubuntu? Also, they (Skyfactory) have their own Linux support forum. It just seems out of scope. There is a 'too broad' flag as well. :/ – AnotherKiwiGuy Dec 01 '16 at 06:58
  • 1
    @ThatGuy it's not off-topic just because it is about Linux in general, since Linux-in-general includes Ubuntu. Questions about non-Ubuntu Linux are off topic – Zanna Dec 01 '16 at 08:33
  • So, @David I saw you posted it ported to a sh script, is there a way I can run that on my Ubuntu server? – Drake Dec 01 '16 at 12:56
  • See the update to my answer and please use the comments of the respective answer if you have a specific request related to them. – David Foerster Dec 01 '16 at 16:38

2 Answers2

4

Here's a version of the Windows batch file ported to a Sh script:

#!/bin/sh

# When setting the memory below make sure to include the amount of ram letter. M = MB, G = GB. Don't use 1GB for example, it's 1G ::

# This is 64-bit memory ::
memsixtyfour=2G

# This is 32-bit memory - maximum 1.2G ish::
memthirtytwo=1G

# Don't edit past this point ::

case "`uname -m`" in
    i?86)
        mem=$memthirtytwo;;
    *)
        mem=$memsixtyfour;;
esac

java -Xmx$mem -XX:MaxPermSize=256M -jar forge-1.7.10-10.13.3.1395-1710ls-universal.jar nogui

See How do I run .sh files? if you don't know what to do with it. I assume you know how to set up a Minecraft server on Linux because I don't.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
3

.bat files are scripts for Windows machines, so you are basically trying to run Windows software on Linux which won't work. While yes it's possible to use wine to run Windows programs, Minecraft and ATLauncher is written in Java and runs on all platforms that support Java - which Ubuntu does.

Install java using the open source OpenJDK packages:

sudo apt-get install openjdk-7-jre

Now with Java installed download the server:

# You can download in your browser or in the termianl like this
wget https://s3.amazonaws.com/Minecraft.Download/versions/1.11/minecraft_server.1.11.jar

Now you can run the server:

java -Xmx1024M -Xms1024M -jar minecraft_server.1.11.jar nogui

Assuming that works Minecraft server runs on your computer, you can now try ATLauncher, it's basically the same steps but with a different .jar file from https://www.atlauncher.com/download/jar (select for Linux)

  • 2
    I already know how to set up a vanilla minecraft server, I am just having trouble integrating the mods from the modpack to allow us to play the modpack, instead of just minecraft 1.7.10. If you know how to set up a server from the server folder you download from the packs folder in the atlauncher that information would be great. – Drake Nov 30 '16 at 18:09