Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Suppose I have a script in


How do I run that script, when a new instance is booted? (I'm used to using the point-and-click control panel Amazon has...)

share|improve this question
Which Linux distribution are you using? Let me know and I'll give you some steps. – gareth_bowles Jun 22 '10 at 15:33



to /etc/inittab will make init execute as root when the server hits runlevel 3.

That'll probably suffice for your needs.

share|improve this answer

Since the OP posted his original question, there's been a lot of work done with Ubuntu cloud-init. If you're using an Ubuntu server on for EC2 (we use it almost exclusively in production), it's quite easy to specify a Python script to be executed when the instance is created.

Cloud-init supports mulit-part input, so you can insert both an upstart job and have it run a user-data script.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.