Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Bookmarks
  • Search
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo

Cloudron Forum

Apps - Status | Demo | Docs | Install
  1. Cloudron Forum
  2. Discuss
  3. API for SSL certificate per domain

API for SSL certificate per domain

Scheduled Pinned Locked Moved Discuss
4 Posts 2 Posters 10 Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • potemkin_aiP Offline
    potemkin_aiP Offline
    potemkin_ai
    wrote last edited by
    #1

    Cloudron currently allows to manage SSL certificates per app, but not per domain - could you please, implement that endpoint as well, please?

    As Wildcard domains are now becoming a shorter period of life, manual management is quite troublesome.

    1 Reply Last reply
    0
    • potemkin_aiP Offline
      potemkin_aiP Offline
      potemkin_ai
      wrote last edited by
      #2

      I believe the API is actually there (as I can change the certificate via the Dashboard), but it's not documented? If so - could you possibly share the correct structure, please?

      1 Reply Last reply
      0
      • potemkin_aiP Offline
        potemkin_aiP Offline
        potemkin_ai
        wrote last edited by potemkin_ai
        #3

        I did some reverse engineering - here is the bash, for anyone curious:

        DOMAIN="mysuper-domain.com"
        TOKEN="bla-bla" #cloudron's token
        cd /var/db/acme/certs/*.${DOMAIN}_ecc
        
        CERT=$(awk 'NF {printf "%s\\n", $0}' fullchain.cer)
        KEY=$(awk 'NF {printf "%s\\n", $0}' "*.${DOMAIN}.key")
        
        curl -X POST "https://my.${DOMAIN}/api/v1/domains/${DOMAIN}/config" \
          -H "Authorization: Bearer $TOKEN" \
          -H "Content-Type: application/json" \
          -d "{
            \"zoneName\": \"${DOMAIN}\",
            \"provider\": \"manual\",
            \"config\": {},
            \"tlsConfig\": { \"provider\": \"fallback\" },
            \"fallbackCertificate\": { \"cert\": \"${CERT}\", \"key\": \"${KEY}\" }
          }"
        

        verify with openssl s_client -showcerts -connect IP:443 -servername my.${DOMAIN}.net | less

        1 Reply Last reply
        0
        • jamesJ Offline
          jamesJ Offline
          james
          Staff
          wrote last edited by james
          #4

          Hello @potemkin_ai
          You can already configure each domain to not use wildcard.
          This is also documented here: https://docs.cloudron.io/domains#certificates

          • go into your dashboard
          • click Domains
          • click the Edit button next to a domain
          • click Advanced settings…
          • Under Certificate provider select Let's Encrypt Prod

          or did I misunderstand what you are looking for?
          If this is indeed what you need, can we improve something to make this information more accessible?

          1 Reply Last reply
          0
          • nebulonN nebulon moved this topic from Feature Requests

          Hello! It looks like you're interested in this conversation, but you don't have an account yet.

          Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

          With your input, this post could be even better šŸ’—

          Register Login
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • Bookmarks
          • Search