[HOWTO] Collabora 2.0 without using Docker not for prod

root@test:~# sudo apt-get install libpng12-0
Reading package lists… Done
Building dependency tree
Reading state information… Done
Package libpng12-0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘libpng12-0’ has no installation candidate

apt-get install libpng-dev

1 Like

i already installed it then i put your command but same result same error because system find libpng12.so

hi again i added new repository for install libpng12-0 so i installed after i was trying this command

sudo -u lool /usr/bin/loolwsd --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.1 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd

but here is error

root@test:~# sudo -u lool /usr/bin/loolwsd --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.1 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd
wsd-30110-00 00:00:00.000413 [ loolwsd ] Initializing wsd
wsd-30110-00 00:00:00.000467 [ loolwsd ] Log level is [8].
wsd-30110-00 00:00:00.001186 [ loolwsd ] SSL support: SSL is enabled.
wsd-30110-00 00:00:00.001271 [ loolwsd ] Launch this in your browser:
wsd-30110-00 00:00:00.001307 [ loolwsd ] https://localhost:9980/loleaflet/1.8.4/loleaflet.html?file_path=file:///usr/bin/test/data/hello-world.odt
wsd-30110-00 00:00:00.001342 [ loolwsd ] Open Documents Limit: 10
wsd-30110-00 00:00:00.001362 [ loolwsd ] Client Connections Limit: 20
wsd-30110-00 00:00:00.001406 [ loolwsd ] Adding trusted WOPI host: [office.xyxy.com].
wsd-30110-00 00:00:00.001431 [ loolwsd ] Adding trusted WOPI host: [10.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}].
wsd-30110-00 00:00:00.001456 [ loolwsd ] Adding trusted WOPI host: [172.1[6789].[0-9]{1,3}.[0-9]{1,3}].
wsd-30110-00 00:00:00.001482 [ loolwsd ] Adding trusted WOPI host: [172.2[0-9].[0-9]{1,3}.[0-9]{1,3}].
wsd-30110-00 00:00:00.001506 [ loolwsd ] Adding trusted WOPI host: [172.3[01].[0-9]{1,3}.[0-9]{1,3}].
wsd-30110-00 00:00:00.001533 [ loolwsd ] Adding trusted WOPI host: [192.168.[0-9]{1,3}.[0-9]{1,3}].
wsd-30110-00 00:00:00.001558 [ loolwsd ] Adding blocked WOPI host: [192.168.1.1].
wsd-30110-00 00:00:00.001650 [ loolwsd ] SSL Cert file: /etc/loolwsd/office.xyxy.pem
wsd-30110-00 00:00:00.001677 [ loolwsd ] SSL Key file: /etc/loolwsd/office.xyxy.com.key
wsd-30110-00 00:00:00.001697 [ loolwsd ] SSL CA file: /etc/loolwsd/root_bundle.pem
SSL context exception: Error loading certificate from file /etc/loolwsd/office.xyxy.pem: error:02001002:system library:fopen:No such file or directory

Awesome, you’re getting there

  1. check permissions for /etc/loolwsd/ should be lool:lool
  2. make sure you have your certificates there

all folder is (/etcloolwsd) with lool 755 permision

but after your command result is the same
SSL context exception: Error loading certificate from file /etc/loolwsd/office.xyxy.pem: error:02001002:system library:fopen:No such file or directory

Check /etc/loolwsd/loolwsd.xml for correct certificate paths.

many thanks for your helping
i put original (docker code certs and i received this error after trying with your command
root@test:~# sudo -u lool /usr/bin/loolwsd --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.1 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_path=/usr/share/loolwsd
wsd-02896-00 00:00:00.000372 [ loolwsd ] Initializing wsd
wsd-02896-00 00:00:00.000426 [ loolwsd ] Log level is [8].
wsd-02896-00 00:00:00.001054 [ loolwsd ] SSL support: SSL is enabled.
wsd-02896-00 00:00:00.001125 [ loolwsd ] Launch this in your browser:
wsd-02896-00 00:00:00.001162 [ loolwsd ] https://localhost:9980/loleaflet/1.8.4/loleaflet.html?file_path=file:///usr/bin/test/data/hello-world.odt
wsd-02896-00 00:00:00.001197 [ loolwsd ] Open Documents Limit: 10
wsd-02896-00 00:00:00.001219 [ loolwsd ] Client Connections Limit: 20
wsd-02896-00 00:00:00.001266 [ loolwsd ] Adding trusted WOPI host: [office.xyxy.com].
wsd-02896-00 00:00:00.001297 [ loolwsd ] Adding trusted WOPI host: [10.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}].
wsd-02896-00 00:00:00.001324 [ loolwsd ] Adding trusted WOPI host: [172.1[6789].[0-9]{1,3}.[0-9]{1,3}].
wsd-02896-00 00:00:00.001351 [ loolwsd ] Adding trusted WOPI host: [172.2[0-9].[0-9]{1,3}.[0-9]{1,3}].
wsd-02896-00 00:00:00.001379 [ loolwsd ] Adding trusted WOPI host: [172.3[01].[0-9]{1,3}.[0-9]{1,3}].
wsd-02896-00 00:00:00.001400 [ loolwsd ] Adding trusted WOPI host: [192.168.[0-9]{1,3}.[0-9]{1,3}].
wsd-02896-00 00:00:00.001427 [ loolwsd ] Adding blocked WOPI host: [192.168.1.1].
wsd-02896-00 00:00:00.001508 [ loolwsd ] SSL Cert file: /etc/loolwsd/cert.pem
wsd-02896-00 00:00:00.001527 [ loolwsd ] SSL Key file: /etc/loolwsd/key.pem
wsd-02896-00 00:00:00.001543 [ loolwsd ] SSL CA file: /etc/loolwsd/ca-chain.cert.pem
wsd-02896-00 00:00:00.005136 [ loolwsd ] FileServerRoot: /usr/share/loolwsd
wsd-02896-00 00:00:00.005258 [ loolwsd ] mkfifo(/opt/lool/child-roots/pipe/loolwsdfifo)
wsd-02896-00 00:00:00.005295 [ loolwsd ] File server ctor.
wsd-02896-00 00:00:00.005827 [ loolwsd ] Starting master server listening on 9980
wsd-02896-00 00:00:00.005927 [ loolwsd ] Starting prisoner server listening on 9981
wsd-02896-00 00:00:00.005995 [ loolwsd ] Launching forkit process: /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice5.1 --childroot=/opt/lool/child-roots/ --clientport=9980
frk-02905-00 00:00:00.000504 [ loolforkit ] Initializing frk
frk-02905-00 00:00:00.000575 [ loolforkit ] Log level is [8].
frk-02905-00 00:00:00.000620 [ loolforkit ] Note: LD_BIND_NOW is not set.
frk-02905-00 00:00:00.000632 [ loolforkit ] Note: LOK_VIEW_CALLBACK is not set.
frk-02905-00 00:00:00.000696 [ loolforkit ] open(/opt/lool/child-roots/pipe/loolwsdfifo, RDONLY) = 4
wsd-02896-00 00:00:00.013615 [ loolwsd ] open(/opt/lool/child-roots/pipe/loolwsdfifo, WRONLY) = 8
wsd-02896-00 00:00:00.013710 [ loolwsd ] AdminModel ctor.
wsd-02896-00 00:00:00.013921 [ loolwsd ] Admin ctor.
wsd-02896-00 00:00:00.014123 [ loolwsd ] Memory stat ctor
wsd-02896-00 00:00:00.014214 [ loolwsd ] Cpu stat ctor
frk-02905-00 00:00:00.001623 [ loolforkit ] Failed to load /opt/collaboraoffice5.1/program/libmergedlo.so: libcairo.so.2: cannot open shared object file: No such file or directory
wsd-02896-00 00:00:02.014438 [ loolwsd ] Child process [2905] exited with code: 70.
wsd-02896-00 00:00:02.508912 [ loolwsd ] Requesting child process 2905 to terminate
wsd-02896-00 00:00:02.509053 [ loolwsd ] Util::requestTermination: Exception: cannot terminate process
wsd-02896-00 00:00:02.509094 [ loolwsd ] Cleaning up childroot directory [/opt/lool/child-roots/].
wsd-02896-00 00:00:02.509222 [ loolwsd ] Removing jail [/opt/lool/child-roots/pipe].
wsd-02896-00 00:00:02.509494 [ loolwsd ] Process [loolwsd] finished.
wsd-02896-00 00:00:02.510245 [ loolwsd ] File Server dtor.
wsd-02896-00 00:00:02.510357 [ loolwsd ] ~Admin dtor.
wsd-02896-11 00:00:02.510420 [ loolwsd ] Cpu stat dtor
wsd-02896-10 00:00:02.510519 [ loolwsd ] Memory stat dtor
wsd-02896-00 00:00:02.510583 [ loolwsd ] AdminModel dtor.

may be i need to install other librarry too
( libcairo.so.2 and libmergedlo.so )

check for permissions for folders inside /opt/lool

there should be 2 folders child-roots and systemplate both should have lool:lool permissions

error says that can’t open file/folder – it’s usually either permission thing or files are missing.

Let me know if it’s not going to work.

both folder have lool:lool permision (755)
i started to install libreoffice package because it is getting libcairo package also

Docker should already have everything, let me know.
you may need to do this also https://github.com/LibreOffice/online/blob/master/loolwsd/debian/loolwsd.postinst#L23

root@test:~# sudo -u lool /usr/bin/loolwsd --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.1 --o:child_root_path=/opt/lool/child-roots --o:file_server_root_pa th=/usr/share/loolwsd
wsd-09319-00 00:00:00.000423 [ loolwsd ] Initializing wsd
wsd-09319-00 00:00:00.000478 [ loolwsd ] Log level is [8].
wsd-09319-00 00:00:00.001113 [ loolwsd ] SSL support: SSL is enabled.
wsd-09319-00 00:00:00.001186 [ loolwsd ] Launch this in your browser:
wsd-09319-00 00:00:00.001239 [ loolwsd ] https://localhost:9980/loleaflet/1.8.4/loleaflet.html?file_path=file:///usr/bin/test/data/hello-world.odt
wsd-09319-00 00:00:00.001297 [ loolwsd ] Open Documents Limit: 10
wsd-09319-00 00:00:00.001315 [ loolwsd ] Client Connections Limit: 20
wsd-09319-00 00:00:00.001366 [ loolwsd ] Adding trusted WOPI host: [office.xyxy.com].
wsd-09319-00 00:00:00.001390 [ loolwsd ] Adding trusted WOPI host: [10.[0-9]{1,3}.[0-9]{1,3}.[0-9]{1,3}].
wsd-09319-00 00:00:00.001410 [ loolwsd ] Adding trusted WOPI host: [172.1[6789].[0-9]{1,3}.[0-9]{1,3}].
wsd-09319-00 00:00:00.001437 [ loolwsd ] Adding trusted WOPI host: [172.2[0-9].[0-9]{1,3}.[0-9]{1,3}].
wsd-09319-00 00:00:00.001465 [ loolwsd ] Adding trusted WOPI host: [172.3[01].[0-9]{1,3}.[0-9]{1,3}].
wsd-09319-00 00:00:00.001491 [ loolwsd ] Adding trusted WOPI host: [192.168.[0-9]{1,3}.[0-9]{1,3}].
wsd-09319-00 00:00:00.001519 [ loolwsd ] Adding blocked WOPI host: [192.168.1.1].
wsd-09319-00 00:00:00.001599 [ loolwsd ] SSL Cert file: /etc/loolwsd/cert.pem
wsd-09319-00 00:00:00.001619 [ loolwsd ] SSL Key file: /etc/loolwsd/key.pem
wsd-09319-00 00:00:00.001636 [ loolwsd ] SSL CA file: /etc/loolwsd/ca-chain.cert.pem
wsd-09319-00 00:00:00.005420 [ loolwsd ] FileServerRoot: /usr/share/loolwsd
wsd-09319-00 00:00:00.005551 [ loolwsd ] mkfifo(/opt/lool/child-roots/pipe/loolwsdfifo)
wsd-09319-00 00:00:00.005591 [ loolwsd ] File server ctor.
wsd-09319-00 00:00:00.006392 [ loolwsd ] Starting master server listening on 9980
wsd-09319-00 00:00:00.006501 [ loolwsd ] Starting prisoner server listening on 9981
wsd-09319-00 00:00:00.006575 [ loolwsd ] Launching forkit process: /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice5.1 --childroot=/opt/lool/ child-roots/ --clientport=9980
frk-09328-00 00:00:00.000548 [ loolforkit ] Initializing frk
frk-09328-00 00:00:00.000606 [ loolforkit ] Log level is [8].
frk-09328-00 00:00:00.000660 [ loolforkit ] Note: LD_BIND_NOW is not set.
frk-09328-00 00:00:00.000678 [ loolforkit ] Note: LOK_VIEW_CALLBACK is not set.
wsd-09319-00 00:00:00.014631 [ loolwsd ] open(/opt/lool/child-roots/pipe/loolwsdfifo, WRONLY) = 8
wsd-09319-00 00:00:00.014673 [ loolwsd ] AdminModel ctor.
wsd-09319-00 00:00:00.014782 [ loolwsd ] Admin ctor.
wsd-09319-00 00:00:00.014804 [ loolwsd ] Memory stat ctor
frk-09328-00 00:00:00.000978 [ loolforkit ] open(/opt/lool/child-roots/pipe/loolwsdfifo, RDONLY) = 4
wsd-09319-00 00:00:00.014907 [ loolwsd ] Cpu stat ctor
frk-09328-00 00:00:02.166211 [ loolforkit ] Preinit stage OK.
frk-09328-00 00:00:02.166269 [ loolforkit ] Forking a loolkit process.
frk-09328-00 00:00:02.167578 [ loolforkit ] Forked kit [9332].
frk-09328-00 00:00:02.167648 [ loolforkit ] ForKit process is ready.
kit-09332-00 00:00:02.167963 [ loolforkit ] Initializing kit
kit-09332-00 00:00:02.168025 [ loolforkit ] Log level is [8].
kit-09332-00 00:00:02.168082 [ loolkit ] Process started.
kit-09332-00 00:00:02.168207 [ loolkit ] Jail path: /opt/lool/child-roots/9332/
kit-09332-00 00:00:02.168456 [ loolkit ] symlink("…/lo","/opt/lool/child-roots/9332/opt/collaboraoffice5.1")
kit-09332-00 00:00:02.197969 [ loolkit ] skip redundant paths program/wizards
kit-09332-00 00:00:02.220712 [ loolkit ] skip redundant paths share/template
kit-09332-00 00:00:02.221271 [ loolkit ] skip redundant paths share/gallery
kit-09332-00 00:00:02.259347 [ loolkit ] skip redundant paths share/config/wizard
kit-09332-00 00:00:02.304828 [ loolkit ] skip redundant paths share/Scripts
kit-09332-00 00:00:02.308774 [ loolkit ] skip redundant paths share/basic
kit-09332-00 00:00:02.386785 [ loolkit ] Initialized jail files.
kit-09332-00 00:00:02.386968 [ loolkit ] chroot("/opt/lool/child-roots/9332/")
kit-09332-00 00:00:02.387040 [ loolkit ] Capabilities first: = cap_fowner,cap_sys_chroot,cap_mknod+ep
kit-09332-00 00:00:02.387067 [ loolkit ] Capabilities now: = cap_fowner,cap_mknod+ep
kit-09332-00 00:00:02.387084 [ loolkit ] Capabilities first: = cap_fowner,cap_mknod+ep
kit-09332-00 00:00:02.387105 [ loolkit ] Capabilities now: = cap_fowner+ep
kit-09332-00 00:00:02.387129 [ loolkit ] Capabilities first: = cap_fowner+ep
kit-09332-00 00:00:02.387149 [ loolkit ] Capabilities now: =
kit-09332-00 00:00:02.387166 [ loolkit ] Initialized jail nodes, dropped caps.
kit-09332-00 00:00:02.837647 [ loolkit ] Process is ready.
wsd-09319-02 00:00:02.852319 [ prsnr_req_hdl ] Request from 127.0.0.1:56986: GET /loolws/newchild?pid=9332&version=%7B%20%22ProductName%22:%20%22Collabora%20Office%22,%20%22ProductVersion%22:%20%22 5.1%22,%20%22ProductExtension%22:%20%22.10.9%22,%20%22BuildId%22:%20%22fc74cf662ce4c50e9f9e65d843bc5ea85f4e8e4e%22%20%7D HTTP/1.0 / Connection: Upgrade / Upgrade: websocket / Sec-WebSocket-Version: 13 / Sec-WebSocket-Key: tOt3Uzk29Bvn7sRAPTcTTw== / Host: 127.0.0.1:9981
wsd-09319-02 00:00:02.852440 [ prison_ws ] Child connection with URI [/loolws/newchild?pid=9332&version=%7B%20%22ProductName%22:%20%22Collabora%20Office%22,%20%22ProductVersion%22:%20%225.1%22,%20% 22ProductExtension%22:%20%22.10.9%22,%20%22BuildId%22:%20%22fc74cf662ce4c50e9f9e65d843bc5ea85f4e8e4e%22%20%7D].
wsd-09319-02 00:00:02.852516 [ prison_ws ] New child [9332].
wsd-09319-02 00:00:02.852704 [ prison_ws ] ChildProcess ctor [9332].
wsd-09319-02 00:00:02.852821 [ prison_ws ] Have 1 child.
kit-09332-00 00:00:02.839164 [ loolkit ] SocketProcessor starting.
wsd-09319-00 00:00:02.853383 [ prison_ws ] SocketProcessor starting.
wsd-09319-10 00:00:05.035057 [ loolwsd ] Total memory used: 164992
wsd-09319-10 00:00:15.073969 [ loolwsd ] Total memory used: 165004
wsd-09319-10 00:00:20.093921 [ loolwsd ] Total memory used: 165220
wsd-09319-10 00:00:30.133673 [ loolwsd ] Total memory used: 165504
wsd-09319-10 00:00:40.173247 [ loolwsd ] Total memory used: 165852
wsd-09319-10 00:01:15.310509 [ loolwsd ] Total memory used: 165864

and also on nextcloud i have this error
Collabora Online: SSL certificate is not installed.
Please ask your administrator to add ca-chain.cert.pem to the ca-bundle.crt, for example “cat /etc/loolwsd/ca-chain.cert.pem >> /resources/config/ca-bundle.crt” . The exact error message was: cURL error 60: SSL certificate problem: self signed certificate in certificate chain

Good, your collabora is now working. You can run it as a service now and fix the ssl issue

here is also service working
● loolwsd.service - loolwsd as a service
Loaded: loaded (/etc/systemd/system/loolwsd.service; enabled; vendor preset: enabled)
Active: active (running) since Wed 2016-10-26 10:24:20 ECT; 6min ago
Main PID: 1421 (loolwsd)
Tasks: 17 (limit: 4915)
Memory: 218.2M
CPU: 4.405s
CGroup: /system.slice/loolwsd.service
├─1421 /usr/bin/loolwsd --o:sys_template_path=/opt/lool/systemplate --o:lo_template_path=/opt/collaboraoffice5.1 --o:child_root_path=/opt/lool/c
├─1520 /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice5.1 --childroot=/opt/lool/child-r
└─1548 /usr/bin/loolforkit --losubpath=lo --systemplate=/opt/lool/systemplate --lotemplate=/opt/collaboraoffice5.1 --childroot=/opt/lool/child-r

Oct 26 10:24:22 test loolwsd[1421]: wsd-01421-00 00:00:02.570962 [ prison_ws ] SocketProcessor starting.
Oct 26 10:24:25 test loolwsd[1421]: wsd-01421-10 00:00:05.151371 [ loolwsd ] Total memory used: 167580
Oct 26 10:24:30 test loolwsd[1421]: wsd-01421-10 00:00:10.200772 [ loolwsd ] Total memory used: 167592
Oct 26 10:24:50 test loolwsd[1421]: wsd-01421-10 00:00:30.400007 [ loolwsd ] Total memory used: 168160
Oct 26 10:25:10 test loolwsd[1421]: wsd-01421-10 00:00:50.592276 [ loolwsd ] Total memory used: 168284
Oct 26 10:26:16 test loolwsd[1421]: wsd-01421-10 00:01:56.223673 [ loolwsd ] Total memory used: 168292
Oct 26 10:26:26 test loolwsd[1421]: wsd-01421-10 00:02:06.321945 [ loolwsd ] Total memory used: 168296
Oct 26 10:26:41 test loolwsd[1421]: wsd-01421-10 00:02:21.467832 [ loolwsd ] Total memory used: 168300
Oct 26 10:27:06 test loolwsd[1421]: wsd-01421-10 00:02:46.709327 [ loolwsd ] Total memory used: 168364
Oct 26 10:28:12 test loolwsd[1421]: wsd-01421-10 00:03:52.345936 [ loolwsd ] Total memory used: 168368
~

but nextcloud give same error
which certificate that i must put inside of (nextcloud/recourses/config )

Do you use a signed certificate for your nextcloud?

yes
for nextcloud i have cloud.xyxy.com (it is signed by startssl certificate )and for collabora i have office.xyxy.com (startssl signed)

Hmm, the error says something’s up with the chain. Try checking your website here: https://www.ssllabs.com/ssltest/
Make sure you get A+ =)

test result is perfect

thanks your script. do I need change HOTSTNAME? is it OK if I directly use www.fdqn.net?