Upstart is an event-based init system for Linux, created at Canonical and first shipped with Ubuntu 6.10 in 2006. As the process with PID 1, it started, stopped and supervised services by reacting to events such as a filesystem being mounted or a network interface coming up, instead of running scripts in a fixed order.
In the history of Linux system initialization, Upstart is the bridge between the sequential SysVinit model and the dependency-based design of systemd. It was the default on Ubuntu until version 15.04, served Red Hat Enterprise Linux 6 and early Fedora releases, and powered ChromeOS for many years. Development ended in 2014, so today it matters mainly for legacy systems and migration work.
How Upstart reacts to events
Upstart treats the boot process as a chain of events and job state changes. The kernel starts Upstart, which emits the startup event. Jobs configured to start on that event run, and each job in turn emits events such as starting, started, stopping and stopped, which can trigger further jobs.
This push model differs from SysVinit, where numbered scripts in a runlevel directory run strictly one after another. In Upstart, work starts as soon as its conditions are met, so independent services start in parallel and hot-plugged hardware can trigger jobs at any time, not only during boot.
The table below lists events that appear in most Upstart job files.
| Event | Emitted by | Typical use |
|---|---|---|
| startup | Upstart at boot | Starting the very first jobs |
| filesystem | The mountall helper | Jobs that need all local filesystems |
| net-device-up | Network scripts | Services that need a network interface |
| runlevel | The telinit compatibility layer | Emulating SysV runlevels |
| started JOB | Upstart after a job starts | Starting dependent services |
| stopping JOB | Upstart before a job stops | Stopping services in the right order |
Job files and stanzas
Each Upstart service is described by a job file in /etc/init with the .conf extension. The file is made of stanzas, short keywords that define when the job runs, what it executes and how it is supervised. A minimal web service might contain start on (filesystem and net-device-up IFACE!=lo), stop on runlevel [016], respawn and exec /usr/sbin/mydaemon.
| Stanza | Purpose | Example |
|---|---|---|
| start on | Event expression that starts the job | start on started mysql |
| stop on | Event expression that stops the job | stop on runlevel [016] |
| exec or script | Command or shell block to run | exec /usr/bin/app --foreground |
| respawn | Restart the job if it dies | respawn limit 10 5 |
| expect | How to follow forking daemons | expect fork or expect daemon |
| task | Job runs once and finishes | Cleanup or setup steps |
| pre-start and post-stop | Commands around the main process | Creating runtime directories |
Administrators could disable or change a packaged job without editing it by creating an override file, for example /etc/init/ssh.override containing manual. Jobs could also be instance jobs, where one definition runs several copies distinguished by a variable such as a terminal name.
Controlling services with initctl
Upstart is controlled through initctl, which talks to PID 1 over a D-Bus style socket. The shorter commands start, stop, restart and status are symbolic links to it. Typical calls include initctl list to show all jobs and their states, status ssh to check one service and initctl emit my-event to send a custom event that other jobs can wait for.
For compatibility, Ubuntu kept the service wrapper and SysV scripts in /etc/init.d. A special rc job ran those scripts when Upstart emitted runlevel events, so older packages kept working during the transition. Later Ubuntu releases also added session jobs, which let Upstart supervise per-user processes in a desktop session.
Upstart compared with other init systems
Upstart differs from its neighbors mainly in how it decides what to start. SysVinit follows a fixed sequence, Upstart follows events forward, and systemd works backward from a requested target through declared dependencies.
| Init system | Start model | Supervision | Status today |
|---|---|---|---|
| SysVinit | Ordered scripts per runlevel | None built in | Niche, kept by some distributions |
| Upstart | Event-driven job triggers | Respawn with limits | Unmaintained since 2014 |
| systemd | Dependency graph and targets | Full supervision with cgroups | Default on most distributions |
| OpenRC | Dependency-based scripts | Optional supervisor | Used by Gentoo and Alpine |
| runit | Simple service directories | Built in | Used by Void Linux |
A known weakness of the event model is that it describes triggers, not requirements. If a job should start when a service is available but that service started earlier, the event has already passed, and the job may never start. systemd replaced this with explicit dependencies, socket activation and cgroup tracking, which is why Ubuntu switched to it in 2015.
Limitations and migration to systemd
Several practical problems explain why Upstart lost its place. Process tracking relied on ptrace-based fork counting through the expect stanza, and a wrong expect value could make Upstart follow the wrong PID or hang the job. It also lacked cgroup containment, so daemons that escaped their parent were hard to stop cleanly.
Migrating a job to systemd usually maps each stanza to a unit file directive. The table summarizes the most common translations.
| Upstart stanza | systemd equivalent | Note |
|---|---|---|
| exec | ExecStart= | Prefer a foreground process |
| respawn | Restart=on-failure | Add RestartSec= for delays |
| start on started X | After=X with Wants=X | Dependency instead of event |
| expect fork | Type=forking | Better replaced by Type=simple |
| env VAR=value | Environment=VAR=value | Or an EnvironmentFile= |
| pre-start | ExecStartPre= | Runs before the main process |
A plain-language summary
When a Linux computer starts, one special program wakes up all the other services. Upstart was one such program, and it worked like a building manager who reacts to news: when the lights come on, start the elevators; when the doors unlock, open the reception desk.
This made startup faster and flexible, because tasks ran as soon as they were ready. Its weak spot was that if a piece of news was missed, the matching task might never begin. That is one reason most Linux systems later moved to systemd.
An example from practice
An operations engineer maintains an internal reporting service that still runs on an Ubuntu 14.04 virtual machine. The service is defined in /etc/init/reports.conf with start on (filesystem and net-device-up IFACE=eth0), respawn, respawn limit 10 5 and expect fork. After an application update, status reports shows the job as running while the actual daemon has already exited.
The engineer finds that the new release no longer forks, so expect fork makes Upstart track a PID that does not exist. Removing the stanza fixes the immediate fault. During the planned move to Ubuntu 22.04, the job is rewritten as a systemd unit with Type=simple, After=network-online.target and Restart=on-failure, and the service now restarts reliably after crashes.