Nextcloud (a fork of OwnCloud, led by original developer Frank Karlitschek) is a suite of client-server software for creating and using file hosting services. It is functionally similar to Dropbox, although Nextcloud is free and open-source, allowing anyone to install and operate it on a private server.
- https://en.wikipedia.org/wiki/Nextcloud
I had a pop at this today and I just get the following error:
Error while trying to create admin user: Failed to connect to the database:
An exception occured in driver: SQLSTATE[HY000] [1130]
Host '172.16.12.12' is not allowed to connect to this MariaDB server
I followed the instructions to the letter, updated the Traefik hostname and deployed it. I get taken to a page to finalise setup where most of the fields are already filled in. I’m just asked to provide the admin password and the database password. Here is a pic: Imgur: The magic of the Internet
Any ideas?
EDIT: Yes, I made sure to use the same passwords as I set up in the env file
OK, I think what we’re seeing here might be an interaction between the env variables used for the database backup container, and the built-in env variables mysql/mariadb uses.
[root@ds1 nextcloud]# cat nextcloud-dbtest.env
DB_TYPE=mysql
DB_NAME=nextcloud
DB_USER=nextcloud
DB_PASSWORD=nextcloud
DB_HOST=db
# For mysql
MYSQL_ROOT_PASSWORD=batman
MYSQL_DATABASE=nextcloud
MYSQL_USER=nextcloud
MYSQL_PASSWORD=nextcloud
Can you try stripping out the last 5 lines of the env file per the recipe (starting with # For database backup), and see whether this works? You may need to delete the contents of /var/data/runtime/nextcloud/db/ to force MariaDB to recreate them.
@funkypenguin I have a question, might be a silly one at that. But how are you running this? I am using ESXI VMs and I am trying to decipher how much of this and what parts are applicable to me. What I want to ultimately do is run nextcloud stack and home assistant stack over SSL. Any help would be much appreciated, thanks.
Personally, my stack runs Atomic VMs under OpenStack, but that’s just my personal situation. You could do the same under ESXi. I’d suggest you start with just one VM (you can still have a swarm with a single “manager” host), setup NextCloud and HA stacks with traefik per the cookbook.
@funkypenguin thanks for the reply, I have it running now. I used one VM with nextcloud and home assistant with traefik. I also didn’t deply a swarm. I would love to see your setup and try to immulate on my lab to see which runs better. I guess I would most likely have to have openstack integrate with my ESXi host then config 3 atomic vms in swarm.
Great guide thanks! This went mostly flawlessly for me, with the additional correction to the solr file permissions mentioned by @nick. Thanks Nick!
FYI The Nextant plugin is depreciated and folks are being directed to using Full Text Search ready for Nextcloud 14’s release. I’ll look at integrating that soon.
@funkypenguin Thanks so much for this brother, it works like a charm in my swarm. minor db backup issues with permissions and nextant since it’s no longer supported and the nextcloud image was already updated to 14. Waiting patiently for the updated recipe (too lazy to update it myself for this as I’m not using it too much )
If you join the discord in http://chat.funkypenguin.co.nz, you’ll find there’s some other geeks using later versions of NextCloud, and a recipe update in the works
The command mysqldump -h db --all-databases is breaking shares which are shared from folders/files located on external storage connected via SMB.
Presumably need to put nextcloud in maintenance mode before performing dump.
For reference: Backup — Nextcloud latest Administration Manual latest documentation
The docs don’t explicitly mention switching to maintenance mode to make a database dump, but I do wonder whether --single-transaction might produce a better result… could you give it a try and confirm? (smb-mounted shares are a rarity here in Penguin HQ)…