Pulumi Code and Ansible Playbook for Nextcloud deployment (bare-metal + minimal Docker) β€” v3.0 released

Nextcloud AIO BIB β€” All-in-One But-in-Big

Ansible Playbook for Nextcloud deployment + Pulumi-based cloud provisioning

Hey everyone :waving_hand:

I’d like to announce the release of v3.0 of my Ansible playbook for deploying Nextcloud β€” primarily on bare metal, without the all-in-one Docker approach.

Repository: GitHub - ReinerNippes/nextcloud: Ansible playbook to install nextcloud, php, nginx or apache, mariadb or postgres, redis-server, onlyoffice or collabora office Β· GitHub

What is this?

An Ansible playbook (with optional Pulumi-based cloud provisioning) that installs a full Nextcloud stack directly on bare metal or VMs. The core components β€” Nextcloud, PHP, database, Redis, webserver β€” all run natively on the host. Some companion services (Nextcloud Office/Collabora, OnlyOffice, Talk Recording) run in containers, and more may follow where it makes sense.

The playbook sets up:

  • Nextcloud (latest)

  • nginx or Apache

  • PHP (current recommended version)

  • PostgreSQL or MariaDB

  • Redis (or Valkey on RHEL-based systems)

  • Let’s Encrypt via acme.sh (or self-signed certs)

  • Nextcloud Talk with High Performance Backend (HPB)

  • Nextcloud Office (Collabora) :spouting_whale:

  • OnlyOffice :spouting_whale:

  • Talk Recording :spouting_whale:

  • Fulltextsearch with Elasticsearch

  • Notify Push

  • ExApps (HaPR Daemon) :spouting_whale:

  • Restic Backup

:spouting_whale: = runs in a container

Ready to log in in less than 20 minutes.

Why this approach?

There are great fully containerized solutions out there (Nextcloud AIO, etc.), but some of us prefer or need the core stack running natively β€” for performance, compliance, full control, or because that’s how our infrastructure works. Where upstream only provides container images (Office suites, recording), this playbook uses Docker for those specific services.

Back after 6 years

Some of you may remember the original version of this playbook. After a 6-year pause, I’ve completely overhauled it and brought everything up to current standards:

  • Support for Ubuntu 24.04, Debian 12/13, CentOS 10, AlmaLinux 10, RockyLinux 10

  • Modern PHP, PostgreSQL, and Nextcloud versions

  • Reworked roles for Talk, OnlyOffice, Nextcloud Office, Fulltextsearch, and more

  • Added Pulumi-based cloud provisioning for Hetzner and Scaleway (infrastructure-as-code)

  • Multi-server support (dedicated coturn, signaling, OnlyOffice servers)

  • Performance tuning playbook included

What’s next

I’m actively working on adding:

  • :black_square_button: Whiteboard integration

  • :black_square_button: CrowdSec for intrusion prevention

  • :black_square_button: S3 primary storage support

  • :black_square_button: SMTP relay server setup

  • :black_square_button: Additional cloud providers (AWS, DigitalOcean, …)

Feature requests are very welcome! Open an issue on GitHub or reply here.

Documentation

The repository includes detailed documentation for each component:

GitHub: GitHub - ReinerNippes/nextcloud: Ansible playbook to install nextcloud, php, nginx or apache, mariadb or postgres, redis-server, onlyoffice or collabora office Β· GitHub


Happy Self-Hosting! :rocket:

1 Like