1. The forums will be archived and moved to a read only mode in about 2 weeks (mid march).

Guide [Advanced Tutorial] Setup a PocketMine-MP server on a VPS

Discussion in 'Help' started by Diduhless, Nov 28, 2016.

  1. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
    Hello! Today I'll explain how to setup a PocketMine-MP server on a VPS.
    This tutorial is a little hard so, if you are a newbie I suggest you to buy a server from someone.

    We suppose we have purchased the VPS.
    The commands that we are going to execute are working on a Debian 8, if you are using another version, the commands may not work.

    In this tutorial we are going to use PuTTy and, for begginers, FileZilla.
    Let's open PuTTy, on Host Name we are going to put the IP Adress of the VPS, and on Port, 22.
    On Saved Sessions we put the name of the server, like "Storm", and we Save.
    Now we are going to click 2 times Storm, and it will redirect us to the VPS login panel.
    If you didn't unset things of the configuration, the user will be root, and the password, you should know it,
    it depends on our host.

    Now we are on the VPS, let's run the following commands:
    Code:
    apt-get update
    apt-get install gcc g++ make automake libtool autoconf bison
    wget -q -O - https://raw.githubusercontent.com/pmmp/php-build-scripts/master/installer.sh | bash -s -
    
    This will download and install PocketMine with PHP7 binaries in your VPS. It can take about 10 minutes.

    Now the download is complete, we can see the folders/files we have by writing ls.
    Now, we are going to write ./start.sh, this will start the server.
    To stop it we can execute stop (in PMMP console).

    Great job! We have setup a PocketMine-MP server on a VPS, but...
    When I close the VPS, the server stops. Why?
    Okay, let's put it 24/7.

    To put it 24/7, we must install tmux, this program will let us put the server 24/7.
    We can install tmux writing apt-get install tmux.
    Now we have installed, let's open a new tmux window. Write tmux.
    Now we do ./start.sh.
    Try closing the VPS, the server don't stop! But, now, how do I close that window?
    First of all, let's execute stop on the console.
    Then, we are going to press Ctrl + B + X. And we press y.
    To comeback to the tmux window, we can just write tmux a.

    Wait! you didn't tell us how to put shit worlds and plugins on the VPS!
    Okay, I'll explain.
    Begginers we will use FileZilla, and expert people will drag and download files into the VPS without it.

    Dear Begginers.
    Just open FileZilla and login to your VPS as you do on PuTTy, then you drag files to the file box. EASY

    D... proplayers.
    We can download with wget, rename/move files with mv and remove files with rm.
    To compress/extract .zip folders, install zip. You can extract with unzip.

    Haha working on it.

    Amazing! Leave a like if it worked, and a comment if you see there is an error.
     
    Last edited: Nov 28, 2016
  2. SOFe

    SOFe Administrator Staff Member PMMP Team Poggit Admin

    Messages:
    1,968
    GitHub:
    sof3
    HimbeersaftLP likes this.
  3. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
  4. Intyre

    Intyre Administrator Staff Member PMMP Team

    Messages:
    81
    GitHub:
    Intyre
    Code:
    apt-get install gcc g++ make automake libtool autoconf bison
    
    This is only needed when you compile PHP yourself.

    Code:
    wget -q -O - https://raw.githubusercontent.com/pmmp/php-build-scripts/master/installer.sh | bash -s -
    
    Do NOT run the installer as root, this is discouraged. https://github.com/pmmp/php-build-scripts/blob/master/installer.sh#L91

    Code:
    rm start.sh
    wget https://raw.githubusercontent.com/PocketMine/PocketMine-MP/master/start.sh
    
    The install script downloads the correct start.sh. Redownloading makes no sense. https://github.com/pmmp/php-build-scripts/blob/master/installer.sh#L230

    Code:
    chmod +x start.sh
    
    The install script will do this for you. https://github.com/pmmp/php-build-scripts/blob/master/installer.sh#L239

    Take a look at http://pmmp.readthedocs.io/en/rtfd/installation.html#installing-on-linux-macos and
    http://pmmp.readthedocs.io/en/rtfd/faq/installation/rootuser.html
     
    HimbeersaftLP and SOFe like this.
  5. xBeastMode

    xBeastMode Shog Chips

    Messages:
    0
    Useless step. All you need to is connect to an SSH on a user that is NOT ROOT and download using
    Code:
    $ curl -sL https://raw.githubusercontent.com/PocketMine/php-build-scripts/master/installer.sh | bash -s -
    
    OR
    
    $ wget -q -O - https://raw.githubusercontent.com/PocketMine/php-build-scripts/master/installer.sh | bash -s -
    Then do ./start.sh.
     
    HimbeersaftLP likes this.
  6. Diduhless

    Diduhless Baby Zombie

    Messages:
    199
    GitHub:
    Diduhless
    Fixed.
    When I execute the installer, it says I need to download that dependencies.
     
  7. Intyre

    Intyre Administrator Staff Member PMMP Team

    Messages:
    81
    GitHub:
    Intyre
    Don't mind me using docker, it is to have a clean Debian to start with. The only thing I had to installed was curl or wget.
    [​IMG]
     
  8. robske_110 (Tim)

    robske_110 (Tim) Wither Skeleton Poggit Reviewer

    Messages:
    1,342
    GitHub:
    robske110
    I love your gifs... How do you make them so easily?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.