How to Force CyberPanel to Refresh Site Preview Thumbnail?

After some investigation, I noticed that the preview images in the CyberPanel website list are generated using microlink.io.

According to Microlink’s official documentation, you can control how often the screenshots are refreshed by adding the ttl parameter to the URL. This parameter defines how frequently Microlink should update the image instead of serving a cached version.

After testing, the value that worked best for me is ttl=86400000, which allows the thumbnail to be updated automatically every all days.

To apply this, simply edit line 97 of the following file:

/usr/local/CyberCP/websiteFunctions/templates/websiteFunctions/listWebsites.html

And make sure the thumbnail URL looks like this:

https://api.microlink.io/?url=https://{$ web.domain $}&screenshot=true&meta=false&embed=screenshot.url&ttl=86400000

Then, restart the CyberPanel service to apply the changes:

systemctl restart lscpd

With this adjustment, the preview image will automatically refresh every all days.

@usmannasir It would be great if this parameter could be included by default in future versions of CyberPanel, so automatic thumbnail refreshing is available out of the box without the need for manual changes. This would definitely be a valuable improvement for users.