# Nuclear solution to self hosted n8n disk space growing and creating disk full problem

**URL:** <https://community.n8n.io/t/nuclear-solution-to-self-hosted-n8n-disk-space-growing-and-creating-disk-full-problem/226479>\
**Category:** Questions\
**Created:** [November 25, 2025, 4:41pm UTC](https://community.n8n.io/t/nuclear-solution-to-self-hosted-n8n-disk-space-growing-and-creating-disk-full-problem/226479 "2025-11-25T16:41:12Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Doug\_Collins](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/doug_collins/32/134317_2.png) [@Doug\_Collins](https://community.n8n.io/u/Doug_Collins)\
**Post date:** [November 25, 2025, 4:41pm UTC](https://community.n8n.io/t/nuclear-solution-to-self-hosted-n8n-disk-space-growing-and-creating-disk-full-problem/226479/1 "2025-11-25T16:41:13Z")

</div>

## DELETE FROM execution\_entity WHERE startedAt \< datetime(‘now’, ‘-100 hours’);

sqlite\> DELETE FROM execution\_data  
WHERE executionId NOT IN (SELECT id FROM execution\_entity);  
sqlite\> VACUUM;

Unless someone can show me otherwise n8n pruning is completely broken. I have given my evidence later in this post. If I didn’t no better I would think that this is a bug on purpose to limit the usefulness of self hosting. Certainly google shows MANY posts with people having uncontrolled n8n disk usage with no solution that works I could find.

In the meantime here in my NUCLEAR fix which I run in a crontab daily and works perfect.

Manual proof it works (for the technical sceptics like me)

root@srv1008667:/var/lib/docker/volumes/n8n\_data/\_data# sqlite3 database.sqlite “DELETE FROM execution\_data WHERE executionId NOT IN (SELECT id FROM execution\_entity);”  
root@srv1008667:/var/lib/docker/volumes/n8n\_data/\_data# ls -lh database.sqlite  
-rw-r–r-- 1 ubuntu ubuntu 3.3G Nov 25 07:55 database.sqlite  
root@srv1008667:/var/lib/docker/volumes/n8n\_data/\_data# sqlite3 database.sqlite “VACUUM;”  
root@srv1008667:/var/lib/docker/volumes/n8n\_data/\_data# ls -lh database.sqlite  
-rw-r–r-- 1 ubuntu ubuntu 762M Nov 25 07:55 database.sqlite

3.3GB down to less than 1GB 🙂 Nice.

To all my fellow IT professionals YES I KNOW I DIDN’T TAKE MY DOCKER N8N INSTANCE DOWN. Pruning live at worst case will cause access problems for log tables. But taking the db down forces inability to access. That’s my sloppy logic anyway lol.

How to configure the nuclear solution:

I am on hostinger so your path may vary:

40 4 \* \* \* sqlite3 /var/lib/docker/volumes/n8n\_data/\_data/database.sqlite “DELETE FROM execution\_entity WHERE id NOT IN (SELECT id FROM execution\_entity ORDER BY startedAt DESC LIMIT 1000); DELETE FROM execution\_data WHERE executionId NOT IN (SELECT id FROM execution\_entity); VACUUM;” 2\>&1 | logger -t n8n-prune

# Edit root’s crontab (since you need access to /var/lib/docker)

sudo crontab -e

# Add the line above, save and exit

Note: Alternate approach is time based purge: DELETE FROM execution\_entity WHERE startedAt \< datetime(‘now’, ‘-100 hours’);

EVIDENCE N8N IS BROKEN:

Here are my env settings via docker inspect just to prove i dont have some crazy syntax error in my yaml file:

docker inspect root-n8n-1 | grep -A 20 “Env”  
“Env”: [  
“N8N\_SMTP\_SSL=false”,  
“DB\_SQLITE\_VACUUM\_ON\_STARTUP=true”,  
“N8N\_SMTP\_USER=xxxxxxxxxxxxxxxxxx”,  
“N8N\_SMTP\_PASS=xxxxxxxxxxxxxxxx”,  
“EXECUTIONS\_DATA\_PRUNE=true”,  
“N8N\_SMTP\_PORT=587”,  
“N8N\_HOST=n8n.xxxxxxxxx.hstgr.cloud”,  
“EXECUTIONS\_DATA\_PRUNE\_MAX\_COUNT=1000”,  
“N8N\_EMAIL\_MODE=smtp”,  
“N8N\_PROTOCOL=https”,  
“NODE\_ENV=production”,  
“N8N\_SMTP\_SENDER=xxxxxxxx”,  
“WEBHOOK\_URL=[https://n8n.xxxxxxxxxx.hstgr.cloud/”](https://n8n.xxxxxxxxxx.hstgr.cloud/%E2%80%9D),  
“N8N\_PORT=5678”,  
“GENERIC\_TIMEZONE=America/Toronto”,  
“N8N\_SMTP\_STARTTLS=true”,  
“EXECUTIONS\_DATA\_MAX\_AGE=100”,  
“N8N\_SMTP\_HOST=[smtp.fastmail.com](http://smtp.fastmail.com)”,  
“PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin”,  
“NODE\_VERSION=22.21.0”,

All pruning options are being ignored as far as i can see. I have restarted the docker with no effect.

Docker logs show no pruning is even being attempted and I waited about 30 min before checking these logs:

root@srv1008667:/var/lib/docker/volumes/n8n\_data/\_data# docker logs -f root-n8n-1  
Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N\_ENFORCE\_SETTINGS\_FILE\_PERMISSIONS=true (recommended), or turn this check off set N8N\_ENFORCE\_SETTINGS\_FILE\_PERMISSIONS=false.  
Last session crashed  
Initializing n8n process  
n8n ready on ::, port 5678

There are deprecations related to your environment variables. Please take the recommended actions to update your configuration:

- DB\_SQLITE\_POOL\_SIZE → Running SQLite without a pool of read connections is deprecated. Please set `DB_SQLITE_POOL_SIZE` to a value higher than zero. See: [Database environment variables | n8n Docs](https://docs.n8n.io/hosting/configuration/environment-variables/database/#sqlite)
- N8N\_RUNNERS\_ENABLED → Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set `N8N_RUNNERS_ENABLED=true` to enable task runners now and avoid potential issues in the future. Learn more: [Task runners | n8n Docs](https://docs.n8n.io/hosting/configuration/task-runners/)
- N8N\_BLOCK\_ENV\_ACCESS\_IN\_NODE → The default value of N8N\_BLOCK\_ENV\_ACCESS\_IN\_NODE will be changed from false to true in a future version. If you need to access environment variables from the Code Node or from expressions, please set N8N\_BLOCK\_ENV\_ACCESS\_IN\_NODE=false. Learn more: [Security environment variables | n8n Docs](https://docs.n8n.io/hosting/configuration/environment-variables/security/)
- N8N\_GIT\_NODE\_DISABLE\_BARE\_REPOS → Support for bare repositories in the Git Node will be removed in a future version due to security concerns. If you are not using bare repositories in the Git Node, please set N8N\_GIT\_NODE\_DISABLE\_BARE\_REPOS=true. Learn more: [Security environment variables | n8n Docs](https://docs.n8n.io/hosting/configuration/environment-variables/security/)

[license SDK] Skipping renewal on init: license cert is not due for renewal  
Currently active workflows:

- Jarvis Personal (ID: fpSsLu462VHdqW9k)
- GHL Estimate Manager (ID: GMcZQqIDVTZHDtYm)
- Sync Facebook Lead Ads to Google Sheets & Salesforce CRM (ID: wbIDvlm87CmWojFC)
- Customer Chat STAGE SPLITTER (ID: 1o8gcAi3K5LtV6sU)
- Nano Banana Parallel Processing Sub Workflow (ID: eSyt8CBo21pCmlBt)  
Version: 1.119.2  
Start Active Workflows:  
Activated workflow “Jarvis Personal” (ID: fpSsLu462VHdqW9k)  
Activated workflow “GHL Estimate Manager” (ID: GMcZQqIDVTZHDtYm)  
Activated workflow “Sync Facebook Lead Ads to Google Sheets & Salesforce CRM” (ID: wbIDvlm87CmWojFC)  
Activated workflow “Customer Chat STAGE SPLITTER” (ID: 1o8gcAi3K5LtV6sU)  
Activated workflow “Nano Banana Parallel Processing Sub Workflow” (ID: eSyt8CBo21pCmlBt)

Editor is now accessible via:

> **[n8n.io - Workflow Automation](https://n8n.srv1008667.hstgr.cloud)**

SQLITE\_BUSY: database is locked  
SQLITE\_BUSY: database is locked  
Received request for unknown webhook: The requested webhook “POST 89530b2c-f575-4501-a0bc-82d6a3f48e6c” is not registered.  
Received request for unknown webhook: The requested webhook “POST 89530b2c-f575-4501-a0bc-82d6a3f48e6c” is not registered.  
Received SIGTERM. Shutting down…  
Deregistered all crons for workflow

Stopping n8n…  
Permissions 0644 for n8n settings file /home/node/.n8n/config are too wide. This is ignored for now, but in the future n8n will attempt to change the permissions automatically. To automatically enforce correct permissions now set N8N\_ENFORCE\_SETTINGS\_FILE\_PERMISSIONS=true (recommended), or turn this check off set N8N\_ENFORCE\_SETTINGS\_FILE\_PERMISSIONS=false.  
Initializing n8n process  
n8n ready on ::, port 5678

There are deprecations related to your environment variables. Please take the recommended actions to update your configuration:

- DB\_SQLITE\_POOL\_SIZE → Running SQLite without a pool of read connections is deprecated. Please set `DB_SQLITE_POOL_SIZE` to a value higher than zero. See: [Database environment variables | n8n Docs](https://docs.n8n.io/hosting/configuration/environment-variables/database/#sqlite)
- N8N\_RUNNERS\_ENABLED → Running n8n without task runners is deprecated. Task runners will be turned on by default in a future version. Please set `N8N_RUNNERS_ENABLED=true` to enable task runners now and avoid potential issues in the future. Learn more: [Task runners | n8n Docs](https://docs.n8n.io/hosting/configuration/task-runners/)
- N8N\_BLOCK\_ENV\_ACCESS\_IN\_NODE → The default value of N8N\_BLOCK\_ENV\_ACCESS\_IN\_NODE will be changed from false to true in a future version. If you need to access environment variables from the Code Node or from expressions, please set N8N\_BLOCK\_ENV\_ACCESS\_IN\_NODE=false. Learn more: [Security environment variables | n8n Docs](https://docs.n8n.io/hosting/configuration/environment-variables/security/)
- N8N\_GIT\_NODE\_DISABLE\_BARE\_REPOS → Support for bare repositories in the Git Node will be removed in a future version due to security concerns. If you are not using bare repositories in the Git Node, please set N8N\_GIT\_NODE\_DISABLE\_BARE\_REPOS=true. Learn more: [Security environment variables | n8n Docs](https://docs.n8n.io/hosting/configuration/environment-variables/security/)

[license SDK] Skipping renewal on init: license cert is not due for renewal  
Version: 1.119.2  
Start Active Workflows:  
Activated workflow “Jarvis Personal” (ID: fpSsLu462VHdqW9k)  
Activated workflow “GHL Estimate Manager” (ID: GMcZQqIDVTZHDtYm)  
Activated workflow “Sync Facebook Lead Ads to Google Sheets & Salesforce CRM” (ID: wbIDvlm87CmWojFC)  
Activated workflow “Customer Chat STAGE SPLITTER” (ID: 1o8gcAi3K5LtV6sU)  
Activated workflow “Nano Banana Parallel Processing Sub Workflow” (ID: eSyt8CBo21pCmlBt)

Editor is now accessible via:

> **[n8n.io - Workflow Automation](https://n8n.srv1008667.hstgr.cloud)**

- **n8n version: 1.119.2**
- **Database (default: SQLite): sqlite3**
- **n8n EXECUTIONS\_PROCESS setting (default: own, main):**
- **Running n8n via (Docker, npm, n8n cloud, desktop app): self hosted docker**
- **Operating system: ubuntu on hostinger**

---

<div class="post-metadata">

**Author:** ![gmmop](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/gmmop/32/85149_2.png) [@gmmop](https://community.n8n.io/u/gmmop)\
**Post date:** [November 26, 2025, 10:02am UTC](https://community.n8n.io/t/nuclear-solution-to-self-hosted-n8n-disk-space-growing-and-creating-disk-full-problem/226479/2 "2025-11-26T10:02:48Z")

</div>

We execute `database.sqlite "VACUUM;"` once per week, and the n8n SQLite database size remains stable at around 1 GB. With approximately 30,000 executions per week, I consider this result to be quite satisfactory.

---

<div class="post-metadata">

**Author:** ![Doug\_Collins](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/doug_collins/32/134317_2.png) [@Doug\_Collins](https://community.n8n.io/u/Doug_Collins)\
**Post date:** [November 26, 2025, 12:15pm UTC](https://community.n8n.io/t/nuclear-solution-to-self-hosted-n8n-disk-space-growing-and-creating-disk-full-problem/226479/3 "2025-11-26T12:15:11Z")

</div>

Thanks for the feedback. It is good to know it is working for some. Not sure why it is so much of a problem for many including myself. Anyway I posted this alternative for those struggling to get the proper way working.

---

<div class="post-metadata">

**Author:** ![Parintele\_Damaskin](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/parintele_damaskin/32/139243_2.png) [@Parintele\_Damaskin](https://community.n8n.io/u/Parintele_Damaskin)\
**Post date:** [November 26, 2025, 1:19pm UTC](https://community.n8n.io/t/nuclear-solution-to-self-hosted-n8n-disk-space-growing-and-creating-disk-full-problem/226479/4 "2025-11-26T13:19:50Z")

</div>

Nice workaround , but I prefer Postgres for production.

Why? … n8n suggest that in docs.

And never had any kind of issue… and hope it stays like that ! 🙂

Cheers!

---

<div class="post-metadata">

**Author:** ![system](https://dub1.discourse-cdn.com/n8n/user_avatar/community.n8n.io/system/32/195824_2.png) [@system](https://community.n8n.io/u/system)\
**Post date:** [February 24, 2026, 1:20pm UTC](https://community.n8n.io/t/nuclear-solution-to-self-hosted-n8n-disk-space-growing-and-creating-disk-full-problem/226479/5 "2026-02-24T13:20:11Z")

</div>

Closed on February 24, 2026, 1:20pm UTC

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
