Central Shared Templates

Hi all,

Iā€™m trying to set up my Nextcloud instance so instead of each user receiving their own copy of the the Templates folder, there is a single shared instance so itā€™s easier to maintain.

Iā€™ve removed the Templates folder from the Skelton and set this to null in config.php and turned off the first run wizard.

Iā€™ve tried creating an All Users group and sharing the folder from the Admin user and also Iā€™ve tried the Group Folder app to share. However when I go to the new user and then in Settings > Office and select the templates directory, it is not showing up the templates as it would if they had their own copy - i.e. it is just creates a blank presentation without showing the user any templates to select. Is this a bug, feature or am I just missing something?

Nextcloud version: 24.0.4
Nexctcloud AIO: 1.7.1
OS: Ubuntu 22.04
WebServer: Apache 2.4.54
PHP: 8.0.22
DB: Postgre SQL 14.5

Config.php:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'apps_paths' =>
  array (
    0 =>
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 =>
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'redis' =>
  array (
    'host' => 'nextcloud-aio-redis',
    'password' => <REMOVED>,
    'port' => 6379,
  ),
  'overwritehost' => <REMOVED>,
  'overwriteprotocol' => 'https',
  'passwordsalt' => <REMOVED>,
  'secret' => <REMOVED>,
  'trusted_domains' =>
  array (
    0 => 'localhost',
    1 => <REMOVED>,
  ),
  'datadirectory' => '/mnt/ncdata',
  'dbtype' => 'pgsql',
  'version' => '24.0.4.1',
  'overwrite.cli.url' => <REMOVED>,
  'dbname' => 'nextcloud_database',
  'dbhost' => 'nextcloud-aio-database',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'dbuser' => 'oc_nextcloud',
  'dbpassword' => <REMOVED>,
  'installed' => true,
  'instanceid' => 'ocnjvnr5owk2',
  'loglevel' => '2',
  'log_type' => 'file',
  'logfile' => '/var/www/html/data/nextcloud.log',
  'log_rotate_size' => '10485760',
  'log.condition' =>
  array (
    'apps' =>
    array (
      0 => 'admin_audit',
    ),
  ),
  'preview_max_x' => '2048',
  'preview_max_y' => '2048',
  'jpeg_quality' => '60',
  'enabledPreviewProviders' =>
  array (
    1 => 'OC\\Preview\\Image',
    2 => 'OC\\Preview\\MarkDown',
    3 => 'OC\\Preview\\MP3',
    4 => 'OC\\Preview\\TXT',
    5 => 'OC\\Preview\\OpenDocument',
    6 => 'OC\\Preview\\Movie',
  ),
  'enable_previews' => true,
  'upgrade.disable-web' => true,
  'mail_smtpmode' => 'smtp',
  'trashbin_retention_obligation' => 'auto, 30',
  'versions_retention_obligation' => 'auto, 30',
  'activity_expire_days' => '30',
  'simpleSignUpLink.shown' => false,
  'share_folder' => '/Shared',
  'one-click-instance' => true,
  'one-click-instance.user-limit' => 100,
  'htaccess.RewriteBase' => '/',
  'files_external_allow_create_new_local' => true,
  'trusted_proxies' =>
  array (
    0 => '127.0.0.1',
    1 => '::1',
  ),
  'allow_local_remote_servers' => true,
  'mail_smtpauthtype' => 'LOGIN',
  'mail_sendmailmode' => 'smtp',
  'mail_from_address' => 'dev-nc-admin',
  'mail_domain' => <REMOVED>,
  'mail_smtphost' => 'smtp-relay.gmail.com',
  'mail_smtpport' => '587',
  'mail_smtpauth' => 1,
  'mail_smtpname' => <REMOVED>,
  'mail_smtppassword' => <REMOVED>,
  'mail_smtpsecure' => 'tls',
  'default_phone_region' => 'GB',
  'default_locale' => 'en_GB',
  'default_language' => 'en_GB',
  'knowledgebaseenabled' => false,
  'skeltondirectory' => '',
  'twofactor_enforced' => 'true',
  'twofactor_enforced_groups' =>
  array (
  ),
  'twofactor_enforced_excluded_groups' =>
  array (
  ),
);

Adding some references to this topic:

Thanks Xue! You mentioned

  1. Groupfolders for templates. I did that with help of subfolders for the template folder of different users/groups, so that everybody can still use his own, individual templates. The templates can also be read only so that only authorised users can edit such templates. But this may break if different languages are used (different names for the template folder itself!).

in Templates for all users. How did you achieve this please? Was it using ā€˜templatedirectoryā€™ setting in config.php? When a user was, for example, creating a presentation - did it automatically show the available templates? Iā€™m not worried about different languages in all honesty.

Thanks in advance!

Hi, this is an old topic, and i have a minor remark, it look like in your provided configuration you use skeltondirectory parameter where it should be skeletondirectory.