[How-To] onlyoffice in nextcloud docker

  • hi there,


    as requested, little how-to
    "core" setup is based to macom's How-To nextcloud letsencrypt docker compose so all pathes go back to this tutorial - if you have changed them, you know what to do ;)


    What to do?
    Like nextcloud? Love the way it fit your needs? So what will you do if you need one of your office documents on the fly and you see "oh, i have to change that". Yeah, just download it, do your changes, and reup - no problem since most computers got some office program installed... but - it can be more easy;
    I just open it right there from nextcloud, do my changes, and close it. cool hm? :thumbup:


    How-To:



    we need to install and integrate onlyoffice to our nextcloud installation.


    Step1:
    we need a self signed certificate for the communication of nextcloud and onlyoffice, just follow this steps line by line in cli: and fill in the informations needed (you can also skip most but: (Common Name (e.g. server FQDN or YOUR name)) is requiered) - here you enter your localip.


    Fit line 1 to your enviorment

    Code
    mkdir -p /srv/dev-disk-by-label-disk1/appdata/onlyoffice/DocumentServer/data/certs
    cd /srv/dev-disk-by-label-datadisk1/app/onlyoffice/DocumentServer/data/certs
    openssl genrsa -out onlyoffice.key 4096
    openssl req -new -key onlyoffice.key -out onlyoffice.csr
    openssl x509 -req -days 3650 -in onlyoffice.csr -signkey onlyoffice.key -out onlyoffice.crt
    openssl dhparam -out dhparam.pem 4096
    chmod 400 onlyoffice.key
    chmod 400 onlyoffice.crt
    chmod 400 onlyoffice.csr
    chmod 400 dhparam.pem



    Step2:
    open your nextcloud compose file
    cd /home/docker1/nextcloud
    nano docker-compose.yml
    add this to the end of the file


    the last line looks like a dupe of line 12 - but seems to be need, otherwise my setup didn't find the cert ... so just read over ^^


    line 8 needs to set secret key - fill in what ever you want, but you will need it again like my comment say
    line 12 - 18 just the default volume rework - fit it to your enviorment.
    save the compose file.


    Step3:
    add subfolder config for onlyoffice to letsencrypt
    nano /srv/dev-disk-by-label-disk1/appdata/letsencrypt/nginx/proxy-confs/onlyoffice.subfolder.conf
    add this to the new empty file: (thx again @Morlan :) )


    change line 7 to hosts ip


    close and save the file.


    Step4:
    say the following words "abra cadabra" stand up, spin around your self 2 times and say "lets do it!"


    we should be right here in /home/docker1/nextcloud directory
    run: docker-compose up -d


    run:docker restart letsencrypt



    Open web browser and try to connect: https://your.domain/onlyoffice



    you should see a page with "Document Server is running" in the middle of the page - well done general.



    Step5:


    bring it to nextcloud


    Login to nextcloud with a admin user


    go to +Apps menu and search for ONLYOFFICE (Featured) and install/enable it (if not done by default nextcloud setup)


    go to Settings, scrool down until you see ONLYOFFICE in the left menu - click on it



    Document Editing Service adress will be your https://your.domain/onlyoffice like we test in step 4 and remember to step2 line 8 this is the time you will need it ;)


    after adding both, just click save.
    oO_nC-conf.png



    Step6:


    login to your normal nextcloud user


    navigate to your files - just click on a office file you want - it should be open with onyloffice in your browser. you can also use the + sign in Filetab and just create a new one ;)



    hope it will work for you,


    oh, and, befor i forgot .. you can sit down :P


    p.s. you may want to backup your nextcloud? have a look

    ___________________________
    OMV5@AsRock j3455 8GB RAM

    3 Mal editiert, zuletzt von draddy ()

  • hi folks ;)


    @Kritta left me a commend what say onlyoffice will not run on ARM systems, thats right, and i never told that - sorry that you waste time on this.


    hope this can prevent others, for more details plz visit the docs of onlyoffice it self. ;)

    ___________________________
    OMV5@AsRock j3455 8GB RAM

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!