Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding documentation to change nextcloud data path #670

Open
wants to merge 6 commits into
base: testing
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 45 additions & 1 deletion doc/ADMIN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,55 @@

You can run Nextcloud commands from the command line using:

```
```bash
sudo -u __APP__ php__PHPVERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ ...
```

Alternatively, you may open a 'Nextcloud shell' with `sudo yunohost app shell __APP__`, then run `php occ ...`

### Change data folder location
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Related to https://github.com/YunoHost/doc/blob/master/pages/04.applications/10.docs/nextcloud/app_nextcloud.md#ii-migrate-nextcloud-data-to-a-larger-partition which is actually supposed to be removed and/or migrated to the app's ADMIN.md as a consequence of YunoHost/doc#2417

This old piece of doc actually seems to recommend a savage cp + edition of the config.php + the data dir setting

The symlink solution seems better but I don't remember why exactly but this ultimately also causes issues later on (maybe with backups if i remember correctly)

There is also https://yunohost.org/en/administer/tutorials/external_storage which to me sounds like the most reliable solution and uses bind mounts

Ideally we should harmonize all this because this is quite a reccuring question/issue and currently there's no way to move apps data in a simple yet long-term robust way


It may be worth changing the default location of the Nextcloud folder to store data on a second hard disk.

1. Find the current Nextcloud data path

```bash
yunohost app setting __APP__ data_dir
```

This command should display :

```bash
__DATA_DIR__
```

1. Move Nextcloud data to the new location:
For the example, we'll use the `/media/storage/nextcloud` folder.

```bash
mv __DATA_DIR__ /media/stockage/nextcloud
```

1. Change folder owner :

```bash
chown nextcloud:nextcloud /media/storage/nextcloud
```

1. Create a symbolic link between the default folder and the new one:

```bash
ln -s /media/stockage/nextcloud __DATA_DIR__
```

1. Test Nextcloud files:

```bash
sudo -u nextcloud php8.2 --define apc.enable_cli=1 /var/www/nextcloud/occ files:scan --all
```

You're done! Your data is now stored in the folder `/media/storage/nextcloud`.

Alexis-IMBERT marked this conversation as resolved.
Show resolved Hide resolved
### ONLYOFFICE integration

ONLYOFFICE is an online rich text document editor which can be integrated in Nextcloud
Expand All @@ -19,6 +62,7 @@ For better performance and ARM64 support (Raspberry Pi, OLinuXino...), install t
#### Alternative: With Nextcloud App (no ARM support, lower performance)

Nextcloud features a direct integration of ONLYOFFICE through a Nextcloud app.

- Install *Community Document Server* application in your Nextcloud. That's the part that runs ONLYOFFICE server.
- Install *ONLYOFFICE* application. That's the client part that will connect to an ONLYOFFICE server.
- Then in Settings -> ONLYOFFICE (`https://__DOMAIN____PATH__/settings/admin/onlyoffice`), if you want to configure which file formats should be opened by ONLYOFFICE.
44 changes: 44 additions & 0 deletions doc/ADMIN_fr.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,49 @@ sudo -u __APP__ php__PHPVERSION__ --define apc.enable_cli=1 __INSTALL_DIR__/occ

Ou bien, vous pouvez ouvrir un "shell Nextcloud" avec `sudo yunohost app shell __APP__`, puis lancer `php occ ...`

### Changer l'emplacement du dossier data

Il peut être intéressant de changer l'emplacement par défaut du dossier Nextcloud pour stocker les données sur un second disque dur.

1. Trouver le chemin actuel des data Nextcloud

```bash
yunohost app setting __APP__ data_dir
```

Cette commande devrait afficher :

```bash
__DATA_DIR__
```

1. Déplacer les données Nextcloud au nouvel emplacement :
Pour l'exemple nous prendrons le dossier `/media/stockage/nextcloud`

```bash
mv __DATA_DIR__ /media/stockage/nextcloud
```

1. Modifier le propriétaire du dossier :

```bash
chown nextcloud:nextcloud /media/stockage/nextcloud
```

1. Créer un lien symbolique entre le dossier par défaut et le nouveau dossier :

```bash
ln -s /media/stockage/nextcloud __DATA_DIR__
```

1. Tester les fichiers Nextcloud :

```bash
sudo -u nextcloud php8.2 --define apc.enable_cli=1 /var/www/nextcloud/occ files:scan --all
```

C'est fini ! Vos données sont maintenant stocké dans le dossier `/media/stockage/nextcloud`

Alexis-IMBERT marked this conversation as resolved.
Show resolved Hide resolved
### Intégration d'ONLYOFFICE

ONLYOFFICE est un éditeur de texte enrichi en ligne qui peut s'intégrer dans Nextcloud
Expand All @@ -19,6 +62,7 @@ Pour de meilleures performances et le support de ARM64 (Raspberry Pi, OLinuXino.
#### Alternative: avec l'application Nextcloud (pas de support ARM, performances limitées)

Nextcloud inclut une intégration directe via une application Nextcloud.

- Installez l'application *Community Document Server* dans votre Nextcloud. C'est la partie qui fait tourner un serveur ONLYOFFICE.
- Installez l'application *ONLYOFFICE*. C'est la partie cliente qui va se connecter au serveur ONLYOFFICE.
- Ensuite dans les Paramètres -> ONLYOFFICE (`https://__DOMAIN____PATH__/settings/admin/onlyoffice`), si vous voulez configurer quels formats de fichier s'ouvrent avec ONLYOFFICE.