Single User Disk Quotas

Is there a method to apply a disk quota to a user that differs from their hosting package?

Use case: A client purchases web hosting with 10GB of disk space - good enough for 90% of clients. Said client finds themselves in need of a 10GB bump but doesn’t want to upgrade to the next plan, which includes way more “other stuff” (and cost) that they don’t need/want.

In cPanel, this is done with Metric Billing for additional disk space. In Hestia, I was simply going to change the few users here-and-there and bump their quota.

Workaround: Create an identical hosting package and modify the disk quota to reflect the increase. This is a downer if you have 11 packages and offer +5, +10, and +20GB increases. Suddenly you’re faced with maintaining 44 packages.

Maybe I am blind and cannot find it in the UI or the correct CLI reference. Any help is welcome!

Hestia doesn’t support this feature natively, but you can manually modify the user configuration.

For example, if the username is test and you want to change the disk quota to 10 GB:

sed -i -E "s/DISK_QUOTA='[^']+'/DISK_QUOTA='10240'/" /usr/local/hestia/data/users/test/user.conf
v-update-user-quota test

That will preserve the disk quota for the user even if you rebuild the user. However, you cannot modify the package assigned to the user. If you modify the package, the disk quota will be reset to the default quota defined in that package because editing a package triggers the script v-update-user-package PackageName, which reapplies the package quota to the user.

2 Likes