How to change the install default directory /var to other directory?

due to my disk space is very low at /var , so I need to change the install default directory /var to /data

failed to register layer: open /var/www/discourse/node_modules/ace-builds/demo/kitchen-sink/docs/textile.textile: no space left on device

It might be easier and more of a standard approach to move your uploads and backups only to free up space. If you are using DigitalOcean:

1 Like

no, it is initial installation , I havn’t enough space on /var to use discourse-setup command to install a new discourse.

To me, if you don’t have enough space to install Discourse in the first place, there’s a larger problem at play here. Personally I would attempt to address that before trying to move it to a new directory.

Maybe it’s easy to do change the base directory. Someone else can weigh in if they’ve done it before. But personally I’d avoid an unconventional installation because it may just lead to unexpected issues.

1 Like