Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

instructions how to set up collabora office #160

Closed
markum opened this issue Jul 2, 2018 · 16 comments · Fixed by #932
Closed

instructions how to set up collabora office #160

markum opened this issue Jul 2, 2018 · 16 comments · Fixed by #932

Comments

@markum
Copy link

markum commented Jul 2, 2018

It would be great, if there were instructions how to set up collabora office in Uberspace.

@coderkun
Copy link
Contributor

coderkun commented Jul 2, 2018

Is it correct that that would require Docker? Maybe udocker can be used (see #159)?

@n0emis
Copy link

n0emis commented Jan 7, 2019

this would either require docker or java

@Kogoro
Copy link

Kogoro commented Jul 20, 2019

I would be interested in a solution as well as collabora office is a key part of a nextcloud install.
I'm currently trying to use udocker but until now I couldn't get the docker file working.

@n0emis I could not find any reference to a normal java build. Do you have some pointers?

@microfx
Copy link

microfx commented Jan 1, 2020

docker is not supported by uberspace... but there must be a way?

@beerisgood
Copy link

@luto
@nazco
@SalocinHB

Any way to install that so we can boost Nextcloud?

I found this guide to install it without Docker, but think it doesn't work with the restrictions on uberspce

@Kogoro
Copy link

Kogoro commented Feb 9, 2020

With Nextcloud 18 aka Nextcloud Hub, collabora office is directly included as installable plugin.
Nevertheless, I do not know whether the machines at uberspace are powerful enough or not. Maybe someone could test it and let us know.

@jorsn
Copy link
Contributor

jorsn commented Feb 26, 2020

With Nextcloud 18 aka Nextcloud Hub, collabora office is directly included as installable plugin.

Do you mean this: https://apps.nextcloud.com/apps/richdocuments? It's only a connector to a collabora instance. No collabora is installed.

However, there seems to be ONLYOFFICE as an app. It just doesn't seem to work far, according to my short trial and these issues:

@Kogoro
Copy link

Kogoro commented Feb 27, 2020

I was able to install the Community Document Server
(https://apps.nextcloud.com/apps/documentserver_community) successfully with increased timeout in the right file. This is surely a workaround, but for my local test instance why not. After downloading the app, you can simply change back the settings.

@beerisgood
Copy link

I was able to install the Community Document Server
(https://apps.nextcloud.com/apps/documentserver_community) successfully with increased timeout in the right file. This is surely a workaround, but for my local test instance why not. After downloading the app, you can simply change back the settings.

How did you install it?

@Kogoro
Copy link

Kogoro commented Feb 28, 2020

You must increase the timeout in the client.php to an adequate time. A more deeper explanation is available under https://help.nextcloud.com/t/downloading-certain-apps-not-working/62603/11.
With the timeout increased, you should be able to download the app as usual.

@beerisgood
Copy link

You must increase the timeout in the client.php to an adequate time. A more deeper explanation is available under https://help.nextcloud.com/t/downloading-certain-apps-not-working/62603/11.
With the timeout increased, you should be able to download the app as usual.

Thanks. That did it!

Also the solution from that link is:

I’ve solved the Problem by manually Setting the Value for
"RequestOptions::TIMEOUT "
to 120 or a higher value in the following file:
“/path/to/nextcloud/lib/private/Http/Client/Client.php”

@jorsn
Copy link
Contributor

jorsn commented May 5, 2020

My setup (#656) for the original ONLYOFFICE DocumentServer using udocker could also be an inspiration for Collabora+udocker.

I use the DocumentServer because the performance of the NC app gets really bad with around 15+ simultaneous connections.

@JMoVS
Copy link
Contributor

JMoVS commented Jul 14, 2020

It seems now more than ever it would be really helpful if someone figures out either directly from nextcloud hub or with udocker on how to get the CODE server running. I am currently stuck with trying to even see logs which give me helpful error messages. Right now it just fails and i don't even know where to look for the logs.

@jorsn
Copy link
Contributor

jorsn commented Sep 23, 2020

For anyone interested: #656 is now simplified to use web backends, has no connection limit anymore and allows mobile editing.

@jorsn
Copy link
Contributor

jorsn commented Sep 23, 2020

The Solution™

Shall I turn this into a guide?

So far I haven't tested the method using web backends. Serving collabora office should be possible in a subpath. Maybe an option has to be set, but don't think so.

Please post whether this works for you, and also your performance tweaks.

In this configuration, collabora CODE synchronizes its files faster with my Nextcloud than ONLYOFFICE, installed as in #656, but it uses much more server resources. This is expected, because CODE renders at the server side, whereas ONLYOFFICE does this at the client side.

Prepare, Configure & Run

udocker pull collabora/code
create --name=collabora-code collabora/code
mkdir -p ~/etc/collabora && cp /etc/loolwsd/loolwsd.xml ~/etc/collabora
uberspace domain add lol.example.com

You can now edit ~/etc/collabora/loolwsd.xml to configure collabora office. You can also edit it to change configuration while the container is running. Another alternative is to set the options on the commandline, which is done in the script below.
You must set security.capabilities=false, because otherwise capabilities(7) are requested which only root has. It is also advisable to set the memproportion (in percent) such that less than 1.5 GB are used, as this is the limit of an Uberspace.

If you use an exposed port:

  1. Run uberspace port add and refer to the port as $PORT in the following:
  2. Run the following script (e.g. put it to ~/etc/collabora/run)
#!/bin/sh

PORT=12345 # change this
lool_domain=lol.example.com
container=collabora-code

export DONT_GEN_SSL_CERT=1
export PROOT_NO_SECCOMP=1

# 'domain' is the domain of your WOPI host, e.g. your nextcloud.
udocker run -i -t --publish=$PORT:9980 --env="domain=nextcloud\\.example\\.com" \
        --env=username=admin --env=password=supersecretpassword --env=DONT_GEN_SSL_CERT=1 \
        --env='extra_params=--o:security.capabilities=false --o:memproportion=5.0 --o:per_document.max_concurrency=15 --o:logging=debug' \
        -v "$HOME"/etc/collabora/loolwsd.xml:/etc/loolwsd/loolwsd.xml \
        -v "$HOME"/.udocker/containers/$container/ROOT/start-libreoffice.sh:/sbin/start-libreoffice.sh \
        -v "$HOME"/etc/certificates/${lool_domain}.crt:/etc/loolwsd/cert.pem \
        -v "$HOME"/etc/certificates/${lool_domain}.key:/etc/loolwsd/key.pem \
        -v /etc/ssl/certs/ca-bundle.trust.crt:/etc/loolwsd/ca-chain.cert.pem \
        --user=101 \
        collabora-code

If you use web backends:

  1. Run uberspace web backend set --http --port 9980 lol.example.com
  2. Run the above script, but remove the option --publish=$PORT:9980 and add the option --env=ssl.enable=false. You can also remove the lines mapping the certificate and key.

Test

Run on any machine connected to the internet (with curl+tls-support):

PORT=12345 curl -k https://lol.example.com:$PORT

Then, just try out to configure your WOPI host and use it.

supervisord

Put in ~/etc/services.d/collabora-code.ini:

[program:collabora-code]
command=%(ENV_HOME)s/etc/collabora/run
autostart=yes
autorestart=yes
startsecs=30
stopasgroup=yes
killasgroup=yes

and run

supervisorctl reread
supervisorctl start collabora-code

@jorsn
Copy link
Contributor

jorsn commented Sep 25, 2020

I wrote a guide (#768). It does not cover exposed ports, only web backends. Also, the post above contains some errors which I won't correct, since we have the guide. Especially, web backends are configured correctly only in the guide.

jorsn added a commit to jorsn/uberspace-lab that referenced this issue Sep 26, 2020
jorsn added a commit to jorsn/uberspace-lab that referenced this issue Mar 8, 2021
@luto luto closed this as completed in #932 Mar 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
9 participants