Find the answer to your Linux question:
Results 1 to 2 of 2
Hi, I am trying to run a minecraft server in the background so I can log out of ssh and just leave it running. I have tried using nohup java ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    3

    How to use nohup to run .jar's without being logged into ssh

    Hi,
    I am trying to run a minecraft server in the background so I can log out of ssh and just leave it running. I have tried using

    nohup java -Xmx1024M -Xms1024M -jar craftbukkit.jar nogui &

    but it doesn't seem to work. The server still goes offline. When I enter that in, I get this:

    $ nohup: ignoring input and appending output to `nohup.out'

    How do I fix this?
    Thanks

  2. #2
    Linux Guru
    Join Date
    May 2011
    Posts
    1,843
    Have you tried running it in a screen? e.g.:
    Code:
    screen -dm -S mcserver java -Xmx1024M -Xms1024M -jar craftbukkit.jar nogui
    Edit: Forgot to mention - that launches it in the background, you'd then attach to it with:
    Code:
    screen -r mcserver
    Last edited by atreyu; 11-19-2011 at 02:47 AM. Reason: attach

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...