skip to Main Content

Trying to install nextcloud on rpi4.

I’m getting below error when trying to install nextcloud on rpi4 running buster

Initializing nextcloud 23.0.4.1 ...,
touch: setting times of '/var/www/html/nextcloud-init-sync.lock': Operation not permitted,
Initializing nextcloud 23.0.4.1 ...,
Another process is initializing Nextcloud. Waiting 10 seconds...,

My docker-compose looks like this

version: '2'
services:
  db:
    image: yobasystems/alpine-mariadb:latest
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW
    restart: always
    volumes:
      - /nextcloud:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=YOURROOTPASSWORD
      - MYSQL_PASSWORD=YOURPASSWORD
      - MYSQL_DATABASE=nextcloud
      - MYSQL_USER=nextcloud
  app:
    image: nextcloud
    ports:
      - 8181:80
    links:
      - db
    volumes:
      - /nextcloud:/var/www/html
    restart: always

Please help!

3

Answers


  1. I had the same issue and I could fixed it by mounting /var/www/html to a separate nextcloud volume. On the same level like service add this:

    volumes:
      nextcloud:
    

    in your app volumes set the volume like this:

    - nextcloud:/var/www/html
    
    Login or Signup to reply.
  2. Remove /var/www/html/nextcloud-init-sync.lock to unlock the installation process

    Login or Signup to reply.
  3. Recently I had the same problem with nextcloud 25.0.3.2 on Raspberry Pi 4 and did some research.

    This causes the problem:

    Unfortunately Raspbian uses some very old
    packages. There is nothing we can fix in our image. 😕

    Source: https://github.com/nextcloud/docker/issues/1589#issuecomment-923371168

    There is a workaround, by giving extended privileges to the nextcloud container:

    I did another investigation and deleted the lock file many times.
    After some time I found out that if I run the nextcloud container as
    priviliged, the error touch: setting times of
    ‘/var/www/html/nextcloud-init-sync.lock’: Operation not permitted does
    not happen again and I could upgrade to 23.0.4.

    Source: https://github.com/nextcloud/docker/issues/1742#issuecomment-1133837814

    But beware:

    The –privileged flag gives all capabilities to the container. When
    the operator executes docker run –privileged, Docker will enable
    access to all devices on the host as well as set some configuration in
    AppArmor or SELinux to allow the container nearly all the same access
    to the host as processes running outside containers on the host.
    Additional information about running with –privileged is available on
    the Docker Blog.

    Source: https://docs.docker.com/engine/reference/run/


    tl;dr: Give extended privileges to nextcloud container

    ...
          app:
            image: nextcloud
            privileged: true
    
    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search