down angle photography of red clouds and blue sky

Changing the default share folder in Nextcloud

When your nextcloud installation is used intensely and a lot of files are shared, you might notice that your root folder is getting clogged by shared files. They all end up in your root folder by default. While you can clean up the mess this causes manually, there is a better way to handle this.

The solution for your problem is to change the default folder for shared files. Doing this is relatively simple, so follow us as we head down to the dangerzone!

What you need

To change the default share folder, you will need the following:

  • Full access to your Nextcloud installation
  • Your favorite FTP client
  • Your favorite text editor => Ours is Visual Code, if you’re wondering.

Editing your config file

To start, connect to your Nextcloud connection with your FTP client. Then, find the config folder.

Open the config folder, and open the file config.php. Since you’ve installed Nextcloud (You have already installed Nextcloud, right?) you’ll already see some configuration values.

Go to the end of the file, and add a the following configuration value. Replace your/folder with the folder path you want to use. This is a relative path to the root folder of each user. All folders in the path will be created for you.

'shared_folder' => 'your/folder',

When you added the value, save the file and upload it to your Nextcloud installation again.

You won’t immediately notice a difference, but the next time a file is shared with an user, the folder(s) you’ve set in the config file will be created. The file that is shared with them will be sitting in the folder(path) instead of their root folder. Neat!

Discover more from PowerUser Guide

Subscribe now to keep reading and get access to the full archive.

Continue reading