Skip to content

Conversation

@rumansaleem
Copy link

@rumansaleem rumansaleem commented Mar 8, 2025

Closes #1618 & #1911

  • Adds a PUT API to update certificate data (using only nice_name for now). The method to call this API already existed in client-side.
  • Updates the existing Form UI & Logic:
    • Conditionally calls updating or creating a certificate.
    • Makes certificates non-required in case of editing
    • Existing API call to upload files to existing certificate, replaces the existing files, in case files already exists.

Screenshots

image
Edit Menu (only for custom certificates)

image
Edit Form (re-uses existing form)

@rumansaleem rumansaleem force-pushed the feature/edit-custom-certificates branch from ad1f773 to 6c9531e Compare March 8, 2025 20:43
@rumansaleem rumansaleem marked this pull request as ready for review March 9, 2025 17:42
@rumansaleem
Copy link
Author

Hey @jc21 can you please review this PR?

@asmwp
Copy link

asmwp commented May 26, 2025

I have tried to use this version of NPM and pulled the docker image. When running this in Docker on Ubuntu using Firefox 138.0.4 (64-bit) when I go to add an SSL and select 'Custom' I get javascript errors 'InternalError: too much recursion - in main.bundle.js related to this line isNew http://0.0.0.0:81/js/17.bundle.17.js?v=2.12.3:1'. Have tried clearing cache etc, no good.

@rumansaleem
Copy link
Author

hey @asmwp thanks for looking at this. I will look into this and get back with the fix.

@rumansaleem
Copy link
Author

rumansaleem commented May 31, 2025

I've fixed the issue, I thought this.isNew() inside a template function would refer to model function (new to backbone.js 😅). Fixed by directly checking id. Create and Edit both features seems to work as expected now.

@asmwp can you have another look?

@asmwp
Copy link

asmwp commented May 31, 2025

I didn't think it was working earlier but it was me being an idiot! I can confirm that this now works as expected in both Chrome and Firefox on Ubuntu.

@rjblake
Copy link

rjblake commented Jun 12, 2025

nginxproxymanager/nginx-proxy-manager-dev:pr-4425

Same for me. Don't forget to clear your cache/empty cache & hard reload. You'll see the Edit option after that. Much appreciated @rumansaleem

Zoey2936 added a commit to ZoeyVid/NPMplus that referenced this pull request Jun 27, 2025
Zoey2936 added a commit to ZoeyVid/NPMplus that referenced this pull request Jun 27, 2025
…by @rumansaleem)

Co-Authored-By: Ruman Saleem <ruman63@gmail.com>
@rjblake
Copy link

rjblake commented Jul 25, 2025

Any plans to merge this into the master branch?

@ThatOhio
Copy link

Would love to see this deployed! Would prefer to not have to change my docker image for this feature.

@derRichter
Copy link

+1

@jstack01
Copy link

jstack01 commented Oct 7, 2025

My knowledge is limited on how the code works. Is there a way that I can update the certificate files without using the web interface? I know I can simply replace the files in /data/custom_ssl/npm-#/ however, this does not update the expire date on the web interface. Long stories short, I would like to create a script that updates the cert files and updates the "Expires" date on the web interface without manual intervention.

Shown below is a screenshot of what I am referring to. The cert that is there has been renewed but it is showing as expired on the web interface.
Screenshot 2025-10-07 114439

@rjblake
Copy link

rjblake commented Oct 7, 2025

My knowledge is limited on how the code works. Is there a way that I can update the certificate files without using the web interface? I know I can simply replace the files in /data/custom_ssl/npm-#/ however, this does not update the expire date on the web interface. Long stories short, I would like to create a script that updates the cert files and updates the "Expires" date on the web interface without manual intervention.

Shown below is a screenshot of what I am referring to. The cert that is there has been renewed but it is showing as expired on the web interface. Screenshot 2025-10-07 114439

The expiry dates are all stored in a database (either sqlite, or Mariadb, etc. depending on how you set it up). You'd need to updated the records in the db to do so. There is more detail here. Alternatively, just install the version mentioned in this post and you can do it all through the nginx UI.

@rjblake
Copy link

rjblake commented Oct 7, 2025

@rumansaleem - do you know what checks are failing? Seems this commit cannot be built as per Jenkins. Would love to see this in the base release.

@rumansaleem
Copy link
Author

Hey @rjblake Haven't checked this in a while seems like some recent failure, I'll check and get back on this.

@rumansaleem rumansaleem force-pushed the feature/edit-custom-certificates branch from 7a0a1e5 to b9bf340 Compare October 15, 2025 14:17
@rumansaleem
Copy link
Author

rumansaleem commented Oct 15, 2025

Hey @rjblake seems like I'd need login credentials to be able to access the jenkins build logs. But I've updated this branch with latest develop branch. Hope it resolves the error.

@nginxproxymanagerci
Copy link

Docker Image for build 6 is available on DockerHub:

nginxproxymanager/nginx-proxy-manager-dev:pr-4425

Note

Ensure you backup your NPM instance before testing this image! Especially if there are database changes.
This is a different docker image namespace than the official image.

Warning

Changes and additions to DNS Providers require verification by at least 2 members of the community!

@fhennig42
Copy link

I'm also interested in getting this feature.

@jc21
Copy link
Member

jc21 commented Nov 3, 2025

Looks good, this is commonly requested. The React branch has been merged and changed a lot of things. Backend only received a code refresh, nothing changed functionality wise.

Frontend is a different story though..

@rjblake
Copy link

rjblake commented Nov 4, 2025

Looks good, this is commonly requested. The React branch has been merged and changed a lot of things. Backend only received a code refresh, nothing changed functionality wise.

Frontend is a different story though..

Yeah, pity it wasn't included in 2.12.4 back in July, then could have been updated to fit with Frontend changes. Guess it'll be another year to see it possibly merged into the master :(

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Allow update custom existing SSL Certificate

8 participants