docker, nextcloud, raspberrypi

NextCloudPi docker for Raspberry Pi

Note: some of this information is outdated, check a newer release here

I would like to introduce my NextCloud ARM container for the Raspberry Pi.

It only weights 475 MB, and it is shares codebase with NextCloudPi, so it has the same features:

  • Raspbian 8 Jessie
  • Nextcloud 12
  • Apache 2.4.25, with HTTP2 enabled
  • PHP 7.0
  • MariaDB 10
  • Automatic redirection to HTTPS
  • ACPU PHP cache
  • PHP Zend OPcache enabled with file cache
  • HSTS
  • Cron jobs for Nextcloud
  • Sane configuration defaults
  • Secure
  • Small, only 475 MB in disk, 162 MB compressed download.

With this containerization, the user no longer requires to start from scratch in order to run NextCloud in their RPi, as opposed from flashing the NextCloudPi image. It also opens new possibilities for easy upgrading and sandboxing for extra security.

It can be run in any system other that Raspbian, as long as it supports docker.

Some of the extras will be added soon, where it makes sense.

Installation

If you haven’t yet, install docker in your Raspberry Pi.

Adjust permissions. Assuming you want to manage it with the user pi

Optionally, store containers in an external USB drive. Change the following line (adjust accordingly)

Reload changes

You can check that it worked with

Usage

The only parameter that we need is the trusted domain that we want to allow.

After a few seconds, you can access from your browser  just typing the IP or URL in the navigation bar of your browser. It will redirect you to the HTTPS site

The admin user is admin, and the default password is ownyourbits. Login to create users, change default password and other configurations.

Other than that, we could map different ports if we wanted to. Note that a volume ncdata will be created where configuration and data will persist.

For example, you could wrap a script like this to allow your current local IP

If you ever need direct access to your storage, you can find out where your files are located.

You can in this way alter your config.php

Details

The container consists of 3 main layers, totalling 476 MB.

A benefit of docker layers is that we can sometimes just update the upper layers, or provide updates on top of the current layout.

Code

The build code is now part of the NextCloudPi repository.

You can build it yourself in a Raspbian ARM environment with.

dockerhub

Author: nachoparker

Humbly sharing things that I find useful
[ github dockerhub ]

11 Comments on “NextCloudPi docker for Raspberry Pi

  1. Im gonna start from a fresh install again. should i download this? or should i install first the nextcloud 11 from previous post?

  2. I don’t see container populating mounted directory from host on rpi 2. What are the user permissions required for host directory so that it can be use by running container ?

  3. I hat it to ask for eta but do you consider to update your docker version to the newer changes that you have in the Image version? (Webinterface / Extras / Stretch)
    I use this version because I need it in background of my already configured PI with GUI, pilight, Kodi and and …

    1. Honestly, I can’t tell for sure. Maybe a month or so. I have to update miniraspbian, which is the base image for the docker container. I have a lot of work also with the regular version already because of things that I had to adjust after moving to Stretch.

      In the end, my final goal is to focus more on the docker container than the SD card, and that is why I rushed the web interface, but it is a lot to handle for a single person. Help is welcome

      1. thank you for your answer,

        I am a newbie with linux… took me some time to get Jessie and and where it is…
        With your very user friendly guides here it was easy to install docker and NC *thumbs up*

        would be nice to see someone with sufficient knowledge helping you

Leave a Reply

Your email address will not be published. Required fields are marked *