You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/operations.md
+10-6Lines changed: 10 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,17 @@ The server handles `SIGTERM` and `CTRL-C` (SIGINT). On receipt, it:
21
21
22
22
### Log Rotation
23
23
24
-
> **Important:** LDK Server does not rotate or truncate its own log file. Without log rotation
25
-
> configured, the log file will grow indefinitely and can eventually fill your disk. A full
26
-
> disk can prevent the node from persisting channel state, risking fund loss.
24
+
By default, LDK Server logs to `stdout`/`stderr` and also to file. When running under `systemd` or Docker,
25
+
this allows the environment (e.g., `journald`) to handle persistence, rotation, and
26
+
compression automatically.
27
27
28
-
The server reopens its log file on `SIGHUP`. This integrates with standard `logrotate`. Save
29
-
the following config to `/etc/logrotate.d/ldk-server` (adjust the log path to match your
30
-
setup):
28
+
If you enable `log_to_file` in the configuration, LDK Server writes logs to the configured file while still
29
+
keeping the `stdout`/`stderr` logs available too. Logs files are automatically rotated at `max_size_mb` or `rotation_interval_hours`, and the last `max_files` uncompressed log files are retained. But you can disable
30
+
the internal rotation and keep logging to file by setting the `max_size_mb` and `rotation_interval_hours`
31
+
params to `0`.
32
+
33
+
If you prefer to use system `logrotate` for file logs, the server still reopens its log file on `SIGHUP`. Save
34
+
the following config to `/etc/logrotate.d/ldk-server` (adjust the log path to match your setup):
0 commit comments