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

    Nextcloud on debian 9.1

    IT Discussion
    3
    6
    722
    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.
    • momurdaM
      momurda
      last edited by momurda

      Install debian 9.1. I used netinstall image.
      when that is done get some basic admin stuff. debian netinstall comes with just about nothing. Not even sudo, which i havent installed here either, you can if you want.
      #apt-get install glances sysstat net-tools dnsutils ufw
      Configure ufw
      #ufw allow https
      #ufw allow http
      #ufw allow mysql
      #ufw allow ssh
      #ufw enable
      Install your lamp.
      #apt-get install apache2 mariadb-server libapache2-mod-php7.0

      #apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip
      Now setup mariadb
      #mysql_secure_installation
      Set root pw, answer questions.
      Now is a good time to setup a db, user, pw for nextcloud on mariadb
      You all know how to do that probably.

      Download nextcloud 12.0.3
      #wget https//download.nextcloud.com/server/releases/nextcloud-12.0.3.zip
      Unzip
      #unzip nextcloud 12.0.3.zip
      copy to DocumentRoot
      cp -r nextcloud /var/www

      Next i just copied the info from nextcloud's instructions, replacing what i need to with my own config.
      https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#apache-web-server-configuration

      Enable the required modules in the instructions above. Depending on your situation maybe you need other things.
      Once those are enabled, you should be able to get to the Nextcloud initialization page. Here you enter a nextcloud admin username/pw, your mariadb db, user, pw that you made earlier.
      Change owner on /var/www/ to www-data

      #chown -R www-data:www-data /var/www

      Now you have nextcloud working on http
      Now setup https. This is getting too easy.
      I found this blog post, thanks dude!
      https://vroomtech.io/installing-nextcloud-on-ubuntu-16-04-lts-with-apache2-lets-encrypt-redis-and-apcu/
      I just used the part for https setup. Not the rest, but i am sure you could do that as well if you dont like my instructions.
      apt install letsencrypt python-certbot-apache
      The package on blog python-letsencrypt-apache doesnt exist, it asks if you want to use python-certbot-apache instead. Do it.
      Get a cert.
      letsencrypt --apache --agree-tos --email your-email-address -d nextcloud.your-domain.com
      Answer 2 to the question it asks.
      Now you have https nextcloud.
      edit: You might get a warning on https://nextcloud.yourdomain.com page that you need to add nextcloud.yourdomain.com to trusted_domains in config.php
      #nano /var/www/nextcloud/config/config.php
      find trusted_domains section.
      add your server there
      'trusted_domains' =>
      array (
      0 => 'ip.ad.dr.ess.'
      1 => 'hostname.domain.com',

      bigbearB 1 Reply Last reply Reply Quote 4
      • bigbearB
        bigbear @momurda
        last edited by

        @momurda said in Nextcloud on debian 9.1:

        Install debian 9.1. I used netinstall image.
        when that is done get some basic admin stuff. debian netinstall comes with just about nothing. Not even sudo, which i havent installed here either, you can if you want.
        #apt-get install glances sysstat net-tools dnsutils ufw
        Configure ufw
        #ufw allow https
        #ufw allow http
        #ufw allow mysql
        #ufw allow ssh
        #ufw enable
        Install your lamp.
        #apt-get install apache2 mariadb-server libapache2-mod-php7.0

        #apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip
        Now setup mariadb
        #mysql_secure_installation
        Set root pw, answer questions.
        Now is a good time to setup a db, user, pw for nextcloud on mariadb
        You all know how to do that probably.

        Download nextcloud 12.0.3
        #wget https//download.nextcloud.com/server/releases/nextcloud-12.0.3.zip
        Unzip
        #unzip nextcloud 12.0.3.zip
        copy to DocumentRoot
        cp -r nextcloud /var/www

        Next i just copied the info from nextcloud's instructions, replacing what i need to with my own config.
        https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#apache-web-server-configuration

        Enable the required modules in the instructions above. Depending on your situation maybe you need other things.
        Once those are enabled, you should be able to get to the Nextcloud initialization page. Here you enter a nextcloud admin username/pw, your mariadb db, user, pw that you made earlier.
        Change owner on /var/www/ to www-data

        #chown -R www-data:www-data /var/www

        Now you have nextcloud working on http
        Now setup https. This is getting too easy.
        I found this blog post, thanks dude!
        https://vroomtech.io/installing-nextcloud-on-ubuntu-16-04-lts-with-apache2-lets-encrypt-redis-and-apcu/
        I just used the part for https setup. Not the rest, but i am sure you could do that as well if you dont like my instructions.
        apt install letsencrypt python-certbot-apache
        The package on blog python-letsencrypt-apache doesnt exist, it asks if you want to use python-certbot-apache instead. Do it.
        Get a cert.
        letsencrypt --apache --agree-tos --email your-email-address -d nextcloud.your-domain.com
        Answer 2 to the question it asks.
        Now you have https nextcloud.
        edit: You might get a warning on https://nextcloud.yourdomain.com page that you need to add nextcloud.yourdomain.com to trusted_domains in config.php
        #nano /var/www/nextcloud/config/config.php
        find trusted_domains section.
        add your server there
        'trusted_domains' =>
        array (
        0 => 'ip.ad.dr.ess.'
        1 => 'hostname.domain.com',

        Thanks! Was just thinking about this scenerio the other day. What about on Jessie?

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

          @bigbear said in Nextcloud on debian 9.1:

          @momurda said in Nextcloud on debian 9.1:

          Install debian 9.1. I used netinstall image.
          when that is done get some basic admin stuff. debian netinstall comes with just about nothing. Not even sudo, which i havent installed here either, you can if you want.
          #apt-get install glances sysstat net-tools dnsutils ufw
          Configure ufw
          #ufw allow https
          #ufw allow http
          #ufw allow mysql
          #ufw allow ssh
          #ufw enable
          Install your lamp.
          #apt-get install apache2 mariadb-server libapache2-mod-php7.0

          #apt-get install php7.0-gd php7.0-json php7.0-mysql php7.0-curl php7.0-mbstring php7.0-intl php7.0-mcrypt php-imagick php7.0-xml php7.0-zip
          Now setup mariadb
          #mysql_secure_installation
          Set root pw, answer questions.
          Now is a good time to setup a db, user, pw for nextcloud on mariadb
          You all know how to do that probably.

          Download nextcloud 12.0.3
          #wget https//download.nextcloud.com/server/releases/nextcloud-12.0.3.zip
          Unzip
          #unzip nextcloud 12.0.3.zip
          copy to DocumentRoot
          cp -r nextcloud /var/www

          Next i just copied the info from nextcloud's instructions, replacing what i need to with my own config.
          https://docs.nextcloud.com/server/12/admin_manual/installation/source_installation.html#apache-web-server-configuration

          Enable the required modules in the instructions above. Depending on your situation maybe you need other things.
          Once those are enabled, you should be able to get to the Nextcloud initialization page. Here you enter a nextcloud admin username/pw, your mariadb db, user, pw that you made earlier.
          Change owner on /var/www/ to www-data

          #chown -R www-data:www-data /var/www

          Now you have nextcloud working on http
          Now setup https. This is getting too easy.
          I found this blog post, thanks dude!
          https://vroomtech.io/installing-nextcloud-on-ubuntu-16-04-lts-with-apache2-lets-encrypt-redis-and-apcu/
          I just used the part for https setup. Not the rest, but i am sure you could do that as well if you dont like my instructions.
          apt install letsencrypt python-certbot-apache
          The package on blog python-letsencrypt-apache doesnt exist, it asks if you want to use python-certbot-apache instead. Do it.
          Get a cert.
          letsencrypt --apache --agree-tos --email your-email-address -d nextcloud.your-domain.com
          Answer 2 to the question it asks.
          Now you have https nextcloud.
          edit: You might get a warning on https://nextcloud.yourdomain.com page that you need to add nextcloud.yourdomain.com to trusted_domains in config.php
          #nano /var/www/nextcloud/config/config.php
          find trusted_domains section.
          add your server there
          'trusted_domains' =>
          array (
          0 => 'ip.ad.dr.ess.'
          1 => 'hostname.domain.com',

          Thanks! Was just thinking about this scenerio the other day. What about on Jessie?

          They have always been big Ubuntu pushers. So it should work on almost all Debian versions going back to whatever was current int he ownCloud days.

          1 Reply Last reply Reply Quote 1
          • momurdaM
            momurda
            last edited by

            As @JaredBusch says, I think for Jessie this should all just work fine. There might be some packages that arent on deb 8.x repos, or ones that are setup differently on 9.x. But ive not done anything exotic here so it should work.

            One good thing with debian is that you can do distribution upgrades(do you hear me centos maintainers). Someone here once referred to debian as the 'fuddy duddy' distro. That actually helps in situations like this that are expected to be in service for a long time.

            I also plan on implementing apparmor and a profile for this, and i will add that bit on later.

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

              @momurda said in Nextcloud on debian 9.1:

              As @JaredBusch says, I think for Jessie this should all just work fine. There might be some packages that arent on deb 8.x repos, or ones that are setup differently on 9.x. But ive not done anything exotic here so it should work.

              One good thing with debian is that you can do distribution upgrades(do you hear me centos maintainers). Someone here once referred to debian as the 'fuddy duddy' distro. That actually helps in situations like this that are expected to be in service for a long time.

              I also plan on implementing apparmor and a profile for this, and i will add that bit on later.

              Actually, you should not be doing distro installs or upgrades of Nextcloud. They have moved to a self contained internal upgrade model.

              That is the only truly support model. All distro package systems are third party maintained. Not maintained by Nextcloud.

              momurdaM 1 Reply Last reply Reply Quote 1
              • momurdaM
                momurda @JaredBusch
                last edited by

                @jaredbusch I just meant that @bigbear could upgrade his debian to 9 then do this if he wanted.

                1 Reply Last reply Reply Quote 1
                • 1 / 1
                • First post
                  Last post