$65 book with code
Deployment from Scratch book cover

Deployment from Scratch Don't sweat taking web applications to production servers.

Learn the core transferable skills of setting up Linux virtual servers and Docker containers. Provision web servers, application servers, workers, and databases.

Tear the black box down

More than 20 years ago, deploying web applications was a black box for me. I had many questions.

It wasn't always clear to me whether running an application server with the rails s command is enough for production. And how to properly deploy a database. Or secure a server. Yet it was something I always wanted to understand and I never stopped asking.

Over the years, I found my answers. Now I want to share them with you so you can bring your applications to life.

I cover a lot of corners of system administration, server configuration and deployment of web applications. It's everything from network theory to encrypting database backups.

At the end, we'll take that black box and tear it down.

— Josef

"This is a great book. It is easy to follow and offers a nice process from zero to cloud. Highly recommended."
Edwin F. Lopez
Adobe
Ruby on Rails Django Deploy Ruby, Python, PostgreSQL, Redis & others.

What readers say

"While I was learning on my own I bumped into the Deployment from Scratch book from Josef Strzibny. The book is amazing because it covers every piece of knowledge you need to follow in a very practical way, providing all the snippets of code that you need but keeping in mind the big picture and why you do the things you do.

I was fighting to deploy my Ruby on Rails application. Now, I deploy my application to a production server with 4 CPU cores, 16 GB of RAM, and automated backups for barely €15 a month. The same would be €500 on Heroku. I now deploy with a single command, too. For me, this is a real competitive advantage.

I cannot recommend the book enough!"
Juan Sebastián Caro Rodríguez
Juan Sebastián Caro Rodríguez
Executive Director, Redvi
"I had a chance to read through the alpha version of the book and there's a lot of really good information in there. I think it's something that I wish I had had when I was first starting out, because there's so much that's not really talked about."
Jeremy Jung
Jeremy Jung
Co-host, Software Engineering Radio

26 chapters

Take a look inside

Buy a copy
Book with code for $65 + local tax

Code examples

A static website

A static website with automatic Let's Encrypt certificates and system updates. A separate configuration and rootless deployment script.

Add server-side analytics and beat the pricing of hosted solutions.

A database-backed Ruby on Rails application with Action Cable

A single server running a full-featured web application with UNIX sockets, PostgreSQL ident system authentication, Web Sockets, and Let's Encrypt certificates. A git-push deployment with helpful administration scripts.

Adjust for your application based on the knowledge from the book. Deploy within the same day!

A standalone PostgreSQL server

A self-sufficient PostgreSQL cluster demo with automatic system upgrades, log rotation, and TLS. Scripts for cluster-wide backups and restores.

Run a standalone database when you need more power or to host all your projects' databases in one place.

All demonstrations are scripted in Bash for CentOS 8 and Rocky Linux 8 systems. You don't need any knowledge of typical configuration management tools. Learn how things work without abstractions.

Testimonials

4.9
Gumroad rating from selling 1440+ copies
"For some people, there is a blank spot in starting their IT journey. A person who is not an insider nor studied IT, or hasn't worked in an information technology company, that person will have a hard time trying to enter that world. Yes, you can google some concepts, but what to google? This book helps sort it all out and prepares you for real-life IT infrastructure, shining a light into those not well known parts of real world computing."
Nikša Tomšić
IT generalist
"I've long had a strong hunch that there is both room and a strong need for something between the we'll just hack together a few simple shell scripts of the (very good!) Deployment from Scratch and the aircraft carrier that is Kubernetes."
Marcel Weiher
Author, iOS and macOS Performance Tuning
"I haven't gone through the whole book yet, but what I have read so far has been top notch! Good work!"
Alex Koutmos
Host, Beam Radio
"Hosting a production web app was super intimidating for me because I was afraid to leave out something critical regarding security or data integrity. Your book gave me clear answers and an actionable guide while I felt overwhelmed by the documentation of each individual moving parts of my server. It is clear and comprehensive and I now have confidence to deploy and manage apps myself. This is truly empowering."
Alex Baudot
Freelance developer
"I am using some scripts that I downloaded from Josef Strzibny's book that is setting up Rails deployment via Git and automatically installing a PostgreSQL server. I am also using Dokku – but I like the idea of controlling what is happening on the server."
Lucian Ghinda
Senior Ruby Developer
"DFC takes you from the basics of operating systems, networking, and filesystems all the way to server configuration, how applications work, back-ups, secrets, and scaling. Even if you don't deal with them everyday, it's good to know about them and this book is the perfect refresher. Five stars out of five the best book to have around when doing just enough DevOps."
Adrian Marin
Author of Avo

Authors

Josef Strzibny

Hello, I am Josef Strzibny, a full stack web developer. I made and deployed my first commercial web applications during high school in 2008. I have Bachelor's and Master's degrees in Applied Informatics. I have worked for Red Hat on the platform and developer experience teams as a Linux packager. I was a Red Hat Certified Engineer and a Fedora contributor.

Tiger

Hey hey, my name is Tiger. People call me Meow (don't know why). I like following mice on Twitter, coffee, and DevOps. I feel adventurous when comes to pythons. In this book, I provide comments nobody asked for and unverified facts from the Internet. One day I will build an online community for fellow cats having people flatmates.

Questions answered

Why self-hosting if there is Heroku?

There are few good reasons for being more independent on your hosting provider. If your account gets locked, you can easily move your virtual machines to other providers or on-premise. The others being cost, flexibility, or ability to provide a self-hosting option for enterprise customers.

Maybe staying with managed services like Heroku or Render is the right choice for you. This book is not about convincing you to self-host, but to show you how it's done.

Is this about on-premise?

The book's focus is on self-hosting on virtual machines within a cloud provider where people can conveniently combine self-hosting with hosted services.

While everything applies to on-premise self-hosting as well, I don't talk about provisioning the hardware for the virtual machines themselves.

What operating system is it for?

The book targets Fedora family of systems, mainly the stable CentOS 8 and Rocky Linux 8. If you are using other systemd-based operating systems such as Ubuntu, most of the book will still apply as only the package management is truly different (DNF vs APT).

I don't use Ruby or Python. Is this for me?

I wanted to write a general book, but writing in an abstract way wouldn't be that useful. I chose Ruby and Python as popular programming languages for my examples, but before diving into a specific application server setting, I go through everything in theory.

If you are using another programming language, you'll have to find these details yourself, but you'll know what to look for. And even then it's probably less than 10% of the book.

Why Bash?

While Bash doesn't seem like an ideal choice at first, it's surprisingly ubiquitous. Linux packages' specification files are in Bash, version managers like chruby and pyenv are in Bash, Dockerfiles and their entrypoints are practically Bash.

Above all, I chose Bash to show everything without deep abstractions, so you know what's going on every step of the way.

Buy now
Book with code for $65 + local tax
500+
pages
49x
five-star reviews
1440+
copies sold
Coding cat