1. Welcome to LilyPad. Download the project, explore the forums, and create your own LilyPad network.


    If you use the software and enjoy it or have a question, or would like to contribute to the future of the software directly or through resources, please sign up and join our little community.

Setting up a GoLilyPad Server [Debian based distros]

Discussion in 'Discussion' started by AdamJonesay, Jan 11, 2014.

  1. AdamJonesay

    AdamJonesay New Member

    Setting up GoLilyPad on Debian.
    (I suggest you already have some knowledge on the Linux terminal.)
    Note: You are going to need root access and your root password for this tutorial.
    Checking if you have Java (step 1):
    You're going to need Java to run your Minecraft server anyways, and if you already have Java installed on your machine you can go ahead and skip this step. If you aren't sure type the following,
    Code (text):

    java -version
     
    The output of this command will be something like the following if you have Java installed.
    Code (text):

    ss5104@phoenix2.az.deadlox.us:~$ java -version
    java version "1.7.0_45"
    Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
     
    If the output of that command is similar to that, you may skip step 2. If you DON'T have Java it should say something like the following
    Code (text):

    -bash: java: command not found
     
    If this says command not found you'll need to do step 2.

    Getting Java (step 2):
    Since you don't have Java and you need Java to run your Minecraft server, you're going to need to download it. (skip this step if you don't have Java)
    To download the latest version of Java you will need to do the following.
    Edit /etc/apt/sources.list with your favorite text editor and add the following to the end of the file:
    Code (text):

    deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
    deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main
     
    After this you need to add a GPG key and install Java by typing the following command:
    Code (text):

    su -
    apt-key adv --keyserver keyserver.ubuntu.com --recv-keys EEA14886
    apt-get install oracle-java7-installer
    exit
     
    During this process it is going to ask you to either type y or n to say yes or no to installing the packages. Press y (unless for some reason you just really don't want Java :x)
    Once that's over you will want to type again:
    Code (text):

    java -version
     
    And it should say:
    Code (text):

    ss5104@phoenix2.az.deadlox.us:~$ java -version
    java version "1.7.0_45"
    Java(TM) SE Runtime Environment (build 1.7.0_45-b18)
    Java HotSpot(TM) 64-Bit Server VM (build 24.45-b08, mixed mode)
     
    Downloading an application called screen (step 3):
    Screen is an application that does basically what it is called. It allows you to make what are called screen sessions, which are almost like little windows that you can open and close. This is optional, but you probably don't want to have to have your SSH session open 24/7.

    Type the following:
    Code (text):

    su -
    apt-get install screen
    # Press y if asked to continue.
    exit
     
    Basic commands for screen are:
    screen -S <name> # Creates a screen session with specified name ex: "screen -S hub"
    screen -x <name> # Attaches to a already created screen session ex: "screen -x hub"
    screen -ls # Lists current screens and specifies if someone is attached to them or not.
    Pressing CTRL + A + D will detach you from a screen session.
    Creating folders for LilyPad (step 4):
    It's not required that you make specific folders for LilyPad, you can create the folders however you want, but here's how I personally have my LilyPad setup.

    Creating a folder for all LilyPad executables:
    Code (text):

    cd ~
    mkdir lilypad
    cd lilypad
     
    The above command will change directories to your home directory, create a directory named lilypad and change directory to the lilypad directory we just created.

    Now we need to know whether your machine is 32 bit (386) or 64 bit (amd64).
    Type the following:
    Code (text):

    uname -a
     
    The output will look somewhat like this:
    Code (text):

    ss5104@phoenix2.az.deadlox.us:~$ uname -a
    Linux phoenix2.az.deadlox.us 3.2.0-4-amd64 #1 SMP Debian 3.2.51-1 x86_64 GNU/Linux
     
    Notice the section that I bolded, that will tell you which LilyPad version to download.
    If it says amd64 or x86_64, you're going to want the 64 bit edition of GoLilyPad (*-linux-amd64).
    If it says i386 or x86, you're going to need the 32 bit edition of GoLilyPad (*-linux-386).

    Downloading LilyPad (step 5):
    In this tutorial the proxy and the connect server are going to be in the same folder. We can use a command called wget to download the file so that we don't have to upload it from our own computers (LET THE SERVERS DO ALL THE WORK! :x).
    Just in case you might not have the command, type:
    Code (text):

    su -
    apt-get install wget
    exit
     
    Now according to which arch your Debian is, download the according LilyPad versions:
    Code (text):

    wget "http://ci.lilypadmc.org/job/Go-Server-Proxy/lastSuccessfulBuild/artifact/target/proxy-linux-amd64" "http://ci.lilypadmc.org/job/Go-Server-Connect/lastSuccessfulBuild/artifact/target/connect-linux-amd64"
     
    OR:
    Code (text):

    wget "http://ci.lilypadmc.org/job/Go-Server-Proxy/lastSuccessfulBuild/artifact/target/proxy-linux-amd64" "http://ci.lilypadmc.org/job/Go-Server-Connect/lastSuccessfulBuild/artifact/target/connect-linux-amd64"
     
    We're done downloading LilyPad now, so lets move on to making it executable and configuring it!

    Setting up LilyPad (step 6):
    Now that we've downloaded LilyPad we need to make it executable and also run it to generate the initial configuration.

    In linux you cannot execute files unless they are marked as executable, to do so type the following:
    Code (text):

    chmod +x *-linux-*
     
    I used wildcards in that example, so that command will work whether your machine is 32 or 64 bit. From now on substitute VERSION for your architecture (386 or amd64).

    Type the following to get the connect server running.
    Code (text):

    ./connect-linux-VERSION
     
    Now that this is started we need to stop it, to edit the configuration. You can use any of the following to stop LilyPad:
    Code (text):

    stop
    exit
    halt
     
    Just make sure you're actually running LilyPad when you execute exit or halt. Executing halt in the linux terminal will shut down the machine, and exit will close your SSH session.

    The config will look something like this,
    Code (text):

    logins:
    - username: example
      password: example
    - regexp: ^example-.*$
      password: example
     
    With this I set it up so that all servers have the same password, so my configuration looks like this,
    Code (text):

    bind: :5091
    logins:
    - regexp: ^*
      password: MYSUPERSECUREPASSWORD
     
    With this configuration anything with the password of MYSUPERSECUREPASSWORD will authenticate.

    If you want to setup specific logins you may also do that:
    Code (text):

    bind: :5091
    logins:
    - username: proxy
      password: supersecretpasswordforthemainlilypadproxy
    - username: hub
      password: supersecretpasswordforthehubserver
    - username: creative
      password: supersecretpasswordforcreativeserver
     
    You'll want to substitute all passwords for something more secure.
    I suggest using http://www.random.org/passwords/ to generate a long list of passwords then to use those.
    Next time you start connect you'll want to do this in a screen session though, so you don't need to be attached to it 24/7.
    Code (text):

    screen -S connect
    cd ~/lilypad
    ./connect-linux-VERSION
    # Press CTRL + A + D to detach from the session.
     
    Now that we have the connect instance of LilyPad setup we'll need to configure the LilyPad Proxy. We've already downloaded this so we just need to run it to generate the initial configuration (Detach from the screen session if you haven't already).
    Code (text):

    cd ~/lilypad
    ./proxy-linux-VERSION
     
    Once this starts running it's going to spam a bit in the log about not being authenticate properly to the connect server, so let's fix that.
    Code (text):

    stop
     
    Now use your favorite text editor (personally I recommend vim) to edit the proxy configuration file, proxy.yml.
    You'll see in the configuration some common items, motd, slot count, etc.
    Code (text):

    connect:
      address: 127.0.0.1:5091
      credentials:
        username: example
        password: example
    proxy:
      bind: :25565
      routes:
      - domain: ""
        server: example
      - domain: example.com
        servers:
        - hub1
        - hub2
        motd: Example Custom MOTD
      locale:
        full: The server seems to be currently full. Try again later!
        offline: The requested server is currently offline. Try again later!
        loggedIn: You seem to be logged in already. Try again later!
        lostConn: Lost connection... Please try to reconnect
        shutdown: The server is being restarted. Please try to reconnect
      motd: A LilyPad Server
      maxPlayers: 1
      authenticate: true
     
    You're going to want to specify the username and password you specified on the connect.yml for the proxy, and you may also edit the other options. Here's how I configured mine.
    Code (text):

    connect:
      address: 172.24.158.202:5091
      credentials:
        username: proxy2
        password: REDACTED
    proxy:
      bind: :25565
      routes:
      - domain: ""
        server: central
      locale:
        full: The server seems to be currently full. Try again later!
        offline: The requested server is currently offline. Try again later!
        loggedIn: You seem to be logged in already. Try again later!
        lostConn: Lost connection... Please try to reconnect
        shutdown: The server is being restarted. Please try to reconnect
      motd: '      &9- &aDeadlox''s Minecraft Server &9- &2&oONLINE &9-'
      maxPlayers: 683
      authenticate: true
     
    Remember to substitute YOUR IP and YOUR AUTHENTICATIONS.

    If you have any issues with this go ahead and mention me on Twitter (@AdamJonesay) or reply to this thread.
  2. The_Zip

    The_Zip Active Member Resource Contributor

    Very descriptive, and nice output! But, suggestion wise, it might be easier to combined the Linux servers into one tutorial. Using your template, or the other one, that @Matt made. Would be allot better for the users, allot more organized, and in my opinion allot more cleaner. I am very familiar with Ubuntu and Alpine personally, and would only take a few google searches on Google for the commands for the other major operating systems.
  3. AdamJonesay

    AdamJonesay New Member

    Personally I think the best option would be if we were to make a per-distro tutorial that links to a general LilyPad tutorial. Because after a certain point the steps are EXACTLY the same.
  4. Coelho

    Coelho Software Engineer Staff Member Administrator Maintainer

    Technically you don't even need Java to setup GoLilyPad.
  5. AdamJonesay

    AdamJonesay New Member

    Yeah, I know but I figured I'd add that in for the people who are going to be like "omgz my mc server wont start it says -bash: java: command not found!!!!"
  6. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    Most parts are the same as in the manual that already exists. Should we move it to Documentations @Coelho ?
  7. The_Zip

    The_Zip Active Member Resource Contributor

    One of my points exactly @Matt , they are pretty much the same. And, I believe it would be best to just combined them.
  8. Matt

    Matt Forum Moderator & Contributor Staff Member Moderator Contributor

    How do you want to combine it then? If it is almost the same, then nothing has to be changed, right? ( Correct me if not )
  9. The_Zip

    The_Zip Active Member Resource Contributor

    Well, the commands are basically the only difference. Therefor, in the main one, you could add For CentOS: Commands, For Debian: Commands, ect...
  10. IvIercenary

    IvIercenary New Member

    I guess im just a little confused, being all bungee oriented and such, How does one add servers to the config? and do they have to be on the same server?

    Just not seeing much in the example config here....dont want to go and install just to find out it cant do what i need...
  11. The_Zip

    The_Zip Active Member Resource Contributor

    The switch can be a little difficult, but I am sure you will get the hang of it super quickly. I would check out the official ssh tutorial, practically the same thing, http://www.lilypadmc.org/threads/setting-up-a-golilypad-server-ssh-centos.380/ , and at the bottom is a extremely good video tutorial by SgtCaze. However, this may be a quick knowledge boost that will help you out, here is my connect.yml. With the first being my proxy, second being the hub, and the third being the server1.

    Code (text):
    bind: :5091

    logins:
    - username: LilyPad
      password: password
    - username: hub
      password: hubserverpw
    - username: server1
      password: server1pw

Share This Page