Skeleton files are copied into every account — offer mounting them as a share instead
[!TIP]
Help move this idea forward
- Use the 👍 reaction to show support for this feature.
- Avoid commenting unless you have relevant information to add; unnecessary comments create noise for subscribers.
- Subscribe to receive notifications about status changes and new comments.
Is your feature request related to a problem? Please describe.
Every new account gets a physical copy of the skeleton (core/skeleton by default — 63 MB, 64 files, including Templates/, which also serves as the default templatedirectory). There is no deduplication: not in Nextcloud, and not in the object store underneath.
On our instance (Nextcloud 34.0.2.1, PostgreSQL, primary object storage on S3) this is what the storage actually holds:
| Size | Files | |
|---|---|---|
| Default skeleton, copied per account | 298 MB | 301 |
| Actual user-created content | 16 MB | 4 |
| Total in the bucket | 314 MB | 305 |
95 % of our object storage is the Nextcloud manual, five times over. The single largest item is Nextcloud Manual.pdf at 29 MB, followed by Templates/ at 23 MB, Photos/ at 5.5 MB and Nextcloud intro.mp4 at 3.8 MB — about 63 MB per account.
This is more than a disk-space annoyance once primary object storage is in use, because the duplicate gets paid for several times over:
- Network — each copy is uploaded to the object store when the account is created. On a self-hosted store behind a consumer uplink, that is a real and visible transfer.
- Backup — each copy is fetched and stored again in every backup cycle.
- Billing — with a hosted S3 provider, duplicated bytes are charged both as stored volume and as egress every time they are read or backed up.
At 200 accounts that is ~12.6 GB of byte-identical files. The cost scales linearly with the number of users while the information content stays constant.
Describe the solution you'd like
Nextcloud already has the right primitive for this — sharing. It just isn't used for its own skeleton.
Please consider an option (e.g. skeletonmode = copy | share, defaulting to copy for backwards compatibility) where, instead of being copied, the skeleton lives once in a designated account or group folder and is mounted as a read-only share into new accounts.
We tested that the existing share mechanism already answers the objections one would expect, on an unmodified Nextcloud 34:
- A user can opt out. Removing oneself from a group share returns
200, the folder disappears for that user only, and the other recipients keep their access. The share row is preserved with a per-user child row at permission0— so the opt-out is individual, non-destructive and reversible. - Templates work from a share. Pointing a user's
core/templateDirectoryat a shared folder works: the templates API resolves it and lists its contents normally.
The resulting behaviour is arguably better than today's: users can still hide the demo content, and an admin can update the manual or the templates once for everybody, instead of shipping a copy that then ages independently in 200 home directories.
Describe alternatives you've considered
- Emptying
skeletondirectoryand sharing a folder manually. This is what we ended up doing, and it works — but it is undocumented as a pattern, has to be reinvented by every admin, andcore/templateDirectoryis a per-user setting with no global default that could point at a share, so it must be set for each account at onboarding time. - Hard links instead of copies (#25562). Not applicable to object storage, nor to any setup where the data directory and the skeleton live on different filesystems.
- Simply shipping a smaller skeleton. Helpful, but it only changes the constant factor; the per-user duplication remains.
Additional context
Related but distinct existing issues:
- #35597 — configuring
skeletondirectoryfrom the web UI. About where the skeleton lives, not about copy-versus-mount. - #5312 — skeleton written into a shared folder.
- #25562 — hard links instead of copies.
None of them proposes replacing the copy with a mount, which is the specific request here. The trade-off has also shifted since those were filed: object storage as primary storage is now common, and it removes both of the mitigations (filesystem deduplication, hard links) that made per-user copies cheap on a local disk.
Hi,
from my point of view this is not very useful.
- you will have an insecurity by design. A new user might not see the skeleton is shared and saves there files or wonder, why this is read only
- just put all users in a group and share the skel with it - if you want to go the share approach
- you can modify the skel contents by yourself
The current skeleton contains too much demo stuff and should not be used as-is in production. That is the root problem to me.
In an ideal world we should change the Nextcloud skeleton to be filled with example files only during a demo, and possibly being empty instead in production, or to contain a bare minimal set of directories in production, like:
- Documents (empty directory)
- Images (empty directory)
(In production I'd also recommend to drop the Readme.md file, as there is already a wizard to welcome the user, and the documentation should be linked from these user interfaces, instead of being an unuseful copy-pasted PDF file in your user area, not updated anymore.)
But, at the moment, the reality is that Nextcloud provides demo contents, as its skeleton just contains the "Example files" from this repository:
https://github.com/nextcloud/example-files/tree/1e99f7d8abf2adc61b2f93b7ee08d5336b6b3882
$ tree
.
├── Documents
│ ├── Example.md
│ ├── Nextcloud flyer.pdf
│ ├── Readme.md
│ └── Welcome to Nextcloud Hub.docx
├── Nextcloud intro.mp4
├── Nextcloud Manual.pdf
├── Nextcloud.png
├── Photos
│ ├── Birdie.jpg
│ ├── Frog.jpg
│ ├── Gorilla.jpg
│ ├── Library.jpg
│ ├── Nextcloud community.jpg
│ ├── Readme.md
│ ├── Steps.jpg
│ ├── Toucan.jpg
│ └── Vineyard.jpg
├── Readme.md
├── Reasons to use Nextcloud.pdf
├── Templates
│ ├── Brainstorming.whiteboard
│ ├── Business model canvas.odg
│ ├── Business model canvas.ods
│ ├── Business model canvas.whiteboard
│ ├── Calendar.odt
│ ├── Certificate.odt
│ ├── Checklist.ods
│ ├── Diagram & table.ods
│ ├── Ecosystem.odp
│ ├── Elegant.odp
│ ├── Expense report.ods
│ ├── Flowchart.odg
│ ├── Flowchart.whiteboard
│ ├── Gotong royong.odp
│ ├── Impact effort.whiteboard
│ ├── Invoice.ods
│ ├── Invoice.odt
│ ├── Kanban board.whiteboard
│ ├── Letter.odt
│ ├── Meeting agenda.whiteboard
│ ├── Meeting notes.md
│ ├── Menu.odt
│ ├── Mindmap.odg
│ ├── Mind map.whiteboard
│ ├── Modern company.odp
│ ├── Mother's day.odt
│ ├── Nostalgia.odp
│ ├── Onboarding.odp
│ ├── Org chart.odg
│ ├── Party invitation.odt
│ ├── Photo book.odt
│ ├── Pitch deck.odp
│ ├── Product plan.md
│ ├── Readme.md
│ ├── Report.odt
│ ├── Resume.odt
│ ├── Security.odp
│ ├── Simple.odp
│ ├── Sticky notes.whiteboard
│ ├── Syllabus.odt
│ ├── Timeline.whiteboard
│ ├── Timesheet.ods
│ ├── Triangle.odp
│ ├── Venn diagram.whiteboard
│ └── Yellow idea.odp
└── Templates credits.md
4 directories, 64 files
So, as the above situation is arguably bloated and useful just for a demo, that is why, as workaround, I agree with the recommendation of customizing the Nextcloud skeleton in production.
If you agree, consider closing this issue. And I suggest moving efforts here, to easily override the skeleton for any need:
https://github.com/nextcloud/server/issues/35597