welcome: please sign in

Diff for "MemberManual/WebApplications/Nextcloud"

Differences between revisions 5 and 6
Revision 5 as of 2019-01-02 02:23:47
Size: 2601
Comment: Note on creating database
Revision 6 as of 2019-01-03 02:49:53
Size: 2743
Comment: Changed unpacking command to result in daemon user ownership
Deletions are marked like this. Additions are marked like this.
Line 15: Line 15:
Unpack the source. Unpack the source. We do this as the daemon user so that it has the ownership of the files, otherwise Nextcloud will warn about inconsistent file ownership later.
Line 18: Line 18:
unzip nextcloud-15.0.0.zip k5start -qtUf /etc/keytabs/user.daemon/$USER -- unzip nextcloud-15.0.0.zip
Line 21: Line 21:
We move the content of the archive so that it's in the root of your new directory. We don't need the `.htaccess` and `.user.ini` files. Move the resulting `nextcloud` directory to where you decided to have the document root.
Line 24: Line 24:
mv nextcloud/* $NEXTDIR/ mv nextcloud $NEXTDIR

Guide for installation of Nextcloud.

WORK IN PROGRESS

1. Create database

Postgresql should work, but Nextcloud recommends MySQL. See MemberManual/Databases#Create_a_Database. We'll assume you name the database ${USER}_cloud.

2. Software installation

Get the Nextcloud tarball from Nextcloud.

Pick a directory where you'll host Nextcloud, for example $HOME/www/next.your.domain. We'll call it $NEXTDIR.

Unpack the source. We do this as the daemon user so that it has the ownership of the files, otherwise Nextcloud will warn about inconsistent file ownership later.

k5start -qtUf /etc/keytabs/user.daemon/$USER -- unzip nextcloud-15.0.0.zip

Move the resulting nextcloud directory to where you decided to have the document root.

mv nextcloud $NEXTDIR

Create an empty data directory in the document root. This is necessary for the duration of the installation, we'll delete it later.

cd $NEXTDIR
mkdir data

Adjust directory permissions:

fsr setacl . system:anyuser none
fsr sa . $USER.daemon rlk
fsr sa config $USER.daemon write
fsr sa data $USER.daemon write
fsr sa apps $USER.daemon write

Delete some lines in the file core/Migrations/Version14000Date20180129121024.php. This doesn't play well with the HCoop default of not granting DROP on tables. The easiest fix seems to be to manually drop these later.

@@ -49,11 +49,6 @@
                /** @var ISchemaWrapper $schema */
                $schema = $schemaClosure();

-               $schema->dropTable('admin_sections');
-               $schema->dropTable('admin_settings');
-               $schema->dropTable('personal_sections');
-               $schema->dropTable('personal_settings');
-
                return $schema;
        }
 }

3. Domtool

web "cloud" where
    PhpVersion = php72;
    DocumentRoot = home "$NEXTDIR";
with
    rewriteRule "/.well-known/carddav" "/remote.php/dav" [redirectWith temp];
    rewriteRule "/.well-known/caldav" "/remote.php/dav" [redirectWith temp];
end;

TODO: Translate additional settings from .htaccess and .user.ini

4. Nextcloud installation wizard

5. Cleanup

Since we use a new data directory we can delete the one in the document root:

cd $NEXTDIR
rm -r data

We should drop those deprecated tables from before (this wasn't actually working for me, will look into how to drop tables in MySQL later).

mysql-fixperms
mysql -h mysql -p ${USER}_cloud

DROP TABLE admin_sections;
DROP TABLE admin_settings);
DROP TABLE personal_sections;
DROP TABLE 'personal_settings;

MemberManual/WebApplications/Nextcloud (last edited 2019-01-27 11:26:28 by BjörnLindström)