User Tools

Site Tools


software:nextcloud:reference

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
software:nextcloud:reference [2023/02/02 23:40] rodolicosoftware:nextcloud:reference [2023/10/12 00:49] (current) rodolico
Line 4: Line 4:
  
 This page is mainly for our clients we install private instances for, so they can plan and manage with minimal reliance on us. This page is mainly for our clients we install private instances for, so they can plan and manage with minimal reliance on us.
 +
 +===== File sync from command line =====
 +
 +Nextcloud Client has a command line version which can be run from a Unix cron or Windows Task entry. It may not be installed by default when you install the Nextcloud Desktop Client. See https://docs.nextcloud.com/desktop/latest/advancedusage.html (bottom section of that page).
 +
 +The name of the command is nextcloudcmd, and you can call it with a /? (Windows) or --help (Unix) to get the parameters (describe in the above link also). Basic usage is:
 +<code bash>
 +nextcloudcmd --user NC_User_Name --password 'password' --path '/path/on/server' /local/dir/to/sync https://url/to/nextcloud/install
 +</code>
 +
 +Note: you do not need to use the --path parameter if doing something like sync'ing Documents on your machine to Documents on the nextcloud account.
 +
 +===== Installation and Upgrades =====
 +
 +==== Installation ====
 +
 +I like to install from source instead of getting the older version from my operating system. This allows me to keep my installation fairly recent, though you will need to manually install the php libraries required.
 +
 +Nextcloud has some great instructions at their admin manual, https://docs.nextcloud.com/server/stable/admin_manual/installation/index.html.
 +
 +In both cases below, you will need to create the database before performing the tests. Open mariadb (command //mysql//), then enter the following command to create the database and user. Save your username, password and database name for the installation process.
 +
 +<code sql>
 +CREATE USER 'username'@'localhost' IDENTIFIED BY 'password';
 +CREATE DATABASE IF NOT EXISTS nextcloud CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
 +GRANT ALL PRIVILEGES on nextcloud.* to 'username'@'localhost';
 +FLUSH privileges;
 +</code>
 +
 +=== Web Based Installation ===
 +
 +  - Go to https://nextcloud.com/install/ and click on //Web Installer//, then copy the resulting file to the location you want to install to (documentroot or documentroot/nextcloud).
 +  - Open your web browser to the correct URL and follow the instructions.
 +
 +=== Install from source ===
 +
 +
 +  - Go to https://nextcloud.com/install/ and click the //Get ZIP file// button
 +  - Move the downloaded ZIP file someplace
 +  - Go into your preferred installation directory and type <code bash>unzip /path/to/zipfile.zip ; chown -fR www-data:www-data *</code>
 +  - Open your web browser to the correct URL and follow the instructions.
 +
 +For browserless installation, you can use the built in //occ// command to do the installation. See https://docs.nextcloud.com/server/stable/admin_manual/installation/command_line_installation.html
 +
 +==== Upgrades =====
 +
 +Upgrading a Nextcloud installation from the browser is fraught with problems. Maybe it takes too long to do the upgrade and the web server times out the process. Maybe there is an unknown error that doesn't get reported.
 +
 +If you have manually installed Nextcloud, you can do an upgrade from the command line.
 +
 +<code bash>
 +cd /your/nextcloud/installation/directory
 +sudo -u www-data php updater/updater.phar
 +</code>
 +
 +This will ask a bunch of questions, then do the upgrade. If you want to have no questions to answer, add the //--no-interaction// flag at the end (I'm not that brave).
 +
 +See https://www.linuxbabe.com/cloud-storage/upgrade-nextcloud-command-line-gui for more info.
  
 ===== Setup ===== ===== Setup =====
software/nextcloud/reference.1675402822.txt.gz · Last modified: 2023/02/02 23:40 by rodolico