AndyBr encountered insufficient disk space on a 25GB DigitalOcean droplet while attempting to upgrade Discourse, despite following cleanup steps like ./launcher cleanup and deleting backups. Initial diagnostics showed 3.0GB free, later improving to 6.2GB after cleanup, but still insufficient for rebuild. Community members suggested checking Docker usage, pruning volumes, removing unused snaps, and clearing apt cache. Disk usage analysis revealed Docker’s overlay2 directory consumed ~13GB, with individual layers totaling 8.7GB, 2.8GB, and 873MB. Falco identified dangling Docker layers as the culprit, referencing a StackOverflow guide. After taking a snapshot for safety, AndyBr deleted one large overlay layer, freeing enough space to successfully complete the upgrade. Others noted that 25GB is increasingly tight for Discourse due to Docker overhead and recommended upgrading to 50GB or moving media to S3. Suggestions included removing unused snaps (like lxd, core18, core20) and considering a fresh instance. The consensus: while 25GB may suffice for minimal setups, it’s borderline and prone to failure without careful management.
I have a 25g droplet, which Discourse claims should be big enough, but I cannot do the upgrade to the latest version as I’ve run out of storage. My forum is very small with very little traffic.
I ran./launcher cleanupand even deleted old backups, but still no joy.
What can I do?
root@DO-Discourse:/var/discourse# ./launcher rebuild app
x86_64 arch detected.
WARNING: We are about to start downloading the Discourse base image
This process may take anywhere between a few minutes to an hour, depending on your network speed
Please be patient
2.0.20220224-2005: Pulling from discourse/base
5eb5b503b376: Pull complete
35b2f73fc27b: Pull complete
44526e3ec669: Pull complete
Digest: sha256:8a8bb9525882220196c0faa8ce95c62a7fb607fc203d4247b3d5985f3ca9c3d8
Status: Downloaded newer image for discourse/base:2.0.20220224-2005
docker.io/discourse/base:2.0.20220224-2005
You have less than 5GB of free space on the disk where /var/lib/docker is located. You will need more space to continue
Filesystem Size Used Avail Use% Mounted on
/dev/vda1 25G 22G 3.0G 88% /
Would you like to attempt to recover space by cleaning docker images and containers in the system? (y/N)y
If the cleanup was successful, you may try again now
root@DO-Discourse:/var/discourse#
As I said earlier, did that already, a few times, actually.
I had read that discourse needs 20 - 30gb ideally. I have 25gb so it’s odd that it should need more. Have the requirements changed?
It’s surprising how quickly my DO sandbox site grows as I play around.
If you are having problems now you may just be able to delete enough to get Discourse to upgrade, but next time the database will be a little bigger and you may have more media.
If you do have lots of media moving to S3 storage will free space if not a droplet resize may be your only option.
On DO the AMD droplet is supposed to be way better … not my benchmarks (I read it on the internet ) - here
root@DO-Discourse:/var/discourse# apt autoremove --purge
Reading package lists… Done
Building dependency tree
Reading state information… Done
0 upgraded, 0 newly installed, 0 to remove and 94 not upgraded.
root@DO-Discourse:/var/discourse#
to find out where the space is being used. If, for example, the majority is under /usr, you can repeat with
du -h -s /usr/* | sort -h -r
and so on. With any luck, that’ll lead to some big thing(s) that can be cleared but obviously don’t delete anything without an understanding of what it is - i.e. don’t delete anything unless you’re certain it’s safe to do so.