Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8164883
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T19:24:50+00:00 2026-06-06T19:24:50+00:00

Is there a brief guide to explain how to start up a application when

  • 0

Is there a brief guide to explain how to start up a application when the instance starts up and running? If it were one of the services installed through yum then I guess I can use /sbin/chkconfig to add it to the service. (To make it sure, is it correct?)

However, I just want to run the program which was not installed through yum. To run node.js program, I will have to run script sudo node app.js at home directory whenever the system boots up.

I am not used to Amazon Linux AMI so I am having little trouble finding a ‘right’ way to run some script automatically on every boot.

Is there an elegant way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T19:24:51+00:00Added an answer on June 6, 2026 at 7:24 pm

    One way is to create an upstart job. That way your app will start once Linux loads, will restart automatically if it crashes, and you can start / stop / restart it by sudo start yourapp / sudo stop yourapp / sudo restart yourapp.

    Here are beginning steps:

    1) Install upstart utility (may be pre-installed if you use a standard Amazon Linux AMI):

    sudo yum install upstart
    

    For Ubuntu:

    sudo apt-get install upstart
    

    2) Create upstart script for your node app:

    in /etc/init add file yourappname.conf with the following lines of code:

    #!upstart
    description "your app name"
    
    start on started mountall
    stop on shutdown
    
    # Automatically Respawn:
    respawn
    respawn limit 99 5
    
    env NODE_ENV=development
    
    # Warning: this runs node as root user, which is a security risk
    # in many scenarios, but upstart-ing a process as a non-root user
    # is outside the scope of this question
    exec node /path_to_your_app/app.js >> /var/log/yourappname.log 2>&1
    

    3) start your app by sudo start yourappname

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

There's only a brief introduction to Chameleon Template in document of pyramid. Any detailed
In brief, my problem is that I want to loop through the contents of
Are there some help resources, or can anyone give me a brief Idea how
Brief: I'm fairly new to databases and currently have one with two tables for
A brief background: I'm working on a web-based drawing application and need to draw
I have two brief question: Is there a way that I can click on
Is there any brief explanation for IP security? And Why do we use it?
In my code there are three concurrent routines. I try to give a brief
In my code there are three concurrent routines. I try to give a brief
Can anyone recommend a how-to guide or provide a brief overview of what's involved

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.