Kostenlose Cloud Lösung https://nextcloud.com/. Auch als [[docker|Docker]] Image. Siehe [[https://hub.docker.com/_/nextcloud|hier]].
Siehe auch [[openstack|OpenStack]].
Um den Hostname post-install anzupassen in die config.php den Parameter "overwritehost" hinzufügen.
=====Installation=====
====Ubuntu====
apt install apache2
apt install php7.0 libapache2-mod-php7.0 php7.0-intl php7.0-gd php7.0-json php7.0-mysql php7.0-common php7.0-curl php7.0-mbstring php7.0-mcrypt php7.0-xml php-imagick php7.0-zip
apt install mysql-server
MySQL starten und als root einloggen.
CREATE DATABASE nextcloud;
GRANT ALL PRIVILEGES ON nextcloud.* TO 'nextcloud'@'localhost' IDENTIFIED BY 'P@$$W0RD';
FLUSH PRIVILEGES;
exit;
Install nextcloud
cd /var/www
wget https://download.nextcloud.com/server/releases/latest-14.zip
unzip latest-14.zip
rm html
mv nextcloud html
chown -R www-data:www-data html
rm latest-14.zip
Modify ''/etc/apache2/sites-available/default-ssl.conf''.
ServerAdmin admin@domain.com
DocumentRoot /var/www/html
ServerName localhost
ServerAlias domain.com
Options +FollowSymlinks
AllowOverride All
Dav off
SetEnv HOME /var/www/nextcloud
SetEnv HTTP_HOME /var/www/nextcloud
Mods aktivieren
a2enmod rewrite headers env dir mime
Apache neu starten und Webinterface aufrufen.
====Docker====
docker run -dit -p 80:80 nextcloud
=====NGINX Proxy=====
server {
listen 443 ssl http2;
server_name cloud.domain.local;
# SSL-Zertifikate
ssl_certificate /certs/certnew.pem; # Dein Kombizertifikat (Server + CA)
ssl_certificate_key /certs/server.key; # Dein privater Schlüssel
# SSL-Optimierung
ssl_protocols TLSv1.2 TLSv1.3;
ssl_ciphers HIGH:!aNULL:!MD5;
ssl_prefer_server_ciphers on;
add_header Content-Security-Policy "form-action 'self' https://cloud.domain.local;";
# HSTS - Nur aktivieren, wenn HTTPS funktioniert!
add_header Strict-Transport-Security "max-age=31536000; includeSubDomains" always;
# Proxy für Nextcloud (läuft lokal auf 8080)
location / {
proxy_pass http://localhost:8080; # Hier wird der lokale Nextcloud-Server angesprochen
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Ssl on;
}
# Weiterleitung von WebSockets für Nextcloud
location ~ ^/nextcloud/(.*\.php|.*\.js|.*\.css|.*\.html|.*\.json|.*\.woff|.*\.svg|.*\.ttf|.*\.woff2)$ {
proxy_pass http://localhost:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header X-Forwarded-Port 443;
proxy_set_header X-Forwarded-Ssl on;
}
# Zugriffssteuerung (Standard-Dateien blockieren)
location ~ ^/(?:build|tests|config|lib|3rdparty|templates|data)/ {
deny all;
}
location ~ ^/(?:\.|autotest|occ|issue|indie|db_|console) {
deny all;
}
}
# HTTP auf HTTPS weiterleiten
server {
listen 80;
server_name cloud.domain.local;
return 301 https://$host$request_uri;
}
=====OCC=====
Nextcloud 30.0.6
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command
-q, --quiet Do not output any message
-V, --version Display this application version
--ansi|--no-ansi Force (or disable --no-ansi) ANSI output
-n, --no-interaction Do not ask any interactive question
--no-warnings Skip global warnings, show command output only
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug
Available commands:
check check dependencies of the server environment
completion Dump the shell completion script
help Display help for a command
list List commands
setupchecks Run setup checks and output the results
status show some status information
upgrade run upgrade routines after installation of a new release. The release has to be installed before.
activity
activity:send-mails Sends the activity notification mails
admin-delegation
admin-delegation:add add setting delegation to a group
admin-delegation:remove remove settings delegation from a group
admin-delegation:show show delegated settings
app
app:disable disable an app
app:enable enable an app
app:getpath Get an absolute path to the app directory
app:install install an app
app:list List all available apps
app:remove remove an app
app:update update an app or all apps
app_api
app_api:app:config:delete Delete ExApp configs
app_api:app:config:get Get ExApp config
app_api:app:config:list List ExApp configs
app_api:app:config:set Set ExApp config
app_api:app:deploy Deploy ExApp on configured daemon
app_api:app:disable Disable registered external app
app_api:app:enable Enable registered external app
app_api:app:list List ExApps
app_api:app:register Install external App
app_api:app:unregister Unregister external app
app_api:app:update Update ExApp
app_api:daemon:list List registered daemons
app_api:daemon:register Register daemon config for ExApp deployment
app_api:daemon:unregister Unregister daemon
background
background:cron [background:ajax|background:webcron] Use cron, ajax or webcron to run background jobs
background-job
background-job:delete Remove a background job from database
background-job:execute Execute a single background job manually
background-job:list List background jobs
background-job:worker Run a background job worker
broadcast
broadcast:test test the SSE broadcaster
circles
circles:check Checking your configuration
circles:maintenance Clean stuff, keeps the app running
circles:manage:config edit config/type of a Circle
circles:manage:create create a new circle
circles:manage:destroy destroy a circle by its ID
circles:manage:details get details about a circle by its ID
circles:manage:edit edit displayName or description of a Circle
circles:manage:join emulate a user joining a Circle
circles:manage:leave simulate a user joining a Circle
circles:manage:list listing current circles
circles:manage:setting edit setting for a Circle
circles:members:add Add a member to a Circle
circles:members:details get details about a member by its ID
circles:members:level Change the level of a member from a Circle
circles:members:list listing Members from a Circle
circles:members:remove remove a member from a circle
circles:members:search Change the level of a member from a Circle
circles:memberships index and display memberships for local and federated users
circles:migrate:customgroups
circles:remote remote features
circles:shares:files listing shares files
circles:sync Sync Circles and Members
circles:test testing some features
config
config:app:delete Delete an app config value
config:app:get Get an app config value
config:app:set Set an app config value
config:import Import a list of configs
config:list List all configs
config:system:delete Delete a system config value
config:system:get Get a system config value
config:system:set Set a system config value
dav
dav:create-addressbook Create a dav addressbook
dav:create-calendar Create a dav calendar
dav:delete-calendar Delete a dav calendar
dav:fix-missing-caldav-changes Insert missing calendarchanges rows for existing events
dav:list-calendars List all calendars of a user
dav:move-calendar Move a calendar from an user to another
dav:remove-invalid-shares Remove invalid dav shares
dav:retention:clean-up
dav:send-event-reminders Sends event reminders
dav:sync-birthday-calendar Synchronizes the birthday calendar
dav:sync-system-addressbook Synchronizes users to the system addressbook
db
db:add-missing-columns Add missing optional columns to the database tables
db:add-missing-indices Add missing indices to the database tables
db:add-missing-primary-keys Add missing primary keys to the database tables
db:convert-filecache-bigint Convert the ID columns of the filecache to BigInt
db:convert-mysql-charset Convert charset of MySQL/MariaDB to use utf8mb4
db:convert-type Convert the Nextcloud database to the newly configured one
db:schema:expected Export the expected database schema for a fresh installation
db:schema:export Export the current database schema
encryption
encryption:change-key-storage-root Change key storage root
encryption:decrypt-all Disable server-side encryption and decrypt all files
encryption:disable Disable encryption
encryption:enable Enable encryption
encryption:encrypt-all Encrypt all files for all users
encryption:list-modules List all available encryption modules
encryption:migrate-key-storage-format Migrate the format of the keystorage to a newer format
encryption:set-default-module Set the encryption default module
encryption:show-key-storage-root Show current key storage root
encryption:status Lists the current status of encryption
federation
federation:sync-addressbooks Synchronizes addressbooks of all federated clouds
files
files:cleanup cleanup filecache
files:copy Copy a file or folder
files:delete Delete a file or folder
files:get Get the contents of a file
files:move Move a file or folder
files:object:delete Delete an object from the object store
files:object:get Get the contents of an object
files:object:put Write a file to the object store
files:put Write contents of a file
files:recommendations:recommend Shows recommended files for an account
files:reminders List file reminders
files:repair-tree Try and repair malformed filesystem tree structures
files:scan rescan filesystem
files:scan-app-data rescan the AppData folder
files:transfer-ownership All files and folders are moved to another user - outgoing shares and incoming user file shares (optionally) are moved as well.
group
group:add Add a group
group:adduser add a user to a group
group:delete Remove a group
group:info Show information about a group
group:list list configured groups
group:removeuser remove a user from a group
info
info:file get information for a file
info:file:space Summarize space usage of specified folder
integrity
integrity:check-app Check integrity of an app using a signature.
integrity:check-core Check integrity of core code using a signature.
integrity:sign-app Signs an app using a private key.
integrity:sign-core Sign core using a private key.
l10n
l10n:createjs Create javascript translation files for a given app
ldap
ldap:check-group checks whether a group exists on LDAP.
ldap:check-user checks whether a user exists on LDAP.
ldap:create-empty-config creates an empty LDAP configuration
ldap:delete-config deletes an existing LDAP configuration
ldap:promote-group declares the specified group as admin group (only one is possible per LDAP configuration)
ldap:reset-group deletes an LDAP group independent of the group state in the LDAP
ldap:reset-user deletes an LDAP user independent of the user state
ldap:search executes a user or group search
ldap:set-config modifies an LDAP configuration
ldap:show-config shows the LDAP configuration
ldap:show-remnants shows which users are not available on LDAP anymore, but have remnants in Nextcloud.
ldap:test-config tests an LDAP configuration
ldap:update-uuid Attempts to update UUIDs of user and group entries. By default, the command attempts to update UUIDs that have been invalidated by a migration step.
log
log:file manipulate logging backend
log:manage manage logging configuration
log:tail Tail the nextcloud logfile
log:watch Watch the nextcloud logfile
maintenance
maintenance:data-fingerprint update the systems data-fingerprint after a backup is restored
maintenance:mimetype:update-db Update database mimetypes and update filecache
maintenance:mimetype:update-js Update mimetypelist.js
maintenance:mode set maintenance mode
maintenance:repair repair this installation
maintenance:repair-share-owner repair invalid share-owner entries in the database
maintenance:theme:update Apply custom theme changes
maintenance:update:htaccess Updates the .htaccess file
metadata
metadata:get get stored metadata about a file, by its id
migrations
migrations:preview Get preview of available DB migrations in case of initiating an upgrade
notification
notification:delete Delete a generated admin notification for the given user
notification:generate Generate a notification for the given user
notification:test-push Generate a notification for the given user
photos
photos:albums:add Add specified photo to album
photos:albums:create Create a new album for a user
photos:update-1000-cities Update the list of 1000 and more inhabitant cities
preview
preview:generate generate a preview for a file
preview:repair distributes the existing previews into subfolders
preview:reset-rendered-texts Deletes all generated avatars and previews of text and md files
security
security:bruteforce:attempts Show bruteforce attempts status for a given IP address
security:bruteforce:reset resets bruteforce attempts for given IP address
security:certificates list trusted certificates
security:certificates:export export the certificate bundle
security:certificates:import import trusted certificate in PEM format
security:certificates:remove remove trusted certificate
serverinfo
serverinfo:update-storage-statistics Triggers an update of the counts related to storages used in serverinfo
sharing
sharing:cleanup-remote-storages Cleanup shared storage entries that have no matching entry in the shares_external table
sharing:delete-orphan-shares Delete shares where the owner no longer has access to the file
sharing:expiration-notification Notify share initiators when a share will expire the next day.
sharing:fix-share-owners Fix owner of broken shares after transfer ownership on old versions
support
support:report Generate a system report
tag
tag:add Add new tag
tag:delete delete a tag
tag:edit edit tag attributes
tag:list list tags
taskprocessing
taskprocessing:task:list list tasks
taskprocessing:task:stats get statistics for tasks
text
text:reset Reset a text document session to the current file content
theming
theming:config Set theming app config values
trashbin
trashbin:cleanup Remove deleted files
trashbin:expire Expires the users trashbin
trashbin:restore Restore all deleted files according to the given filters
trashbin:size Configure the target trashbin size
twofactorauth
twofactorauth:cleanup Clean up the two-factor user-provider association of an uninstalled/removed provider
twofactorauth:disable Disable two-factor authentication for a user
twofactorauth:enable Enable two-factor authentication for a user
twofactorauth:enforce Enabled/disable enforced two-factor authentication
twofactorauth:state Get the two-factor authentication (2FA) state of a user
update
update:check Check for server and app updates
user
user:add adds an account
user:auth-tokens:add [user:add-app-password] Add app password for the named account
user:auth-tokens:delete Deletes an authentication token
user:auth-tokens:list List authentication tokens of an user
user:clear-avatar-cache clear avatar cache
user:delete deletes the specified user
user:disable disables the specified user
user:enable enables the specified user
user:info show user info
user:keys:verify Verify if the stored public key matches the stored private key
user:lastseen shows when the user was logged in last time
user:list list configured users
user:report shows how many users have access
user:resetpassword Resets the password of the named user
user:setting Read and modify user settings
user:sync-account-data sync user backend data to accounts table for configured users
versions
versions:cleanup Delete versions
versions:expire Expires the users file versions
webhook_listeners
webhook_listeners:list Lists configured webhook listeners
workflows
workflows:list Lists configured workflows
=====User & Groups=====
php occ user
user:add adds an account
user:add-app-password Add app password for the named account
user:auth-tokens:add [user:add-app-password] Add app password for the named account
user:auth-tokens:delete Deletes an authentication token
user:auth-tokens:list List authentication tokens of an user
user:clear-avatar-cache clear avatar cache
user:delete deletes the specified user
user:disable disables the specified user
user:enable enables the specified user
user:info show user info
user:keys:verify Verify if the stored public key matches the stored private key
user:lastseen shows when the user was logged in last time
user:list list configured users
user:report shows how many users have access
user:resetpassword Resets the password of the named user
user:setting Read and modify user settings
user:sync-account-data sync user backend data to accounts table for configured users
=====File Permissions=====
php occ files
files:cleanup cleanup filecache
files:copy Copy a file or folder
files:delete Delete a file or folder
files:get Get the contents of a file
files:move Move a file or folder
files:object:delete Delete an object from the object store
files:object:get Get the contents of an object
files:object:put Write a file to the object store
files:put Write contents of a file
files:recommendations:recommend Shows recommended files for an account
files:reminders List file reminders
files:repair-tree Try and repair malformed filesystem tree structures
files:scan rescan filesystem
files:scan-app-data rescan the AppData folder
files:transfer-ownership All files and folders are moved to another user - outgoing shares and incoming user file shares (optionally) are moved as well.
# Transfer ownership
php occ files:transfer-ownership User1 User2
php occ files:transfer-ownership --path="User1/files" User1 User2
=====LDAP=====
ldap:check-group checks whether a group exists on LDAP.
ldap:check-user checks whether a user exists on LDAP.
ldap:create-empty-config creates an empty LDAP configuration
ldap:delete-config deletes an existing LDAP configuration
ldap:promote-group declares the specified group as admin group (only one is possible per LDAP configuration)
ldap:reset-group deletes an LDAP group independent of the group state in the LDAP
ldap:reset-user deletes an LDAP user independent of the user state
ldap:search executes a user or group search
ldap:set-config modifies an LDAP configuration
ldap:show-config shows the LDAP configuration
ldap:show-remnants shows which users are not available on LDAP anymore, but have remnants in Nextcloud.
ldap:test-config tests an LDAP configuration
ldap:update-uuid Attempts to update UUIDs of user and group entries. By default, the command attempts to update UUIDs that have been invalidated by a migration step.
=====Links=====
* https://nextcloud.com/
* https://www.rosehosting.com/blog/how-to-install-nextcloud-14-on-ubuntu-16-04/