Nextcloud All In One

Currently reading
Nextcloud All In One

4
0
NAS
DS918+
Operating system
  1. Linux
Mobile operating system
  1. Android
If you don't explain specifically what you did, and the errors that resulted, how can we help?
 
I start with NAS and made folders like this:
/volume1/docker/nextcloud/data
/volume1/docker/nextcloud/config

Then I login to Portainer version 2.14.2

-----------------Container try-----------
In Portainer I go to Containers. Press +Add container.

Name: nextcloud
Image: nextcloud/all-in-one
Publish all exposed network ports to random host ports: YES

Volumes:
Container: /mnt/docker-aio-config (Bimd)
Host: /volume1/docker/nextcloud/config

Then press:Deploy host
ERROR: Cant find image
------------------------------------------------
-------------------Stack try-----------------
Try Stack.
+Add stack
Name: nextcloud

in webeditor:

docker run -it ^
--name nextcloud ^
--restart always ^
-p 86:80 ^
-p 8686:8080 ^
-p 8443:8443 ^
-e NEXTCLOUD_DATADIR="/volume1/docker/nextcloud/data"
--volume nextcloud_aio_mastercontainer:/mnt/docker-aio-config ^
--volume //var/run/docker.sock:/var/run/docker.sock:ro ^
nextcloud/all-in-one:latest
restart:always
environment:- PUID=1026
- PGID=100
- TZ=Europe/Stockholm

Press Deploy Stack
ERROR: Deployment error
failed to create env file: failed to create network env file:
failed to extract network name: invalid stack file: Top-level object must be a mapping
-----------------------------------------
 
Try and download the image inside Portainer 1st (the image name is correct btw) to eliminate the 1st error (can't find image).

But you cant execute the stack using a docker run command. You need a docker compose for this image/contianer. Stack only supports compose.

If you want you can run this docker run via command line (SSH as root) on your nas and it should work, but via Portainer (stack), you will need a compose file/structure.
 
I've not used the new All in One method. However, have you tried the following for Docker Compose as I cannot see that you have setup a database for nextcloud (The bits in bold need to be changed to your own password etc):

version: '3'

services:

mariadb:
container_name: mariadbnextcloud
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
restart: always
volumes:
- /volume1/docker/nextcloudatabase:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_PASSWORD=mysqlpassword
- MYSQL_DATABASE=nextcloudatabasename
- MYSQL_USER=nextclouduser

nextcloud:
container_name: nextcloud
ports:
- 8082:80
depends_on:
- mariadb
environment:
- PUID=1026
- PGID=100
- TZ=Europe/Stockholm
volumes:
- /volume1/docker/nextcloud/html:/var/www/html
- /volume1/docker/nextcloud/custom_apps:/var/www/html/custom_apps
- /volume1/docker/nextcloud/config:/var/www/html/config
- /volume1/docker/nextcloud/data:/var/www/html/data
- /volume1/docker/nextcloud/themes:/var/www/html/themes/
image: nextcloud
restart: always

volumes:
mariadb: # nextcloud
 
Try and download the image inside Portainer 1st (the image name is correct btw) to eliminate the 1st error (can't find image).

But you cant execute the stack using a docker run command. You need a docker compose for this image/contianer. Stack only supports compose.

If you want you can run this docker run via command line (SSH as root) on your nas and it should work, but via Portainer (stack), you will need a compose file/structure.
I go to image and put nextcloud/all-in-one:latest
Pull the image give me this error:
Failure
Head "https://registry-1.docker.io/v2/nextcloud/all-in-one/manifests/latest": unauthorized: incorrect username or password
 
I've not used the new All in One method. However, have you tried the following for Docker Compose as I cannot see that you have setup a database for nextcloud (The bits in bold need to be changed to your own password etc):

version: '3'

services:

mariadb:
container_name: mariadbnextcloud
image: mariadb
command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
restart: always
volumes:
- /volume1/docker/nextcloudatabase:/var/lib/mysql
environment:
- MYSQL_ROOT_PASSWORD=rootpassword
- MYSQL_PASSWORD=mysqlpassword
- MYSQL_DATABASE=nextcloudatabasename
- MYSQL_USER=nextclouduser

nextcloud:
container_name: nextcloud
ports:
- 8082:80
depends_on:
- mariadb
environment:
- PUID=1026
- PGID=100
- TZ=Europe/Stockholm
volumes:
- /volume1/docker/nextcloud/html:/var/www/html
- /volume1/docker/nextcloud/custom_apps:/var/www/html/custom_apps
- /volume1/docker/nextcloud/config:/var/www/html/config
- /volume1/docker/nextcloud/data:/var/www/html/data
- /volume1/docker/nextcloud/themes:/var/www/html/themes/
image: nextcloud
restart: always

volumes:
mariadb: # nextcloud
ERROR: There is an error in the yaml syntax: YAMLSyntaxError: A collection cannot be both a mapping and a sequence
 
Code:
version: '3'

services:
 
  mariadb:
    container_name: mariadbnextcloud
    image: mariadb
    command: --transaction-isolation=READ-COMMITTED --binlog-format=ROW --innodb-read-only-compressed=OFF
    restart: always
    volumes:
      - /volume1/docker/nextcloudatabase:/var/lib/mysql
    environment:
      - MYSQL_ROOT_PASSWORD=rootpassword
      - MYSQL_PASSWORD=mysqlpassword
      - MYSQL_DATABASE=nextcloudatabasename
      - MYSQL_USER=nextclouduser

  nextcloud:
    container_name: nextcloud
    ports:
      - 8082:80
    depends_on:
      - mariadb
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Europe/Stockholm
    volumes:
      - /volume1/docker/nextcloud/html:/var/www/html
      - /volume1/docker/nextcloud/custom_apps:/var/www/html/custom_apps
      - /volume1/docker/nextcloud/config:/var/www/html/config
      - /volume1/docker/nextcloud/data:/var/www/html/data
      - /volume1/docker/nextcloud/themes:/var/www/html/themes/
    image: nextcloud
    restart: always

volumes:
  mariadb: # nextcloud

Those errors are due to formatting. I should have pasted the docker as a code entry and not a tect on this forum.
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Similar threads

  • Question
It would have made sense that it doesn't work if the container would have been in a macvlan network and...
Replies
8
Views
3,515
@DeltaGolf Here’s my approach: Docker - NextCloud on Synology NAS using Docker compose (with Portainer)
Replies
18
Views
3,712
  • Question
That is a MariaDB issue, I had it a while ago, it's due to permission changes they made.. Sorry I can't...
Replies
26
Views
5,879
A while ago I was tinkering around and created a simple templating for NextCloud. If you are not alergic...
Replies
0
Views
1,042
Yes, I had a glance at that earlier. It says "One of the main reasons RP is useful is the fact that it...
Replies
7
Views
2,011

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Back
Top