DietPi | Lightweight Debian image with automated, fully featured Nextcloud installation


#1

As I am contributing now for quite a while to the DietPi project, with a special eye on it’s automated Nextcloud installation, I thought it’s time to share this with you. Of course it’s fully FOSS, using GPLv2 license :slightly_smiling_face:.

As can be derived from the name, it is in the first place meant to be a SBC image/distribution, with special focus on low RAM/resource usage while keeping all the flexibility of the Raspbian/Debian repositories. On top of that it offers whiptail based terminal dialogues to easily configure the system and install 3rd party applications. As many of those applications, like Nextcloud, need manual installation and setup steps, we automate and optimize those as far as we can.

DietPi has grown vastly and we now offer x86_64 and VM images, as well as an installation script, that turns any running Raspbian or Debian based system into DietPi.

But before I am repeating the whole story here, better check out: https://dietpi.com/


Some words about our automated Nextcloud installation:

  • Automated webstack installation: webserver based on user choice, MariaDB and PHP
  • Automated configuration of those:
    • Apache and Nginx configuration based on Nextcloud admin manual
    • MariaDB 4-byte support
    • Required PHP module installation and configuration: apc.enable_cli=1, OPcache
  • occ command based Nextcloud installation, thus first web access directly allows login
    • Admin user name, password and data location can be chosen via pre-config file, data folder by default is located outside of webroot.
  • APCu memory caching
  • Redis for transactional file locking
  • System cron jobs
  • Pretty URLs (Apache and Nginx)
  • ncc as shortcut for sudo -u www-data php /var/www/nextcloud/occ
  • Automated maintenance mode on/off on system maintenance jobs (updates, installations etc.)

As we want to allow most flexibility and allow installation of various (web) applications in parallel, Nextcloud will be available within your.domain.org/nextcloud and by default HTTPS is not enabled. But it can be easily enabled via automated CertBot + LetsEncrypt installation and setup.


As with NextCloudPi (ah it’s NextCloudPlus now :smile:) there is already a fantastic ready to run Nextcloud image, I want to do a quick comparison:

  • NextcloudPlus offers a Raspbian/Debian based ready-to-run Nextcloud image. It is highly optimized for Nextcloud, offers easy and automated HTTPS and a beatiful web interface for system and Nextcloud related configuration.

  • DietPi in comparison does not include Nextcloud by default, although it is possible to have it installed on 1st boot via pre-flash config file. But it offers a resource usage optimized very small base image with a large list of ~150 optional automated software installations, including:

    • Desktops: LXDE, Mate, …
    • Multimedia: Kodi, AirSonic, MPD, Koel, …
    • File servers: samba, FTP, NFS, …
    • Network: Pi-hole, hostapd, …
    • System monitors, phpBB, Wordpress, etc…, just see: https://dietpi.com/phpbb/viewtopic.php?f=8&t=5
  • Thus if you need ready-to-use Nextcloud, nothing more, NextcloudPlus is surely a good choice. It is widely used and well maintained within the forum here and not to forget official part of the Nextcloud github repo: https://github.com/nextcloud/nextcloudpi

  • If you are a performance enthusiast or simply need to reduce RAM usage to a minimum, you need some other applications as well, running nicely and without much manual setup steps, or you want to try out, which software solution for a certain task suits you (including webserver to run Nextcloud), give DietPi a shot.

Of course we highly appreciate every feedback, requests and contribution, not only about our Nextcloud implementation :wink:.
Visit our github repo https://github.com/Fourdee/DietPi
or forum: https://dietpi.com/phpbb/viewforum.php?f=5


#2

Cool!

Question:

Why not further integrate NextcloudPi with DietPi? The NextcloudPi curl script installation or docker image could be easily modified to give you best of both worlds. My .02

Edit: submitted this suggestion to the DietPi github page.


#3

@just
:+1: Check out my answer on your github issue: https://github.com/Fourdee/DietPi/issues/1778#issuecomment-389498012


#4

Hi @MichaIng

Thanks for your efforts and for sharing this. We’ll keep @just’s suggestion in the github thread