🛡️🧙‍♂️ Deploying Nextcloud: My Ansible Quest for Ultimate Automation ⚔️☁️

Roll out a complete Nextcloud – web server, database, certificate, hardening – with a single command? My quest for automation, with every dragon along the way.

Comic: the man as a knight with shield and sword stands before a castle made of clouds, a cable dragon sleeps

🌐 Also available in: Deutsch · Français · Español · Italiano · Português · Nederlands · Polski

In short: My quest for ultimate automation: rolling out Nextcloud (opens in a new tab) entirely with Ansible (opens in a new tab), including web server, database, Let’s Encrypt certificate and security features. The post briefly explains what Ansible is, presents the stack and celebrates the first milestone – it actually works. It is outdated by now and waiting for a revision.

⚠️ Heads-up, fellow human (or bot):

This post is currently outdated and due for a proper rewrite.
Some parts may no longer be accurate, complete, or aligned with the latest tech realities.
A fully updated and more detailed version is on the way soon™.

TL;DR: Read at your own nerdy risk — no warranties, no guarantees, just vibes. 🤓

Table of Contents

🤖 So, What Is This “Ansible” Magic?

Ansible is basically the spellbook every modern sysadmin dreams of.

It’s an open-source automation engine that lets you write playbooks—YAML files describing exactly how your servers should behave. Then you just cast your playbook and, boom, everything is installed, configured, and ready.

No more copy-pasting endless shell commands, no more “Wait, did I run that on production?” nightmares.

Automate all the things! ✨

📜 The Fellowship of the Nextcloud Deployment

My personal journey with Ansible began as a solo campaign. Then, like in all good quests, a local club sent out a call for help: “Can you set up a Nextcloud server for us?”

Obviously, this could only mean one thing: time to create a reusable Ansible role!

Why do it manually when you can go full Infrastructure as Code and impress your friends with your automation wizardry?

🧩 Behold, the Stack of Legend

The Ansible role conjures the following components from the depths of the internet:

  • 🕸️ Apache – Because the web won’t serve itself
  • ⚡ PHP-FPM – Gotta go fast (and secure)!
  • 🔐 Let’s Encrypt Certificate – Free TLS, no excuses!
  • 🐬 MariaDB – For all your data-hoarding needs
  • 🛡️ Security Features – Like a moat, but less medieval

100% less yak shaving, 100% more automation!

🏆 Milestone Unlocked: It Actually Works!

Good news: I’ve already hit a major milestone (see screenshot above, or use your imagination 🤓).

The playbook works, Nextcloud spins up, and I can finally drink my coffee while Ansible does the heavy lifting.

Achievement unlocked: Automated Nextcloud Deployment

VS Code with the Ansible role for the Nextcloud deployment

🎯 Conclusion

The first big milestone is reached: Nextcloud can be set up with one Ansible run instead of doing every step by hand – less yak shaving, more automation. The road to ultimate automation is not over yet, but the foundation is in place. ⚔️

🧑‍💻 Next Steps for Brave Adventurers

Over the next few days, I’ll upload the Ansible role as a tarball here, along with some explanations—so you too can wield this power.

Whether you’re a command-line crusader or just Ansible-curious,

Freshly deployed Nextcloud login page
The photos on the login screen are blurred on purpose – the people shown deserve their privacy.


📚 Related posts:

Some text, images, videos and audio on this site are AI-assisted or AI-generated. Details