<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Limit Disk size for Apps]]></title><description><![CDATA[<p dir="auto">Cloudron already lets me dial in memory and CPU per app (<code>memoryLimit</code>, <code>cpuQuota</code> in the app record, enforced via the container runtime). The missing third resource is disk.</p>
<h2>The problem</h2>
<p dir="auto">A single misbehaving app, a runaway log, a chat server caching media or a user accidentally uploading the Kimi 3 Weights in your Nextcloud instance can fill the entire data disk and take down every app on Cloudron. Currently, the only mitigations are reactive: the low-disk email notification, or manually moving an app to its own volume. There is no way to say "this app gets 20 GB, period" the way I can say "this app gets 2 GB of RAM".</p>
<h2>Why I believe this is very feasible on Cloudron specifically</h2>
<p dir="auto">App container root filesystems are read-only; effectively all growable app disk usage lives in the bind-mounted <code>appsdata</code> directory (<code>/app/data</code>) plus tmpfs mounts that are already size-capped. So "limit disk for an app" reduces to "put a quota on one directory tree" — and the platform already has the key ingredient: volumes mounted as XFS are already mounted with <code>pquota</code> (project quotas) by box today (<code>src/mounts.js</code>). ext4 supports the same via <code>prjquota</code>.</p>
<h2>Concrete proposal</h2>
<ol>
<li>Add a <code>diskQuota</code> field per app, alongside <code>memoryLimit</code> and <code>cpuQuota</code>, exposed in the same App → Resources UI (slider/input, <code>0</code> = unlimited, sensible default unlimited so nothing changes for existing installs).</li>
<li>Enforce it with a filesystem project quota on the app's <code>appsdata</code> directory:
<ul>
<li>assign each app a project ID (e.g. derived from the app id),</li>
<li><code>xfs_quota -x -c 'project -s …' / 'limit -p bhard=20g …'</code> on XFS, <code>chattr -p</code> + <code>setquota -P</code> on ext4.</li>
</ul>
</li>
<li>When the quota is hit, the app gets <code>ENOSPC</code> inside <code>/app/data</code>, exactly what it would see on a full disk, but scoped to that app. Every other app and the platform keep running.</li>
<li>Surface it in the dashboard: show per-app usage vs. quota (the disk-usage numbers are already collected per app today), and fire the existing notification path at e.g. 80%.</li>
<li>Docs note for the root-disk case: project quotas need the mount option (<code>pquota</code>/<code>prjquota</code>); where the root filesystem can't provide it, the setting could simply be unavailable (same pattern as features that depend on the underlying storage).</li>
</ol>
<p dir="auto">Out of scope / non-goals</p>
<ul>
<li>No need to touch Docker <code>--storage-opt</code> (it doesn't cover bind mounts and has backing-filesystem constraints anyway). The bind-mount quota is the better layer.</li>
<li>Databases live in the shared service containers (PostgreSQL/MySQL addons), so this targets file storage; that's fine. File data (media, uploads, logs, caches) is what actually fills disks in practice.</li>
</ul>
<p dir="auto">This would complete the resource-isolation story: RAM, CPU, and disk, all per-app, all from the dashboard.</p>
]]></description><link>https://forum.cloudron.io/topic/15735/limit-disk-size-for-apps</link><generator>RSS for Node</generator><lastBuildDate>Thu, 06 Aug 2026 13:43:12 GMT</lastBuildDate><atom:link href="https://forum.cloudron.io/topic/15735.rss" rel="self" type="application/rss+xml"/><pubDate>Mon, 27 Jul 2026 16:30:35 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Limit Disk size for Apps on Mon, 27 Jul 2026 17:58:54 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: James">@<bdi>James</bdi></a> Thank you!</p>
]]></description><link>https://forum.cloudron.io/post/127264</link><guid isPermaLink="true">https://forum.cloudron.io/post/127264</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Mon, 27 Jul 2026 17:58:54 GMT</pubDate></item><item><title><![CDATA[Reply to Limit Disk size for Apps on Mon, 27 Jul 2026 17:56:27 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a></p>
<p dir="auto">On <code>1.</code>:<br />
I see your point there.<br />
Maybe that is doable.</p>
<p dir="auto">On <code>3.</code>:<br />
Could maybe even be fully automated.<br />
Click an app, enable storage limitation, set the size, Cloudron creates the loopback device, moves the data etc.<br />
When 'resizing' the storage limit, stop app, edit loopback device or create new, move data and so on.</p>
<p dir="auto">Something to think about.</p>
]]></description><link>https://forum.cloudron.io/post/127263</link><guid isPermaLink="true">https://forum.cloudron.io/post/127263</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 27 Jul 2026 17:56:27 GMT</pubDate></item><item><title><![CDATA[Reply to Limit Disk size for Apps on Mon, 27 Jul 2026 17:47:20 GMT]]></title><description><![CDATA[<p dir="auto">I just pondered how kubernetes does enforce limits and asked Claude.</p>
<blockquote>
<p dir="auto">On a plain single-partition ext4 root with no quotas and a hostPath/local-style backing, Kubernetes does not enforce the capacity at all.<br />
The capacity field is a scheduling/matching hint, not an enforcement mechanism. It's used by the scheduler for binding a PVC to a PV and for capacity-aware scheduling. Nothing in core Kubernetes watches a directory and stops writes when it exceeds the number. A hostPath or local PV of "5Gi" will happily fill the whole disk.<br />
Actual enforcement comes from the CSI driver / storage backend, not from Kubernetes or Docker. Where a size limit is real, it's because the underlying storage provides a real boundary:</p>
<ul>
<li>Block-based volumes (AWS EBS, GCE PD, Ceph RBD, iSCSI LUNs, LVM logical volumes): the volume is a block device of exactly N GiB, formatted with a filesystem. You physically cannot write past the device size. This is the common, reliable case.</li>
<li>Network filesystems (NFS, CephFS): enforcement depends on the backend's own quota support; often it's not enforced.</li>
</ul>
</blockquote>
<p dir="auto">Aha!<br />
That explains why the storage limitation never worked for me when I tinkered with k8s/k3s and just used local storage volumes on my plain ext4 linux.</p>
]]></description><link>https://forum.cloudron.io/post/127262</link><guid isPermaLink="true">https://forum.cloudron.io/post/127262</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 27 Jul 2026 17:47:20 GMT</pubDate></item><item><title><![CDATA[Reply to Limit Disk size for Apps on Mon, 27 Jul 2026 17:46:29 GMT]]></title><description><![CDATA[<p dir="auto"><a class="plugin-mentions-user plugin-mentions-a" href="/user/james" aria-label="Profile: james">@<bdi>james</bdi></a> Thanks for the link, I actually didn't know that guide existed. It's essentially the manual version of what I'm asking for, which makes the request much smaller than it first sounds.</p>
<p dir="auto">And agreed on all the root filesystem points. Retrofitting <code>prjquota</code> onto a mounted <code>/</code> is exactly the part I would not ask for. That's why I'd frame this as a capability-gated feature rather than a platform-wide guarantee:</p>
<ol>
<li>
<p dir="auto">Where it works today, expose it. Cloudron already mounts XFS volumes with <code>pquota</code> (that's in <code>src/mounts.js</code>), and the guide shows the rest is just project ID assignment plus <code>xfs_quota limit</code>. So for any app whose data directory lives on an XFS volume, everything needed is already in place. Box would just need to do those steps itself and show a quota field in App → Resources. No fstab edits, no GRUB, no installer changes.</p>
</li>
<li>
<p dir="auto">Where it doesn't, grey it out. Apps on an ext4 root without quota support simply don't get the setting, with a hint like "move this app's data to an XFS volume to enable disk limits". Same pattern as other storage-dependent features. Existing systems stay untouched, so none of the catastrophic-failure scenarios you describe can happen.</p>
</li>
<li>
<p dir="auto">Optional fs-agnostic fallback (later, if ever). A per-app loopback image (fixed-size file, mounted as the app's data dir) gives a hard cap on any backing filesystem with no quota support at all, at the cost of pre-allocation and a resize step. Debatable whether it's worth the complexity, but it's the escape hatch that doesn't touch <code>/</code> either.</p>
</li>
</ol>
<p dir="auto">So the ask shrinks to: dashboard field, project ID assignment, and <code>xfs_quota limit</code> on storage that already supports it. The hard cases stay manual or unsupported, just like today. But the common case of an app on an XFS volume becomes a slider instead of a shell session.</p>
]]></description><link>https://forum.cloudron.io/post/127261</link><guid isPermaLink="true">https://forum.cloudron.io/post/127261</guid><dc:creator><![CDATA[andreasdueren]]></dc:creator><pubDate>Mon, 27 Jul 2026 17:46:29 GMT</pubDate></item><item><title><![CDATA[Reply to Limit Disk size for Apps on Mon, 27 Jul 2026 17:32:57 GMT]]></title><description><![CDATA[<p dir="auto">Hello <a class="plugin-mentions-user plugin-mentions-a" href="/user/andreasdueren" aria-label="Profile: andreasdueren">@<bdi>andreasdueren</bdi></a></p>
<p dir="auto">Just leaving the guide for XFS here as well: <a href="https://docs.cloudron.io/guides/per-app-storage-limit#external-xfs-block-storage-with-project-quotas" target="_blank" rel="noopener noreferrer nofollow ugc">https://docs.cloudron.io/guides/per-app-storage-limit#external-xfs-block-storage-with-project-quotas</a></p>
<hr />
<p dir="auto">For using <code>quota</code> and <code>setquota</code> the <code>/etc/fstab</code> needs to be edited if not the root partition needs this.<br />
AFAIK most Ubuntu systems from Cloud providers just use the one partition layout.</p>
<p dir="auto">Like this:</p>
<pre><code>blkid
/dev/sdb: LABEL="linode-swap" UUID="f1408ea6-59a0-11ed-bc9d-525400000001" TYPE="swap"
/dev/sda: LABEL="linode-root" UUID="1d04c97f-e790-1364-de89-d53605b5d7aa" BLOCK_SIZE="4096" TYPE="ext4"
</code></pre>
<p dir="auto">On modern Ubuntu, <code>/</code> (root) is mounted early, so instead of <code>/etc/fstab</code> the options for the kernel command line need to be added via GRUB (<code>rootflags=usrquota,grpquota</code>) or use <code>systemd</code>. <code>ext4</code> also supports quotas as a built-in feature (<code>tune2fs -O quota -Q prjquota /dev/sdXN</code>), which stores quota in hidden inodes and doesn't strictly need the <code>fstab</code> mount options, but can't be used for <code>/</code>, which is problematic again.</p>
<p dir="auto">But also to enable this for <code>/</code> you need to offline edit the disk/partition with e.g.: a recovery boot for root, since you can't unmount <code>/</code>.</p>
<p dir="auto">All this makes it a bigger issue for existing Cloudron systems where we should not edit users <code>/etc/fstab</code> file, tinker with GRUB or simply can't even live-boot to edit the disk/partition.<br />
This could lead to catastrophic failures.</p>
<p dir="auto">Not to mention how to handle this when installing Cloudron.<br />
It currently is a BASH script. We would need to rethink the whole 'install Cloudron' way to ensure these requirenments are checked.<br />
Just hypothetical, but when doing all that, why not use XFS directly.<br />
But all this makes Cloudron way more complex then just running a bash script to install Cloudron.</p>
]]></description><link>https://forum.cloudron.io/post/127259</link><guid isPermaLink="true">https://forum.cloudron.io/post/127259</guid><dc:creator><![CDATA[james]]></dc:creator><pubDate>Mon, 27 Jul 2026 17:32:57 GMT</pubDate></item></channel></rss>