The Twelve-Factor App
Twelve principles for building web services that deploy and scale cleanly, written by Adam Wiggins from experience running many applications on the Heroku platform. It covers configuration, dependencies, stateless processes, logging, disposability and keeping environments alike. It takes about an hour to read, suits backend developers and anyone containerising an app for the first time, and explains where most modern deployment conventions come from.
12
12factor.net · Sept 2026
2017
12factor.net · Sept 2026
CC BY 4.0
GitHub · Sept 2026
2.8k
GitHub · Sept 2026
Guide
Other
Adam Wiggins
About an hour
Intermediate
Free
The twelve factors in brief
- Codebase: one codebase in version control, many deploys.
- Dependencies: declare and isolate them explicitly.
- Config: store it in the environment, not in code.
- Backing services: treat databases, queues and caches as attached resources.
- Build, release, run: keep these stages strictly separate.
- Processes: run the app as one or more stateless processes.
- Port binding: export services by binding to a port.
- Concurrency: scale out through the process model.
- Disposability: start fast and shut down gracefully.
- Dev/prod parity: keep development, staging and production as similar as possible.
- Logs: treat them as event streams written to standard output.
- Admin processes: run one-off tasks as one-off processes.
Each factor has its own short page with the reasoning behind it.
Why it is still the reference
The site says it was last updated in 2017, and the methodology has since been open sourced for community revision. Even so, almost every convention in containers, Kubernetes and platform services traces back to one of these ideas. Environment variables for secrets, twelve-factor style logging to stdout, and stateless containers you can kill at any time are all here, explained from first principles.
Where to apply it first
Configuration and statelessness. Those two cause most of the pain when an app that runs on a laptop refuses to run anywhere else. Hard coded URLs, config files baked into the image, and user sessions or uploads stored on local disk all break as soon as you run two copies. Both are cheap to fix early and expensive to retrofit.
Where it shows its age
It was written before containers and orchestration became standard, so it says little about health checks, service meshes, secrets managers or observability beyond logs. Some teams deliberately bend factor three and use a secrets store instead of plain environment variables. Read it as a set of reasons, not rules to follow blindly.
Common questions
Is it outdated? The content was last updated in 2017, but the source has since been opened up on GitHub (about 2.8k stars as of September 2026) for community revision. The core ideas remain standard practice.
How long does it take? About an hour to read all twelve pages carefully.
Do I need it if I use Kubernetes? Yes. Kubernetes assumes apps behave like twelve-factor apps; knowing why makes deployments far less surprising.
Best for: backend developers whose deployments are unreliable, and anyone containerising an application for the first time.
Ready to start?
Opens on Adam Wiggins in a new tab.
Stuck on something specific?
Writing only gets you so far. If you want an answer to your situation rather than the general case, book a session and we will work through it together. Sessions are free for approved Sefism members, and a few slots open each week.
Follow along
New writing, resources and project ideas land here first.