Changes

From SME Server
Jump to navigationJump to search
12,062 bytes added ,  17:10, 30 June 2022
Created page with "{{Languages}} <!-- here we define the contrib name variable --> <!-- we get the page title, remove suffix for translated version; if needed you can define there with the value..."
{{Languages}}
<!-- here we define the contrib name variable -->
<!-- we get the page title, remove suffix for translated version; if needed you can define there with the value you want-->
{{#vardefine:contribname| {{lc: {{#titleparts: {{BASEPAGENAME}} |1}} }} }}
{{#vardefine:smecontribname| smeserver-{{lc: {{#titleparts: {{BASEPAGENAME}} |1}} }} }}
<!-- we define the language -->
{{#vardefine:lang| {{lc: {{#titleparts: {{PAGENAME}} | | -1}} }} |en }}
{{Infobox contribs
|name={{#var:contribname}}
|image=Nextcloud_Logo.svg
|description_image= {{#var:contribname}} logo
|maintainer= Unnilennium
|licence= AGPLv3
|url= https://nextcloud.com
|category= Cloud
|tags=cloud,files,dropbox,seafile,pydio,ajaxplorer,owncloud
}}
===Mainteneur===
<!-- here you need to file your username and name -->
[[User:Unnilennium|Jean-Philippe Pialasse]]

=== Version ===
<!-- keep this first element as is, you can add some if needed -->
{{#smeversion: {{#var:smecontribname}} }}
{{#smeversion: {{#var:contribname}} }}

=== Description ===
Nextcloud est un ensemble de logiciels client-serveur permettant de créer et d'utiliser des services d'hébergement de fichiers. Il est fonctionnellement similaire à Dropbox, bien que Nextcloud soit gratuit et « open-source », permettant à quiconque de l'installer et de l'utiliser sur un serveur privé.

Selon l'adage de SME Server « Keep It Simple » (Rester simple), tous vos baies d'information et dossiers personnels seront accessibles via l'interface « nextcloud » à l'aide de l'application « fichiers externes ». Vous aurez également votre dossier Nextcloud d'utilisateur principal enregistré sous /home/e-smith/files/owncloud/data qui se trouve dans la zone sauvegardée par défaut. Ainsi, vous pouvez désormais profiter à la fois de votre propre référentiel cloud et de l'accès aux mêmes fichiers sur votre partage Samba !

Comment ajouter mes utilisateurs SME ? Ils sont déjà là ! Dites leur simplement de se connecter à https://mon-domaine/nextcloud. Vous pouvez également ajouter des utilisateurs externes ou leur permettre de s'inscrire auprès d'une application nextcloud.

Quels sont les administrateurs ? Par défaut, vous avez un utilisateur nextcloudadmin et l'utilisateur administrateur habituel de SME. Le premier utilise le mot de passe que vous pouvez voir avec la commande « config getprop nextcloud AdminPassword », et le second, eh bien, utilisez simplement votre mot de passe administrateur habituel. Ensuite, vous pouvez gérer les applications, les référentiels de fichiers externes et l'appartenance au groupe d'administrateurs.

=== Installation ===

<tabs container>
<tab name="For sme10">
yum install {{#var:smecontribname}} --enablerepo=smecontribs

Vous pouvez avoir besoin d'un second « event » si quelquefois un répertoire de baie d'information n'était pas visible.
signal-event nextcloud-update

</tab>
<tab name="For sme9">
Vous n'avez pas besoin de suivre les pages des dépôts de [https://wiki.contribs.org/Fws fws] et de [https://wiki.contribs.org/Remi-safe remi-safe] pour installer ces 2 dépôts qui sont nécessaires. Utilisez plutôt les paquets qui les installent, suivi d'un « yum-modify event ». Puis exécutez l'installation principale.
yum install smeserver-extrarepositories-remi-safe smeserver-extrarepositories-fws smeserver-extrarepositories-epel
signal-event yum-modify
yum install {{#var:smecontribname}} --enablerepo=smecontribs,epel,fws
signal-event webapps-update
service php-fpm start
service php71-php-fpm start
service php72-php-fpm start
service php73-php-fpm start
signal-event nextcloud-update

Vous pouvez éviter les du service php-fpm* s'il est déjà installé et fonctionne avant l'installation de nextcloud.

Puis vous pouvez faire ce qui suit et vous pouvez ignorer en toute sécurité le redémarrage « signal-event post-upgrade reboot » si vous y êtes invité, sauf si vous avez également installé d'autres paquets qui en ont besoin.
config set UnsavedChanges no

ou faire
signal-event post-upgrade
signal-event reboot
puis
signal-event nextcloud-update

Si vous voulez ajouter l'administrateur de SME comme administrateur de nextcloud, faites :
OCC group:adduser admin admin
</tab>
</tabs>

=== Utiliser un domaine dédié pour se connecter à Nextcloud ===
Changer em premier lieu le contenu de la variable de la première ligne par votre domaine de nextcloud tel que défini par votre fournisseur DNS.
<syntaxhighlight lang="bash">
NEXTCLOUDDOMAIN="cloud.mon-domaine.com"
db domains set $NEXTCLOUDDOMAIN domain Description "Nextcloud" Content Primary Nameservers internet TemplatePath WebAppVirtualHost DocumentRoot /usr/share/nextcloud RequireSSL enabled letsencryptSSLcert enabled
signal-event domain-create cloud.mon-domaine.com

# Cette ligne permet au DAV de nextcloud d'être redirigé correctement :
config setprop nextcloud CloudDomain $NEXTCLOUDDOMAIN
# Cette ligne permet à collabora de reconnaître le domaine :
config setprop nextcloud VirtualHost $NEXTCLOUDDOMAIN
signal-event nextcloud-update

# Uniquement si vous utilisez un certificat Let's Encrypt :
expand-template /etc/dehydrated/domains.txt
dehydrated -c

</syntaxhighlight>

=== Configuration ===
{| class="wikitable"
!property
!default
!values
!
|-
|AdminPassword
|GENERATED
|string
|Mot de passe pour votre principal administrateur de nextcloud *
|-
|AdminUser
|nextcloudadmin
|string
|Utilisateur administrateur pincipal de votre installation *
|-
|DbName
|nextcloud
|string
|Pour mysql db
|-
|DbPassword
|GENERATED
|string
|Pour mysql db
|-
|DbUser
|nextcloud
|string
|Pour mysql db
|-
|TrustedDomains
|empty
|strings coma separated
|Ajoute un domaine ou une adresse ip qui doivent être nécessairement ajoutés à l'accès par défaut à nextcloud
|-
|CloudDomain
|empty
|domain name
|Duplication de VirtualHost, sera fusionné à VirtualHost dans une prochaine version, les 2 ne nécessitenr pas d'être configurés pour l'instant
|-
|VirtualHost
|empty
|Nom de domaine
|
|-
|access
|private
|privé, public
|
|-
|status
|enabled
|enabled,disabled
|
|-
|MaxUploadSize
|4096M
|nombre
|Si un nombre doit être converti en mégabits, sinon, utiliser le suffixe habituel : 2T pour 2 terrabits, etc...
|-
|MemoryLimit
|528M
|number
|Si un nombre doit être converti en mégabits, sinon, utiliser le suffixe habituel : 2T pour 2 terrabits, etc...
|-
|Shares
|enabled
|enabled,disabled
|Ajoute les partages samba de la contribution « shared-folders » dans les baies d'information nextcloud ainsi que dans les baies d'information normales
|-
|IncludeIbay
|empty
|strings coma separated
|Ajoute les noms des baies d'information qui ont besoin d'être incluses. S'il n'est pas vide, seul le nom indiqué ici sera accessible via nextcloud. A la priorité sur ExcludeIbay. Vous le définissez avec une chaîne aléatoire pour exclure tous les baies d'information et les partages de l'inclusion automatique.
|-
|ExcludeIbay
|Primary
|strings coma separated
|will exclude from nexcloud access any ibay via nextcloud. Default excludes Primary ibay. If you want to include Primary set it with a random string.
|-
|UseSMB
|enabled
|enabled,disabled
|allow you to set ibay access via samba share or via Local driver in nextcloud. Enabled is for samba, this allow you to access as your user and have your quota accounted. It might be a little slower, and need you to have your password loaded in the session. Local driver if disabled, will let you access only what apache user (www) has right to access as member of a group.
|}
* the SME admin user is also an admin of your nextcloud installation. You have two admin account as per default installation on SME Server.


example of setting :
config setprop nextcloud ExcludeIbay ibay1,ibay2
signal-event nextcloud-update

=== Command line ===
if you happen to need tweaking your installation, here is how to access the command line for Nextcloud on SME, we made it easier for you, just log as root and use the OCC command (using capitals), This command will execute for you what you need as the www user, using the needed version of php. Here two examples: <syntaxhighlight lang="bash">
occ maintenance:mode --off
occ maintenance:repair

</syntaxhighlight>to seek for additional command consult Nextcloud documentation : https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html

=== Upgrade ===
yum update {{#var:smecontribname}} {{#var:contribname}} --enablerepo=smecontribs

=== Uninstall ===
yum remove {{#var:smecontribname}} {{#var:contribname}}

=== Change Database ===
If you are in the situation your are unable to update your nextcloud because of database requirements, you might need to install a newer and then migrate your db.

Here a simple procedure, after having the new db working as a sclo [[Mariadb105]] for SME10 as example.<syntaxhighlight lang="bash">
occ maintenance:mode --on
mysqldump `config getprop nextcloud DbName` > nextcloud.sql
echo "CREATE DATABASE IF NOT EXISTS `config getprop nextcloud DbName` CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;"| mysql105
mysql105 `config getprop nextcloud DbName`< nextcloud.sql
echo "CREATE USER IF NOT EXISTS `config getprop nextcloud DbUser`@localhost IDENTIFIED BY '`config getprop nextcloud DbPassword`';"| mysql105
echo "GRANT ALL PRIVILEGES ON `config getprop nextcloud DbName`.* TO `config getprop nextcloud DbUser`@localhost; FLUSH PRIVILEGES;" | mysql105
occ config:system:set dbhost --value localhost:/var/lib/mysql/mariadb105.sock --type string
occ maintenance:mode --off
</syntaxhighlight>

After checking that all is working you can then delete yourself the old db from the previous mysql server, or keep it as a backup for a while.
If it fails and just want to go back to previous state:
occ maintenance --on
occ config:system:set host --value localhost --type string
occ maintenance --off

=== Known issues ===

==== User cannot see shares/files ====

After a new install the admin user could see shares but not a user.

We had a single ibay and it was set:

Group Everyone
Write group
Read everyone

We created a new group called localusers and added the admin and single user.

We then set the ibay:

Group localusers
Write group
Read group

This appeared to fix the issue and the user could now see the files.

==== NC 20-21 : open_basedir restriction in effect. File(/templates/) is not within the allowed path ====
this is a bug in NC. It has been fixed in NC 22 and not backported to NC20. This is just log noise. You can ignore it while waiting to update
see https://help.nextcloud.com/t/error-file-templates-is-not-within-the-allowed-path-s-after-update-from-20-xx-to-21-0-3/119843

===Reset Database===

For reference, whilst looking at resetting file caches I found this.

It is probably extremely dangerous but wanted to make a note.

https://github.com/nextcloud/server/issues/8113#issuecomment-565876798

=== Bugs ===
Please raise bugs under the SME-Contribs section in [http://bugs.contribs.org/enter_bug.cgi bugzilla]
and select the {{#var:smecontribname}} component or use {{BugzillaFileBug|product=SME%20Contribs|component={{#var:smecontribname}}|title=this link}}

Below is an overview of the current issues for this contrib:{{#bugzilla:columns=id,product,version,status,summary|sort=id|order=desc|component={{#var:smecontribname}} |noresultsmessage=No open bugs found.}}

===Changelog===
Only released version in smecontrib are listed here.

{{#smechangelog: {{#var:smecontribname}} }}


<!-- list of category you want to see this page in -->
[[Category: Contrib]]
<!-- Please keep there the template revision number as is -->

===References===
# https://docs.nextcloud.com/server/latest/admin_manual/configuration_server/occ_command.html
# https://help.nextcloud.com/t/migration-from-mysql-to-mariadb/6816/3
# https://help.nextcloud.com/t/changing-mariadb-socket-when-hosting-multiple-db-ubuntu/68294
# https://markus-blog.de/index.php/2019/10/21/how-to-migrate-nextcloud-17-database-backend-from-mysql-to-postgresql/
3,054

edits

Navigation menu