title: How can I get spring-boot to run forever on ubuntu?
body: <p>I'm trying to run spring-boot on a <strong><em>vm</em></strong> and have <strong><em>nginx</em></strong> proxy all request towards it. I've got this working but when I run:</p>
  
  <p><strong><em>mvn spring-boot:run</em></strong></p>
  
  <p>And my ssh session ends, it will stop the spring boot instance. (<em>as expected</em>)</p>
  
  <p>I've also tried adding the <code>&lt;executable&gt;</code> config and sym-linking the <strong><em>spring-boot jar</em></strong> to a service, like so:</p>
  
  <pre><code>&lt;plugin&gt;
      &lt;groupId&gt;org.springframework.boot&lt;/groupId&gt;
      &lt;artifactId&gt;spring-boot-maven-plugin&lt;/artifactId&gt;
       &lt;configuration&gt;
             &lt;executable&gt;true&lt;/executable&gt;
       &lt;/configuration&gt;
  &lt;/plugin&gt;
  </code></pre>
  
  <p>Then symlink the <strong><em>.jar</em></strong>:</p>
  
  <pre><code>sudo ln -s /var/users-java/target/user-0.0.1-SNAPSHOT.jar /etc/init.d/user_service
  </code></pre>
  
  <p>Now when I run the service:</p>
  
  <pre><code>sudo /etc/init.d/user_service start
  </code></pre>
  
  <p>It will log out:</p>
  
  <pre><code>Started [26208]
  </code></pre>
  
  <p>But not run the actual server?! The <strong><em>26208</em></strong> PID won't show up in my processes either!</p>
  
  <p>Any ideas? Is there an alternate way of running a spring boot app forever? Like the <strong><em>forever</em></strong> tool in node?</p>