How do I keep my server running even after I close my terminal?

Discussion in 'Server & Community Management' started by TheHoodmaster, Jul 17, 2013.

Thread Status:
Not open for further replies.
  1. Im using putty to connect to my CentOS server, and i'm using the ampersand to put it into the backround, but when I close my terminal, my server shut's down. IS there any way to keep it up 24/7?
  2. Yes.
    In linux there's a program called screen.
    This creates screens when you want so when you close your putty windows it won't close your server.
    Just do yum install screen
    Now to use it just do screen -mdS name_of_the_screen
    If you want to see the opened screens you can do screen -ls
    To resume a screen do screen -x name_of_the_screen
    • Like Like x 1
  3. another way of doing it, is

    screen -S <screenname>
    make sure you are in the correct dir, if not do cd <path to dir> (were the craftbukkit.jar or spigot.jar is) so its like cd /home/server1
    then run the start command., for my i have it saved in a .sh file and I type sh ./
    to kill a screen type screen -X -S <screenname> kill
    to enter a screen either type screen -r <screenname> or screen -x <screenname>
    and like Fredy said, type screen -ls to list screens.
    • Winner Winner x 2
  4. joehot200


    Malo you should be more active in the forums :( you always make such good/helpful comments ;P
    • Friendly Friendly x 1
  5. I also have a forum of my own, and a 2,000 player server to run.

    Oh, and im not as active as i used to be, been kinda bored of minecraft. and the internet in general.
    • Agree Agree x 2
  6. Bored of the internet? Impossible. Just in the wrong places.
    • Agree Agree x 2
  7. Isn't it either "sh" or "./"? I don't believe you can combine the two, but I may be completely wrong here...
  8. Just run your server with like this
    Code (Text):
    screen -A -m -d -S SCREENNAMEHERE java -jar spigot.jar
    You have to make .sh executable before using ./ with
    Code (Text):
    chmod +x
    • Agree Agree x 1
  9. can u help me with this thing cuz im not getin it heres a pic of my server 2013-08-20_10.03.27.png
  10. Dmck2b

    Services Staff

    Are you having issues with screens? Are you having a personal dilemma about keeping your server up? What does your MOTD colour have to do with any of this!?
    #11 Dmck2b, Aug 20, 2013
    Last edited by a moderator: Aug 20, 2013
  11. Dude i Want To Leave My Server Up When I Close It
  12. Then use screen as explained by Malo
  13. Its Not Working ...
  14. That is working. You do it wrong then
    • Agree Agree x 1
  15. Plz Tell Me How Step By Step
  16. Dmck2b

    Services Staff

    screen -s SomeName
    cd /path/to/server/install
    sh ./
    Cntrl +a

  17. I Mean By On CMD show me pics
  18. Dmck2b

    Services Staff

    This method doesn't work with command prompt... It's linux only. If your using windows you have no choice but to keep the window open afaik.
Thread Status:
Not open for further replies.