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
{{ message }}
Repository navigation
Allow certificates to be automatically re-read when they are updated #2823
Issue: when ssl certificates are replaced (like letsencrypt) in order for rclone to use those new certificates, rclone would need to be restarted. This enhancement would be to have that file either reread automatically or allow it to be programatically told to re-read via the rc remote control daemon process so that there would be no need to restart rclone.
Letsencrypt certificates get replaced more frequently than 1yr or 2yr certificates so this would help here.
changed the title [-]All certificates to be automatically re-read when they are updated[/-][+]Allow certificates to be automatically re-read when they are updated[/+]on Dec 8, 2018
So that others have an easier time finding this to +1 it, I'm going to explain it with some keyword-heavy language since it took me ~6 months of looking around online to finally find this issue:
rclone stops serving images after a few weeks to a month and starts giving the error:
This is due to the fact that rclone does not pick up the new certificates when ssl certificates are renewed, causing the expired and out-of-date certificate to be served, resulting in broken images.
To fix this, you generally have to restart rclone every so often.
Nope. I know just enough to sound like I know more than I do. :) I wouldn't even remotely have the expertise to be able to fix it.
However, I will help out future viewers by giving them a bandage that I cobbled together from various places:
First, create a systemd service: sudo vim /etc/systemd/system/your_service_name.service
Next, paste this in and edit where indicated:
[Unit]
Description=Rclone VFS Mount <OR YOUR DESCRIPTION HERE>
After=network-online.target
[Service]
User=root <OR YOUR SPECIFIC RCLONE USER HERE>
Group=root <OR YOUR SPECIFIC RCLONE GROUP HERE>
Type=simple
ExecStartPre=/bin/sleep 10
ExecStart=/usr/bin/rclone serve http <YOUR RCLONE PARAMS HERE>
--log-level INFO \
--log-file /opt/rclone.log
Restart=on-failure
RestartSec=5
RuntimeMaxSec=1d
LimitNOFILE=infinity
[Install]
WantedBy=default.target
Then start your service: sudo systemctl start your_service_name
Or, if you want it to always start on boot, enable your service: sudo systemctl enable your_service_name
The Restart=on-failure plus RuntimeMaxSec=1d will make it so that rclone restarts every day, picking up the new certificates. Feel free to adjust the interval to whatever you want.
Activity
[-]All certificates to be automatically re-read when they are updated[/-][+]Allow certificates to be automatically re-read when they are updated[/+]ivandeex commentedon Nov 16, 2020
rclone could either re-read certs on SIGHUP or honor new flag
--certs-poll-interval=xxxRonnocerman commentedon Mar 17, 2023
So that others have an easier time finding this to +1 it, I'm going to explain it with some keyword-heavy language since it took me ~6 months of looking around online to finally find this issue:
rclone stops serving images after a few weeks to a month and starts giving the error:
{date} {time} http: TLS handshake error from {ip}:{port}: remote error: tls: unknown certificate
This is due to the fact that rclone does not pick up the new certificates when ssl certificates are renewed, causing the expired and out-of-date certificate to be served, resulting in broken images.
To fix this, you generally have to restart rclone every so often.
ncw commentedon Mar 17, 2023
Thanks @Ronnocerman .
Fancy having a go at a fix?
Ronnocerman commentedon Mar 17, 2023
Nope. I know just enough to sound like I know more than I do. :) I wouldn't even remotely have the expertise to be able to fix it.
However, I will help out future viewers by giving them a bandage that I cobbled together from various places:
First, create a systemd service:
sudo vim /etc/systemd/system/your_service_name.serviceNext, paste this in and edit where indicated:
Then start your service:
sudo systemctl start your_service_nameOr, if you want it to always start on boot, enable your service:
sudo systemctl enable your_service_nameThe
Restart=on-failureplusRuntimeMaxSec=1dwill make it so that rclone restarts every day, picking up the new certificates. Feel free to adjust the interval to whatever you want.