ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    NextCloud Automated Installation

    IT Discussion
    linux fedora installer nextcloud script bash selinux storage cloud storage
    12
    76
    11.3k
    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.
    • JaredBuschJ
      JaredBusch @dave_c
      last edited by

      @dave_c said in NextCloud Automated Installation:

      The only thing I wasn't able to do is to remove /nextcloud from the URL; I will revisit the script later with NC 13

      That is a multi-step process. I have documented it in my NC 11 guide here: https://mangolassi.it/post/279323

      D 1 Reply Last reply Reply Quote 0
      • D
        dave_c @JaredBusch
        last edited by dave_c

        @jaredbusch
        If I remember, your steps are for Apache; I was using nginx
        **Edit: The scripts I posted suport Apache/nginx/minio

        JaredBuschJ black3dynamiteB 2 Replies Last reply Reply Quote 0
        • JaredBuschJ
          JaredBusch @dave_c
          last edited by JaredBusch

          @dave_c said in NextCloud Automated Installation:

          @jaredbusch
          If I remember, your steps are for Apache; I was using nginx
          **Edit: The scripts I posted suport Apache/nginx/minio

          I have never tried it with Nginx, so yeah.

          But the removal of the /nextcloud bit is simply a change in the default webroot in Apache. So update that in Nginx. does that not resovle it?

          D 1 Reply Last reply Reply Quote 1
          • D
            dave_c @JaredBusch
            last edited by

            @jaredbusch
            No. It didn't work. I believe that I have to update the rules for PHP-FPM in nginx conf
            Anyway, I will try again this week as I need to set up a NC server for production. I may use Apache; I haven't decided

            JaredBuschJ 1 Reply Last reply Reply Quote 0
            • black3dynamiteB
              black3dynamite @dave_c
              last edited by black3dynamite

              @dave_c said in NextCloud Automated Installation:

              @jaredbusch
              If I remember, your steps are for Apache; I was using nginx
              **Edit: The scripts I posted suport Apache/nginx/minio

              It be something like this:

              #Before changing root location
              server {
                  location / {
                      root /var/www/html/;
                  }
              
              #After changing root location
              server {
                  location / {
                      root /var/www/html/nextcloud/;
                  }
              
              JaredBuschJ 1 Reply Last reply Reply Quote 0
              • JaredBuschJ
                JaredBusch @dave_c
                last edited by

                @dave_c said in NextCloud Automated Installation:

                @jaredbusch
                No. It didn't work. I believe that I have to update the rules for PHP-FPM in nginx conf
                Anyway, I will try again this week as I need to set up a NC server for production. I may use Apache; I haven't decided

                Odd. Sadly, not something I hgave time to test out right now. This week is going to be busy with travel and new clients meetings.

                1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch @black3dynamite
                  last edited by

                  @black3dynamite said in NextCloud Automated Installation:

                  @dave_c said in NextCloud Automated Installation:

                  @jaredbusch
                  If I remember, your steps are for Apache; I was using nginx
                  **Edit: The scripts I posted suport Apache/nginx/minio

                  It be something like this:

                  #Before changing root location
                  server {
                      location / {
                          root /var/www/html/;
                      }
                  
                  #After changing root location
                  server {
                      location / {
                          root /var/www/html/nextcloud/;
                      }
                  

                  And then update the NC config.php.

                  D 1 Reply Last reply Reply Quote 0
                  • D
                    dave_c @JaredBusch
                    last edited by

                    @jaredbusch @black3dynamite
                    Perhaps I didn't update config.php!
                    I will check later, thank you

                    1 Reply Last reply Reply Quote 1
                    • B
                      bnrstnr
                      last edited by bnrstnr

                      Is it possible to insert the hostname into the trusted domains array in the NC config.php file with the script?

                      JaredBuschJ 1 Reply Last reply Reply Quote 0
                      • JaredBuschJ
                        JaredBusch @bnrstnr
                        last edited by

                        @bnrstnr said in NextCloud Automated Installation:

                        Is it possible to insert the hostname into the trusted domains array in the NC config.php file with the script?

                        Yes, but @scottalanmiller did not account for that.

                        1 Reply Last reply Reply Quote 0
                        • JaredBuschJ
                          JaredBusch
                          last edited by

                          @bnrstnr Also, why would you want the hostname in there? It should be pretty rare that you use the hostname in a browser.

                          B 1 Reply Last reply Reply Quote 0
                          • B
                            bnrstnr @JaredBusch
                            last edited by

                            @jaredbusch I thought that was the entire purpose of the hostname? I always set my hostname as the FQDN of whatever the server is... nextcloud.example.net seems like a perfect hostname for a nextcloud server, no?

                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                            • JaredBuschJ
                              JaredBusch @bnrstnr
                              last edited by JaredBusch

                              @bnrstnr said in NextCloud Automated Installation:

                              @jaredbusch I thought that was the entire purpose of the hostname? I always set my hostname as the FQDN of whatever the server is... nextcloud.example.net seems like a perfect hostname for a nextcloud server, no?

                              No that is not the purpose of a hostname.

                              So you meant put the FQDN in the trusted domain.

                              Pull request made to do that.
                              https://gitlab.com/scottalanmiller/nextcloud_fedora_installer/merge_requests/1

                              If someone has time to test my pull request, that would be great.

                              source <(curl -s https://gitlab.com/sorvani/nextcloud_fedora_installer/raw/master/nextcloud_fedora.sh)
                              B 1 Reply Last reply Reply Quote 1
                              • JaredBuschJ
                                JaredBusch
                                last edited by

                                Here is the diff for anyone interested.

                                diff --git a/nextcloud_fedora.sh b/nextcloud_fedora.sh
                                index 9f79344..cbfd88e 100644
                                --- a/nextcloud_fedora.sh
                                +++ b/nextcloud_fedora.sh
                                @@ -31,6 +31,8 @@ echo "Enter the name of your web admin user account (ex. admin)"
                                 read adminuser
                                 echo "Enter the initial password for admin"
                                 read adminpass
                                +echo "Enter the FQDN you setup for Nextcloud (ex. nc.domain.com)"
                                +read ncfqdn
                                 
                                 export ncpath='/var/www/html/nextcloud'
                                 export datapath='/data'
                                @@ -87,6 +89,10 @@ systemctl restart php-fpm
                                 cd $ncpath
                                 sudo -u apache php occ maintenance:install --database "mysql" --database-name "nextcloud" --database-user "ncuser" --database-pass $ncpass --admin-user $adminuser --admin-pass $adminpass --data-dir $datapath
                                 sudo -u apache php occ config:system:set trusted_domains 1 --value=$(ifconfig | sed -En 's/127.0.0.1//;s/.*inet (addr:)?(([0-9]*\.){3}[0-9]*).*/\2/p')
                                +if [-n $ncfqdn]
                                +then
                                +  sudo -u apache php occ config:system:set trusted_domains 2 --value=$ncfqdn
                                +fi
                                 
                                 sed -i "$ d" /var/www/html/nextcloud/config/config.php
                                 echo "  'memcache.locking' => '\OC\Memcache\Redis'," >> /var/www/html/nextcloud/config/config.php
                                
                                B 1 Reply Last reply Reply Quote 0
                                • B
                                  bnrstnr @JaredBusch
                                  last edited by

                                  @jaredbusch said in NextCloud Automated Installation:

                                  If someone has time to test my pull request, that would be great.

                                  Testing now.

                                  1 Reply Last reply Reply Quote 0
                                  • B
                                    bnrstnr @JaredBusch
                                    last edited by

                                    @jaredbusch
                                    https://i.imgur.com/02OnzE4.png

                                    1 Reply Last reply Reply Quote 0
                                    • JaredBuschJ
                                      JaredBusch
                                      last edited by

                                      Looks like @scottalanmiller never tested on minimal.

                                      wget is not installed on your system.

                                      B 1 Reply Last reply Reply Quote 2
                                      • JaredBuschJ
                                        JaredBusch
                                        last edited by

                                        I also do not know why he is using unzip instead of the bz2, but meh.

                                        1 Reply Last reply Reply Quote 0
                                        • JaredBuschJ
                                          JaredBusch
                                          last edited by JaredBusch

                                          no clue how to easily make a second pull request without blowing out the first one..

                                          build a Fedora 27 instance, install wget manually, and then run the script.

                                          1 Reply Last reply Reply Quote 0
                                          • B
                                            bnrstnr @JaredBusch
                                            last edited by

                                            @jaredbusch I doubt cockpit is the issue here, but I installed wget before running it this time...
                                            -bash: [-n: command not found]

                                            https://i.imgur.com/AmT4mas.png

                                            JaredBuschJ 1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 3 / 4
                                            • First post
                                              Last post