Nextcloud Snap install and S3 Storage Bucket
How to install (these have to be run as root):
Make sure it's a fresh install and unplug all devices connected to the instance if the case:
snap remove nextcloudInstall nextcloud:
snap install nextcloudAdd storage.config.php file with S3 bucket to
/var/snap/nextcloud/current/nextcloud/config
<?php
$CONFIG = array (
'objectstore' => array(
'class' => '\\OC\\Files\\ObjectStore\\S3',
'arguments' => array(
'bucket' => 'NAME_OF_BUCKET',
'autocreate' => true,
'key' => 'BUCKET_KEY',
'secret' => 'BUCKET_SECRET',
//'hostname' => 's3.us-west-1.wasabisys.com',
'region' => 'BUCKER_REGION',
'port' => 443,
'use_ssl' => true,
'use_path_style'=>true
),
),
);Note: This will be created with programatic AWS user if the bucket does not exist
Note 2: If files have not generated after snap install nextcloud, start and stop nextcloud or try installing again
Configure user manually via snap: (change the password after)
/snap/bin/nextcloud.manual-install USERNAME PASSWORDAdd allowed domains to
config.phpin/var/snap/nextcloud/current/nextcloud/config
array (
0 => 'localhost',
1 => 'internet.domain.com',
2 => 'nextcloud.lan',Update below line with Internet URL:
'overwrite.cli.url' => 'https://nextcloud.example.com',Restart nextcloud:
snap restart nextcloudSet up certificate either via Let's Encrypt or self-signed
/snap/bin/nextcloud.enable-https lets-encrypt
/snap/bin/nextcloud.enable-https self-signedLet's Encrypt:
Point DNS to Server Public IP
Make sure port
80and443are openRun command:
sudo nextcloud.enable-https lets-encryptTo confirm that HTTPs works correctly, point your browser to https://<your subdomain>. You should see the Nextcloud login page.
Aaaand that’s it. Now you can install the Nextcloud client and point it to your subdomain to sync files and folders directly to your hard-drive.
Restart nextcloud
snap restart nextcloud2. Increase upload size:
Since snap manages the app, one is not able to directly commit changes, it has to do through snap itself. Given the options and commands available in this app, one can just replace underscores with dashes after php in the name of the parameter, like:
php.upload-max-filesize
php.post-max-size
php.max-input-time
php.max-execution-timeAnd then for the upload size: snap set nextcloud php.post-max-size=16G or sudo if is system-wide.
snap set nextcloud php.upload-max-filesize=16G
snap set nextcloud php.post-max-size=16GJoplin export:
Export Joplin to Raw Folder
Upload folder to nextcloud
Go on local Joplin Device and navigate to options and syncronization
Go to advanced options and click
Delete local data and re-download from sync target
Data migration:
Upload Nextcloud backup or data to Nextcloud via web interface
Delete all local
Nextcloudfolders after upload successfulSet up sync clients on devices
Note: If there are any issues with the sync client, update this parameter:
"overwriteprotocol" => "https"After restart nextcloud:
snap restart nextcloudSNAP Commands for Nextcloud:
OCC:
# This will list all the OCC commnads for Nextcloud
/snap/bin/nextcloud.occ Disable 2FA
/snap/bin/nextcloud.occ twofactorauth:cleanup totpLast updated