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 Normal View History

2020-09-03 11:42:35 +02:00
# 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>
2021-10-23 00:45:25 +02:00
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/).
2020-09-03 11:42:35 +02:00
## Aide
Commande pour se connecter à un serveur :
2021-10-23 00:45:25 +02:00
```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
```
2021-03-24 22:20:37 +01:00
## 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
2021-03-24 22:20:37 +01:00
```
export NC_GROUP=com-en-aubrac
php occ group:add $NC_GROUP
```
### Création d'un utilisateur
2021-03-24 22:20:37 +01:00
```
# 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
2021-03-24 22:20:37 +01:00
```
### Quota
Pour bien comprendre les quotas dans Nextcloud : https://docs.nextcloud.com/server/latest/user_manual/en/files/quota.html
2021-03-24 22:20:37 +01:00
```
export NC_USER=simon
export NC_QUOTA="10 GB"
php occ user:setting $NC_USER files quota "$NC_QUOTA"
2021-03-24 22:20:37 +01:00
```
### 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`
2021-03-24 22:20:37 +01:00
```
. .env
docker exec -it ${NEXTCLOUD_CONTAINER_NAME}-fpm apk add --no-cache imagemagick
2021-03-24 22:20:37 +01:00
```
## 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
```
2020-09-03 11:42:35 +02:00
[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