Nextcloud Server Administration Manual Release 13 The Nextcloud developers Mar 28, 2019 CONTENTS 1 Introduction 1 1.1 Videosandblogs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.2 Targetaudience . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 Releasenotes 3 2.1 ChangesinNextcloud13. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.2 Commonquestions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2.3 Themingchanges . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 Installation 5 3.1 Systemrequirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 3.2 Deploymentrecommendations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.3 InstallationonLinux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3.4 Installationwizard . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.5 Installingfromcommandline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.6 Installingandmanagingapps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.7 Supportedapps . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.8 InstallingPHP5.6onRHEL6/7andCentOS6/7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.9 InstallingPHP7.0onRHEL7andCentOS7 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 3.10 SELinuxconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 3.11 Nginxconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 4 Serverconfiguration 41 4.1 Warningsonadminpage . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 4.2 Usingtheocccommand . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.3 Configuringtheactivityapp . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.4 Configuringmemorycaching . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.5 Definingbackgroundjobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 70 4.6 ConfigurationParameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 72 4.7 Emailconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 4.8 Linkingexternalsites . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103 4.9 Languageconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 4.10 Loggingconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 107 4.11 Hardeningandsecurityguidance . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 4.12 Reverseproxyconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 111 4.13 UsingthirdpartyPHPcomponents . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 112 4.14 Automaticconfigurationsetup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 113 4.15 Servertuning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 115 4.16 Theming . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116 4.17 OAuth2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 118 i 5 Usermanagement 121 5.1 Usermanagement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 121 5.2 Resettingalostadminpassword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 5.3 Resettingauserpassword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 126 5.4 Userpasswordpolicy. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.5 Twofactorauthentication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 127 5.6 UserauthenticationwithIMAP,SMB,andFTP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 128 5.7 UserauthenticationwithLDAP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 5.8 LDAPusercleanup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 146 5.9 TheLDAPconfigurationAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 147 5.10 UserprovisioningAPI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 152 6 Filesharingandmanagement 171 6.1 FileSharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 171 6.2 ConfiguringFederationSharing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 173 6.3 Uploadingbigfiles>512MB . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 178 6.4 Providingdefaultfiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 181 6.5 ConfiguringExternalStorage(GUI) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 183 6.6 ConfiguringExternalStorage(configurationfile) . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 6.7 ExternalStorageauthenticationmechanisms . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 194 6.8 Encryptionconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 195 6.9 Transactionalfilelocking . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 203 6.10 Previewsconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 204 6.11 Controllingfileversionsandaging. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 206 7 Fileworkflows 207 7.1 Filesaccesscontrol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 207 7.2 Automatedtaggingoffiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 210 7.3 Retentionoffiles . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 211 8 Databaseconfiguration 213 8.1 Convertingdatabasetype. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 213 8.2 Databaseconfiguration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214 8.3 EnablingMySQL4-bytesupport . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 220 8.4 BigInt(64bit)identifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 9 Mimetypesmanagement 223 9.1 Mimetypealiases . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 9.2 Mimetypemapping. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 9.3 Iconretrieval . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 224 10 Maintenance 225 10.1 Backup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 225 10.2 Restoringbackup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 226 10.3 Howtoupgrade . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 228 10.4 Upgradeviabuilt-inupdater . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 230 10.5 Upgrademanually . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 243 10.6 Upgradeviapackages . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 245 10.7 Migratingtoadifferentserver . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 10.8 MigratingfromownCloud . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 247 11 Issuesandtroubleshooting 249 11.1 Generaltroubleshooting . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 249 11.2 Codesigning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 254 ii CHAPTER ONE INTRODUCTION WelcometotheNextcloudServerAdministrationGuide. ThisguidedescribesadministrationtasksforNextcloud,the flexibleopensourcefilesynchronizationandsharingsolution. NextcloudincludestheNextcloudserver, whichruns onLinux,clientapplicationsforMicrosoftWindows,macOSandLinux,andmobileclientsfortheAndroidandApple iOSoperatingsystems. CurrenteditionsofNextcloudmanualsarealwaysavailableonlineatdocs.nextcloud.com. Nextcloudserverisavailable: • Asafree,fullfeaturedcommunity-supportedserver,withallenterprisefeatures. • Orwithfullenterprisesupport,includingphoneandemailaccesstoNextclouddevelopers. SeeReleasenotesformoreinformationonthedifferentNextcloudeditions. 1.1 Videos and blogs SeetheofficialNextcloudchannelonYouTubefortutorials,overviews,andconferencevideos. VisitNextcloudPlanetfornewsanddeveloperblogs. 1.2 Target audience Thisguideisforuserswhowanttoinstall,administer,andoptimizetheirNextcloudservers. Tolearnmoreaboutthe NextcloudWebuserinterface,anddesktopandmobileclients,pleaserefertotheirrespectivemanuals: • NextcloudUserManual • NextcloudDesktopClient • NextcloudAndroidApp 1 NextcloudServerAdministrationManual,Release13 2 Chapter1. Introduction CHAPTER TWO RELEASE NOTES 2.1 Changes in Nextcloud 13 AdetailedlogofallchangescanbefoundintheofficialChangelog. Therearealsoallcurrentandpreviousversions linked. 2.1.1 Updates to Nginx configuration • In the Nginx configuration the Same-Origin header was removed. This is now handled in PHP and keep- ing it will result in a wrong header. Please remove those lines in your Nginx config: add_header X-Frame-Options "SAMEORIGIN";SeeNginxconfiguration • ForimprovementsinservingHTTPrequeststheNginxconfigurationnowhasHTTP2enabled. Pleaseupdate yourNginxconfigaccordingly. SeeNginxconfiguration • TheGZipconfigurationforNginxwasupdated. SeeNginxconfigurationfordetails. 2.2 Common questions 2.2.1 Could not install core app bundle Thefollowingerrormessageisshownduringtheupdate: “Repairwarning: Couldnotinstallcoreappbundle: Could notdownloadapp<app>”. ThisbasicallymeansthatNextcloudcouldnotfetchtheappfromtheappstoreautomatically. Thiscouldhavemultiple reasons: either you disabled the appstore with the config.php flag or your server could not reach the app store. The instancewillworkfine,butthefeaturesthatareusuallyprovidedbythisapparenotavailable. 2.3 Theming changes WithNextcloud12,CSSfileshavebeenmergedintooneserver.csssoinordertokeepyourthemeworkingyoushould consolidateyourexistingcssstylesintoaserver.cssfile.Asfortheexamplethemethestyles.cssfilehasbeenrenamed toserver.css. 3 NextcloudServerAdministrationManual,Release13 4 Chapter2. Releasenotes CHAPTER THREE INSTALLATION 3.1 System requirements 3.1.1 Server Forbestperformance,stabilityandfunctionalitywehavedocumentedsomerecommendationsforrunningaNextcloud server. TheNextcloudserverisnotcompatiblewithWindowsandmacOS. Note: If you plan a setup for your organization and you rely on professional deployment consulting (e.g. efficient andreliablescaling)andsupport,westronglyrecommendyoutocheckoutour**enterprisesupport**. Platform Options OperatingSystem • Ubuntu14.04/16.04/18.04LTS(recommended) • Red Hat Enterprise Linux 6.5/7 (recom- mended) • Debian8(Jessie),9(Stretch) • SUSELinuxEnterpriseServer11withSP3&12 • openSUSELeap42.1+ • CentOS6.5/7 Database • MySQLorMariaDB5.5+(recommended) • Oracle Database 11g (only as part of an enter- prisesubscription) • PostgreSQL9/10 • SQLite (only recommended for testing and minimal-instances) Webserver • Apache 2.4 with mod_php or php-fpm (rec- ommended) • nginxwithphp-fpm PHPRuntime • 5.6 • 7.0(recommended) • 7.1(recommended) • 7.2 5 NextcloudServerAdministrationManual,Release13 SeeInstallationonLinuxforminimumPHP-modulesandadditionalsoftwareforinstallingNextcloud. Memory MemoryrequirementsforrunninganNextcloudserveraregreatlyvariable,dependingonthenumbersofusers,apps, filesandvolumeofserveractivity. Nextcloudneedsaminimumof128MBRAM,andwerecommendaminimumof512MB. DatabaserequirementsforMySQL/MariaDB Thefollowingiscurrentlyrequiredifyou’rerunningNextcloudtogetherwithaMySQL/MariaDBdatabase: • InnoDBstorageengine(MyISAMisnotsupported) • “READCOMMITED”transactionisolationlevel(See:Database“READCOMMITTED”transactionisolation level) • DisabledorBINLOG_FORMAT=ROWconfiguredBinaryLogging(See: https://dev.mysql.com/doc/refman/ 5.7/en/binary-log-formats.html) • ForEmoji(UTF84-byte)supportseeEnablingMySQL4-bytesupport 3.1.2 Desktop client Westronglyrecommendusingthelatestversionofyouroperatingsystemtogetthefullandmoststableexperience outofourclients. • Windows7+ • macOSLion(10.7)+(64-bitonly) • Linux(CentOS6.5+,Ubuntu14.04+,Fedora21+,openSUSE13,SUSELinuxEnterprise11SP3+,Debian8 (Jessie)+,RedHatEnterpriseLinux7) 3.1.3 Mobile apps We strongly recommend using the latest version of your mobile operating system to get the full and most stable experienceoutofourmobileapps. • iOS9.x+ • Android4.x+ Note: TheseparateNextcloudTalkapprequiresiOS9.x+orAndroid5.x+. 3.1.4 Web browser ForthebestexperiencewiththeNextcloudwebinterface,werecommendthatyouusethelatestandsupportedversion ofabrowserfromthislist,oronebasedonthose: • MicrosoftInternetExplorer11(latestversion) • MicrosoftEdge 6 Chapter3. Installation
Description: