This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
services/nextcloud/README.md

104 lines
2.9 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# Nextcloud
> Nextcloud server, a safe home for all your data
>
> Nextcloud est un logiciel libre, de site d'hébergement de fichiers, et un fork
> du logiciel ownCloud. À l'origine accessible via WebDAV, n'importe quel
> navigateur web, ou des clients spécialisés, son architecture ouverte a permis
> de voir ses fonctionnalités s'étendre depuis ses origines. Fin 2018, il
> propose de nombreux services.
>
> -- <cite>[Github][github]</cite>
On peut trouver [la documentation ici][documentation] en anglais ou ici pour la [traduction française](https://doc-nextcloud-fr.indie.host/fr/) fait par [IndieHosters](https://indiehosters.net/) et [Paquerette](https://paquerette.eu/).
## Aide
Commande pour se connecter à un serveur :
```sh
. .env
docker exec --user www-data -it ${NEXTCLOUD_CONTAINER_NAME}-fpm ash
```
Pour mettre un site en maintenance :
```sh
. .env
docker exec --user www-data -it ${NEXTCLOUD_CONTAINER_NAME}-fpm php occ maintenance:mode --on
```
## Configuration
Il est possible de configurer certaines parties avec des variables d'environnement :
- Soit les variables sont spécifique à l'image Docker
- soit avec des variables du type `NC_` + clé (exemple : NC_default_phone_region=FR)
### Création d'un groupe
```
export NC_GROUP=com-en-aubrac
php occ group:add $NC_GROUP
```
### Création d'un utilisateur
```
# La variable OC_PASS est spécifique pour l'utilisation de --password-from-env
export OC_PASS=unmotdepasse!
export NC_USER=simon
export NC_NAME=Simon
export NC_MAIL=simon@example.org
export NC_QUOTA="180 GB"
php occ user:add --password-from-env --display-name=$NC_NAME --group="$NC_GROUP" $NC_USER
php occ user:setting $NC_USER settings email $NC_MAIL
```
### Quota
Pour bien comprendre les quotas dans Nextcloud : https://docs.nextcloud.com/server/latest/user_manual/en/files/quota.html
```
export NC_USER=simon
export NC_QUOTA="10 GB"
php occ user:setting $NC_USER files quota "$NC_QUOTA"
```
### imagemagick
> Le module php-imagick na aucun support SVG dans cette instance. Pour une meilleure compatibilité, il est recommandé de linstaller.
Pour résoudre ce problème il faut ajouter le paquet `imagemagick`
```
. .env
docker exec -it ${NEXTCLOUD_CONTAINER_NAME}-fpm apk add --no-cache imagemagick
```
## Application
Suppression d'application :
```
php occ app:disable dashboard
php occ app:disable photos
php occ app:disable weather_status
php occ app:disable user_status
```
## PHP-FPM: remédier à server reached pm.max_children
https://buzut.net/php-fpm-server-reached-pm-max-children/
```
docker exec -it nextcloud-fpm ash
vi /usr/local/etc/php-fpm.d/www.conf
```
[github]: https://github.com/nextcloud/server
[documentation]: https://docs.nextcloud.com/server/latest/admin_manual/contents.html
[backup]: https://docs.nextcloud.com/server/latest/admin_manual/maintenance/backup.html
[restore]: https://docs.nextcloud.com/server/latest/admin_manual/maintenance/restore.html