How to replace HTTPS cert in router


How to replace HTTPS cert in router? I want to set my own HTTPS self-signed cert to access admin panel?

If you just want a self-signed cert for LuCI and you are using the default uhttpd web server, you just need the key and certificate (in DER format) to be placed as /etc/uhttpd.key and /etc/uhttpd.crt

If those two certificate files for uhttpd are missing, uhttpd will automatically regenerate them by using the parameters you have set in /etc/config/uhttpd. That has also happened on the first boot, so your current cert was generated with the default parameters.

So, easiest way to get your personal stuff into the self-signed cert is to

  • modify the parameters in /etc/config/uhttpd
  • delete old cert: rm /etc/uhttpd.*
  • restart uhttpd with /etc/init.d/uhttpd restart

...and you will have new cert that gives the details you have given

1 Like

Thank you very much!!! It seems to be a solution!

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