Advertisement
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

How to setup a PocketMine Server on a VPS

Comments in 'General Discussion' started by Yeelze, Jul 17, 2016.

  1. Yeelze
    Offline

    Yeelze New Member

    Joined:
    Apr 2, 2016
    Posts:
    31
    Minecraft User:
    Yeelze
    Hi, in this tutorial I will explain how to setup a PocketMine server on your VPS.
    If you are a newbie about that, I suggest you to learn for understanding this tutorial.

    I use RamNode VPS, there isn't any lag and the lower price is 3.50$.
    If you are going to purchase one, be sure of you are purchasing a KVM VPS, not a OpenVZ.
    The commands that will be executing works on Debian 7, if you are using another version, the commands may not work.

    Run the following commands:
    Code:
    apt-get update
    
    Code:
    apt-get install gcc g++ make automake libtool autoconf bison
    
    Code:
    wget -q -O - https://raw.githubusercontent.com/PocketMine/php-build-scripts/master/installer.sh | bash -s - -r
    
    That will download and install PocketMine with PHP7 in your VPS. It will take about 10 minutes.

    Once you finish, you must update start.sh to work with PHP7.
    Code:
    rm start.sh
    
    We remove the actual start.sh
    Code:
    wget https://raw.githubusercontent.com/PocketMine/PocketMine-MP/master/start.sh
    
    We download the latest start.sh working with PHP7
    Code:
    chmod +x start.sh
    
    We give administrator permissions to the start.sh to can open it.

    All is finished, to run your server you need to:
    Code:
    ./start.sh
    
    To stop it, just type in the console:
    Code:
    stop
    
    If you want to keep the server 24/7, you need to install "screen":
    Code:
    apt-get install screen
    
    And then , you need to open the start.sh with screen
    Code:
    screen ./start.sh
    
    You can close the console window if you run:
    Code:
    Ctrl A + D
    
    And back to them with:
    Code:
    screen -r
    
    Optional, if you want to the server reboot when running "stop", you can install a text editor and edit start.sh:
    Code:
    apt-get install nano
    
    Code:
    nano start.sh
    
    I recommend us to get PocketMine-MP Genisys .phar, you can download it on his jenkins.
    (If you don't know how to, put it on the comments)

    You change in LOOP, "no" to "yes" and you save changes with Ctrl X (to confirm type "y").

    If you want to explore your VPS, you can use the following commands:
    Code:
    cd (folder): You go to a folder.
    cd ..: You go back.
    ls: A list of the folders and files will be showed on the folder that you are.
    cp -r (file) (copy_name): Its "copy", if I cp -r start.sh run.sh, there will be 2 files called "start.sh" and "run.sh".
    mv (file) (rute\file_new_name): This is called "move" you can use it for rewriting files and moving files.
    Example: mv Lobby worlds\: You will move "Lobby" folder to worlds. If you forget the \, the folder "Lobby" will be rewrited to "worlds". If I add \spawn (mv Lobby worlds\spawn) the folder "Lobby" will be moved to worlds folder and rewrited to "spawn".
    mkdir (folder): You create a new folder.
    cat (file): You see the text of a file, (you can't edit it, only for looking).
    wget (www...): You download a file of a webpage.
    
    Let me know if I helped you! ;)
    Last edited: Jul 26, 2016
  2. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    You should use Tmux instead of screen.

    Also, for beginners I recommend WinSCP to manage folders and files, it will make life so much easier.
    applqpak likes this.
  3. Legoboy0215
    Offline

    Legoboy0215 Notable Member

    Joined:
    Nov 1, 2014
    Posts:
    1,724
    Minecraft User:
    Legoboy0215
    You should give a reason why not to use OpenVZ VPSs. It isn't bad, but it is oversold in companies like RamNode.

    DigitalOcean and OVH ftw ;)
    applqpak likes this.

Share This Page

Advertisement