diff --git a/.vscode/settings.json b/.vscode/settings.json index 8b241154..d2936c95 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -19,6 +19,7 @@ "duckdns", "emby", "ffmpeg", + "fqdn", "htop", "foss", "htpasswd", diff --git a/docs/applications/nextcloud.mdx b/docs/applications/nextcloud.mdx index 0046f5aa..8ebb7983 100644 --- a/docs/applications/nextcloud.mdx +++ b/docs/applications/nextcloud.mdx @@ -4,8 +4,54 @@ title: Nextcloud sidebar_label: Nextcloud --- -Nextcloud is an open source, self-hosted file sync and share and communication app platform. Access & sync your files, contacts, calendars & communicate and collaborate across your devices. You decide what happens with your data, where it is and who can access it! +A self-hosted file-sharing and collaboration tool. A Dropbox/Google Drive alternative. -import MissingDocs from '../snippets/missingdocs.md'; +## Installation - \ No newline at end of file +Nextcloud requires nginx to be installed. Please install the dependency first, and then install Nextcloud. + +```bash +sudo box install nginx +sudo box install nextcloud +``` + +## Accessing Nextcloud + +You can access nextcloud at `https:///nextcloud`. + +The installation will automatically create the Nextcloud administrator user using your master username and password. + +## User management + +Nextcloud manages its users in its own database. `box` will create, delete and change passwords in it for you when you make those changes. This only works in the box -> nextcloud direction, which means changing a password in nextcloud will not have an impact on the rest of the system. + +You can however make Nextcloud users for non-`box`-based users as well through the administration portal. + +## Service control + +Nextcloud is an application written by PHP, and therefore it does not have its own service, as it is powered by the PHP-FPM stack. + +## Troubleshooting + +import Troubleshooting from '../snippets/troubleshooting.md'; + + + +### Domain is not in "trusted domains" +Nextcloud requires to know which domains/IPs/host names it should expect traffic from for security reasons. It will give you an error when it is being accessed from a source it does not recognize. + +Box attempts to guess these based on your IP, your machine's hostname and the value it has for the FQDN, as well as the `server_name` value in your nginx configuration, and adds all of those to the "trusted domains" key. + +You can manually change these by following the commands below. Please note: the values are stored in an array, and the value must be set to the index you desire it to be on. Therefore if you have 6 entries, you should add your domain to the 7th position. + +```bash +cd /srv/nextcloud +# Show all the values currently configured +sudo -u www-data php occ config:system:get trusted_domains +# Get the current amount of entries +sudo -u www-data php occ config:system:get trusted_domains | wc -l +# Set your value to the next index, e.g. = 7 +sudo -u www-data php occ config:system:set trusted_domains --value="" +``` + +You should be able to connect to your instance now. \ No newline at end of file