[GH-ISSUE #2998] Help with Log Settings #2047

Open
opened 2026-02-26 07:33:49 +03:00 by kerem · 9 comments
Owner

Originally created by @lucassvasconcelos on GitHub (Jun 13, 2023).
Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2998

Some log settings in NPM are not very clear to me, as the project's documentation doesn't provide any information about them. I've searched around and found out that the logs are located in files within the "data/logs" folder.

I would like to have a better understanding of how these files are managed to avoid compromising the disk capacity of my server. Additionally, I'm curious to know if it's possible to change the logging mode.

Here are the summarized questions regarding my doubts:

By default, NPM write files for each proxy host. Are these files deleted after a certain period of time?

Is it possible to stop writing these files? If so, is there a way to have all these logs written to the container's console?

Originally created by @lucassvasconcelos on GitHub (Jun 13, 2023). Original GitHub issue: https://github.com/NginxProxyManager/nginx-proxy-manager/issues/2998 Some log settings in NPM are not very clear to me, as the project's documentation doesn't provide any information about them. I've searched around and found out that the logs are located in files within the "data/logs" folder. I would like to have a better understanding of how these files are managed to avoid compromising the disk capacity of my server. Additionally, I'm curious to know if it's possible to change the logging mode. Here are the summarized questions regarding my doubts: By default, NPM write files for each proxy host. Are these files deleted after a certain period of time? Is it possible to stop writing these files? If so, is there a way to have all these logs written to the container's console?
Author
Owner

@molenear commented on GitHub (Jun 13, 2023):

In the docker config, under volumes, change the line

  • ./data:/data
    to
  • ./data:/someotherfolder

Then make sure that other folder is on a different partition than the OS.

<!-- gh-comment-id:1589999854 --> @molenear commented on GitHub (Jun 13, 2023): In the docker config, under volumes, change the line - ./data:/data to - ./data:/someotherfolder Then make sure that other folder is on a different partition than the OS.
Author
Owner

@lucassvasconcelos commented on GitHub (Jun 16, 2023):

In the docker config, under volumes, change the line

  • ./data:/data
    to
  • ./data:/someotherfolder

Then make sure that other folder is on a different partition than the OS.

Thank you for the response!

Okay, that's fine! That would solve the disk space issue on the main OS. However, I would still need to manage the deletion of files on the other partition.

Is there any way to stop writing files and display the logs on the container's console?

<!-- gh-comment-id:1594707374 --> @lucassvasconcelos commented on GitHub (Jun 16, 2023): > In the docker config, under volumes, change the line > > * ./data:/data > to > * ./data:/someotherfolder > > Then make sure that other folder is on a different partition than the OS. Thank you for the response! Okay, that's fine! That would solve the disk space issue on the main OS. However, I would still need to manage the deletion of files on the other partition. Is there any way to stop writing files and display the logs on the container's console?
Author
Owner

@Temetra commented on GitHub (Jul 15, 2023):

Is there any way to stop writing files and display the logs on the container's console?

Nginx doesn't seem to like changing access_log when it's already set. I'm working around it by making a copy of the proxy_host.conf template, and overriding the container version using volumes:

volumes:
  - ./proxy_host.conf:/app/templates/proxy_host.conf

You'll need to refresh your proxy .conf files after restarting your container. You can do this by disabling, and re-enabling the proxy hosts.

<!-- gh-comment-id:1636896233 --> @Temetra commented on GitHub (Jul 15, 2023): > Is there any way to stop writing files and display the logs on the container's console? Nginx doesn't seem to like changing `access_log` when it's already set. I'm working around it by making a copy of the proxy_host.conf template, and overriding the container version using volumes: ``` volumes: - ./proxy_host.conf:/app/templates/proxy_host.conf ``` You'll need to refresh your proxy .conf files after restarting your container. You can do this by disabling, and re-enabling the proxy hosts.
Author
Owner

@hirenshah commented on GitHub (Oct 9, 2023):

@Temetra Thanks for the details. I wanted to disable access_log and name the error_log by server_name rather than some arbitrary database index. Whilst the workaround isn't ideal, it seems to be the best workaround available :)

<!-- gh-comment-id:1753917328 --> @hirenshah commented on GitHub (Oct 9, 2023): @Temetra Thanks for the details. I wanted to disable access_log and name the error_log by server_name rather than some arbitrary database index. Whilst the workaround isn't ideal, it seems to be the best workaround available :)
Author
Owner

@Geczy commented on GitHub (Jan 6, 2024):

you can simply do this, it works because advanced_config comes after the access_log entry in the proxy_host.conf file, so the latter takes precedence

unfortunately i found this out by moving a high volume server to NPM and waking up to the server being disabled from completely filling up my storage space

https://github.com/NginxProxyManager/nginx-proxy-manager/assets/1036968/c7a8f164-b175-4c69-930b-fc63c9cad1cf

<!-- gh-comment-id:1879686670 --> @Geczy commented on GitHub (Jan 6, 2024): you can simply do this, it works because advanced_config comes after the access_log entry in the proxy_host.conf file, so the latter takes precedence unfortunately i found this out by moving a high volume server to NPM and waking up to the server being disabled from completely filling up my storage space https://github.com/NginxProxyManager/nginx-proxy-manager/assets/1036968/c7a8f164-b175-4c69-930b-fc63c9cad1cf
Author
Owner

@github-actions[bot] commented on GitHub (Jul 23, 2024):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:2244103455 --> @github-actions[bot] commented on GitHub (Jul 23, 2024): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@JeffChien commented on GitHub (Feb 18, 2025):

I have the same need, I add settings to /data/nginx/custom/server_proxy.conf to turn off the all access log, to much access log can easily kill my raspberry pi's SD card

<!-- gh-comment-id:2666420141 --> @JeffChien commented on GitHub (Feb 18, 2025): I have the same need, I add settings to `/data/nginx/custom/server_proxy.conf` to turn off the all access log, to much access log can easily kill my raspberry pi's SD card
Author
Owner

@github-actions[bot] commented on GitHub (Sep 12, 2025):

Issue is now considered stale. If you want to keep it open, please comment 👍

<!-- gh-comment-id:3283380882 --> @github-actions[bot] commented on GitHub (Sep 12, 2025): Issue is now considered stale. If you want to keep it open, please comment :+1:
Author
Owner

@Svznify commented on GitHub (Sep 28, 2025):

👍

<!-- gh-comment-id:3342713955 --> @Svznify commented on GitHub (Sep 28, 2025): 👍
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/nginx-proxy-manager-NginxProxyManager#2047
No description provided.