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


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Unattended install?

    Feature Requests
    6
    16
    574
    Loading More Posts
    • 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_ai
      potemkin_ai last edited by

      Hello! Is there any way for CloudRon to have unattended install - so that I launch the installation script, specify the file with all of the options and enjoy installation to be up and running in X minutes with all of the configuration and apps installed?

      murgero 1 Reply Last reply Reply Quote 5
      • murgero
        murgero App Dev @potemkin_ai last edited by murgero

        @potemkin_ai This would be an interesting bit - I believe there are imagines on DigitalOcean that can do a basic unattended.

        From what you describe, I think the ability to do an "answer-file" type scenario would be best (like how Windows does unattended OOBE installers):

        ./cloudron-setup --answer-file=unattended.yaml

        the syntax could be something like:

        basic_settings:
            default_user: "Admin"
            default_pass: "password"
            install_domain: "my.example.com"
        
        branding:
            name: "Cloudron Install"
            footer: "Cloudron Footer"
        
        
        first_domain:
            name: "example.com"
            zone_name: "example.com"
            ssl_provider: "lets_encrypt"
            dns_provider: "digitalocean"
            dns_token: "somethingsomething"
            matrix_location: ""
            mastodon_location: ""
            
        backups:
            provider: "digitalocean_spaces"
            location: "cloudron-backups/backup"
            endpoint: "https://abc123.digitaloceanspaces.com"
            format: "tgz"
            secret_key: "password"
            run_at: "mon,wed,fri@23:00"
            retention: "1month"
            
        settings:
            cloudron_account:
                email: "username@example.com"
        
            time_zone: "America/New York"
            language: "english"
        

        --
        https://urgero.org
        ~ Professional Nerd. Freelance Programmer. ~
        Matrix: @murgero:urgero.org

        potemkin_ai 1 Reply Last reply Reply Quote 2
        • potemkin_ai
          potemkin_ai @murgero last edited by

          @murgero yeah, that would work.
          Any ideas if that’s possible with Cloudron?

          1 Reply Last reply Reply Quote 0
          • nebulon
            nebulon Staff last edited by nebulon

            Great you brought this up. We had a few attempts for this in the past, mostly around cloud-init scripts, but due to lack of ongoing customer interest, we never really followed through with this. So currently there is no support for such setup configs, but due to the Cloudron REST api one has to fallback to custom scripts for the moment.

            1 Reply Last reply Reply Quote 1
            • girish
              girish Staff last edited by

              A while ago, we wrote https://git.cloudron.io/cloudron/cloudron-sysadmin which is basically an unattended install. That script most likely won't work / is obsolete.

              If there's interest, I can write a quick doc on how to write this script. It's really just a bunch of API calls to automate everything. Fee free to automate in the language of your choice.

              robi BrutalBirdie 2 Replies Last reply Reply Quote 2
              • robi
                robi @girish last edited by

                @girish This sounds like the perfect start of a Cloudron Deployer App which can be used to build a series/cluster of Cloudrons, all from one place.

                Life of Advanced Technology

                girish 1 Reply Last reply Reply Quote 1
                • girish
                  girish Staff @robi last edited by

                  @robi We also tinkered with automating it in cloudron.io, but that requires the user to give us ssh access to the server (atleast, for the duration of deployment) to setup stuff.

                  Would that be interesting? Login to Cloudron.io, add an IP address and some deployment parameters and it will go deploy. Underneath, it's probably only web-ifying the deploy script.

                  robi potemkin_ai 2 Replies Last reply Reply Quote 1
                  • robi
                    robi @girish last edited by robi

                    @girish Yes, if you solve the self-revoking SSH key workflow to an admin account which you can use as deployment credentials (separate from personal credentials).

                    Life of Advanced Technology

                    1 Reply Last reply Reply Quote 1
                    • potemkin_ai
                      potemkin_ai @girish last edited by

                      @girish I don't really like the idea of sharing my SSH key to anyone; nor I like the fact I need to SSH to the new server, but it's really not that much a problem.

                      As @nebulon mentioned, I would rather prefer to call it through cloud-init, but every provider is different in this regards, so it sounds like a headache.

                      I also feel that Cloudron is more for SMB, mostly for small business - and I doubt small business would install hundres of Cloudrons - please, correct me if I'm wrong (I would be also happy for you to be wrong!).

                      girish 1 Reply Last reply Reply Quote 0
                      • girish
                        girish Staff @potemkin_ai last edited by

                        @potemkin_ai yes, there is no use case to deploy 100s of cloudrons. For the big providers, we have 1-click images but those don't require automation of the configuration.

                        1 Reply Last reply Reply Quote 0
                        • BrutalBirdie
                          BrutalBirdie Staff @girish last edited by

                          If the need is big enough I could write an ansible module for cloudron.
                          Which would also be mostly API calls.

                          Like my work? Consider donating a beer 🍻 Cheers!

                          potemkin_ai 2 Replies Last reply Reply Quote 3
                          • potemkin_ai
                            potemkin_ai @BrutalBirdie last edited by

                            @brutalbirdie thank you very much, appreciate that!
                            The need is not big enough, at least not for now, let me revert back to you, if it will appear to be so

                            1 Reply Last reply Reply Quote 1
                            • potemkin_ai
                              potemkin_ai @BrutalBirdie last edited by

                              @BrutalBirdie thank you again for your offer.
                              I'm not yet familiar with CloudRon API and I'm considering creating a manage / hosted solution with cloudron at it's heart - could you probably help me by pointing out some ready to use scripts or like Insomnia pre-sets, for a quick-start?

                              BrutalBirdie 1 Reply Last reply Reply Quote 0
                              • BrutalBirdie
                                BrutalBirdie Staff @potemkin_ai last edited by

                                @potemkin_ai not really.
                                Best way to get started would be install postman and import the api and just play around.
                                https://docs.cloudron.io/api.html

                                Like my work? Consider donating a beer 🍻 Cheers!

                                BrutalBirdie 1 Reply Last reply Reply Quote 1
                                • BrutalBirdie
                                  BrutalBirdie Staff @BrutalBirdie last edited by

                                  @potemkin_ai
                                  Another thing that is also very useful for understanding how to use the api, or find out any missing things in the doc.
                                  You can open your browser debugger network tab and click any button in the cloudron dashboard and click a button.
                                  Then you can see the API calls. Also useful for copy-paste API JSON bodys.

                                  Example Question you could ask your self - How do I disable an app auto backup?

                                  18240128-93a0-452c-abcb-0b00d0409139-grafik.png

                                  Then you could copy the POST as cURL and see you self:

                                  curl 'https://my.DOMAIN.TLD/api/v1/apps/0c81e720-ab79-414e-9e6d-dbdbbaab6e30/configure/automatic_backup' -X POST -H 'User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:103.0) Gecko/20100101 Firefox/103.0' -H 'Accept: application/json, text/plain, */*' -H 'Accept-Language: en,en-US;q=0.7,de;q=0.3' -H 'Accept-Encoding: gzip, deflate, br' -H 'Referer: https://my.DOMAIN.TLD/' -H 'Authorization: Bearer REDACTED' -H 'Content-Type: application/json;charset=utf-8' -H 'Origin: https://my.DOMAIN.TLD' -H 'Connection: keep-alive' -H 'Sec-Fetch-Dest: empty' -H 'Sec-Fetch-Mode: cors' -H 'Sec-Fetch-Site: same-origin' -H 'TE: trailers' --data-raw '{"enable":false}'
                                  

                                  The last part --data-raw is the body, if you switch the false to true and send this the auto backup for the app is enabled again.

                                  Doc to that API call: https://docs.cloudron.io/api.html#tag/Apps/paths/~1apps~1{appid}~1configure~1automatic_backup/post

                                  But now you also know a way to figure it out yourself.

                                  Like my work? Consider donating a beer 🍻 Cheers!

                                  potemkin_ai 1 Reply Last reply Reply Quote 2
                                  • potemkin_ai
                                    potemkin_ai @BrutalBirdie last edited by

                                    @BrutalBirdie thank you very much!!

                                    1 Reply Last reply Reply Quote 0
                                    • Referenced by  BrutalBirdie BrutalBirdie 
                                    • First post
                                      Last post
                                    Powered by NodeBB