Optimized Nextcloud implementation

This commit is contained in:
2025-06-28 15:19:51 +02:00
parent b3cc070394
commit c464cc6688
5 changed files with 6 additions and 18 deletions

View File

@@ -14,3 +14,7 @@ Inside the container, install a text editor and edit the config:
```bash
apk add --no-cache nano && nano config/config.php
```
## Logs
The logs you will find here on the host: **/var/lib/docker/volumes/nextcloud_data/_data/data/nextcloud.log**

View File

@@ -1,4 +0,0 @@
# Administration
## Other Resources
- [Nextcloud Docker Example with Nginx Proxy, MariaDB, and FPM](https://github.com/nextcloud/docker/blob/master/.examples/docker-compose/with-nginx-proxy/mariadb/fpm/docker-compose.yml)

View File

@@ -0,0 +1,41 @@
## Add LDAP Users Manually for Immediate Sharing
In a default Nextcloud + LDAP setup, user accounts are only created in the internal Nextcloud database **after their first login**. This means that even if a user exists in LDAP, they **cannot receive shared files or folders** until they have logged in at least once—or are manually synchronized.
To make LDAP users available for sharing **without requiring initial login**, follow these steps:
### 1. Search for the User in LDAP
Check if the user exists in the configured LDAP directory:
```bash
docker exec -u www-data nextcloud-application php occ ldap:search <username>
```
If the user is found, proceed to the next step.
### 2. Create the User in Nextcloud from LDAP
Manually trigger a sync to register the user in the Nextcloud database:
```bash
docker exec -u www-data nextcloud-application php occ ldap:check-user --update <username>
```
**Example:**
```bash
docker exec -u www-data nextcloud-application php occ ldap:check-user --update viktoriakaffanke
```
Once executed, the user becomes fully available in the system—for sharing, group membership, and permissions—even without logging in.
### 3. Synchronize All Known Users (Optional)
To synchronize account data (display name, mail address, group memberships, etc.) for **all users** currently known to Nextcloud:
```bash
docker exec -u www-data nextcloud-application php occ user:sync-account-data
```
This step is especially useful after modifying LDAP attributes or group memberships, ensuring up-to-date data in the Nextcloud UI and permission system.