| id | nextcloud |
|---|---|
| title | Nextcloud |
| sidebar_label | Nextcloud |
A self-hosted file-sharing and collaboration tool. A Dropbox/Google Drive alternative.
Nextcloud requires nginx to be installed. Please install the dependency first, and then install Nextcloud.
sudo box install nginx
sudo box install nextcloudYou can access nextcloud at https://<hostname.tld>/nextcloud.
The installation will automatically create the Nextcloud administrator user using your master username and password.
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.
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.
import Troubleshooting from '../snippets/troubleshooting.md';
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.
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. <index> = 7
sudo -u www-data php occ config:system:set trusted_domains <index> --value="<domain.tld>"You should be able to connect to your instance now.