# Community Document Server under FreeBSD?

**URL:** <https://help.nextcloud.com/t/community-document-server-under-freebsd/69820>\
**Category:** ℹ️ Support\
**Tags:** office\
**Created:** [February 1, 2020, 12:41am UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820 "2020-02-01T00:41:19Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![danb35](https://help.nextcloud.com/letter_avatar/danb35/32/5_5575768a8748004e209b776fc1b2916d.png) [@danb35](https://help.nextcloud.com/u/danb35)\
**Post date:** [February 1, 2020, 12:41am UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/1 "2020-02-01T00:41:19Z")

</div>

Nextcloud version _(eg, 12.0.2)_: 18.0.0  
Operating system and version _(eg, Ubuntu 17.04)_: FreeNAS 11.3 (using FreeBSD 11.3)  
Apache or nginx version _(eg, Apache 2.4.25)_: Caddy 1.0.4  
PHP version _(eg, 7.1)_: 7.3

The issue you are facing:  
After installing/activating the community document server, when I attempt to edit a .docx file, I get this error:  
 ![image](https://help.nextcloud.com/uploads/default/original/3X/2/1/21df0b8217ee275cc39ef6cc353c9ed254550b23.png)

Is this the first time you’ve seen this error? _(Y/N)_: Y

Steps to replicate it:

1. Install Nextcloud in a FreeNAS jail following this script: [https://github.com/danb35/freenas-iocage-nextcloud](https://github.com/danb35/freenas-iocage-nextcloud)
2. Enter the jail and run the following commands:

```auto
cd /usr/local/www/nextcloud/apps
fetch https://github.com/nextcloud/documentserver_community/releases/download/v0.1.5/documentserver_community.tar.gz
tar zxfv documentserver_community.tar.gz
rm -f documentserver_community.tar.gz
chown -R www:www documentserver_community

```

1. Enable the community document server app, download and install the OpenOffice app through the Nextcloud GUI – I’d first attempted to download and enable the document server using the GUI, but it repeatedly timed out, hence using the commands above.
2. Click on a .docx file, and see the above error

The output of your Nextcloud log in **Admin \> Logging** :  
I don’t see any way to do a text copy/paste, so here’s a screen shot:

 ![image](https://help.nextcloud.com/uploads/default/original/3X/1/e/1e3f3c266711ca56145725974a994cd54c8499c1.png)

Edit: I downloaded the nextcloud.log file; here’s the last few lines (including the while thing made the post exceed the 32kbyte limit):

```auto
{"reqId":"UFQgDogrwuVzKNja6k7V","level":3,"time":"2020-01-31T17:44:06-05:00","remoteAddr":"192.168.1.199","user":"admin","app":"PHP","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":"stream_get_contents(): supplied resource is not a valid stream resource at /usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php#76","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36","version":"18.0.0.10"}
{"reqId":"UFQgDogrwuVzKNja6k7V","level":3,"time":"2020-01-31T17:44:06-05:00","remoteAddr":"192.168.1.199","user":"admin","app":"index","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":{"Exception":"Exception","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{" __class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{" __class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":109,"Previous":{"Exception":"TypeError","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":78,"function":"trim","args":[false]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":53,"function":"lddError","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php","line":90,"function":"getHint","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"webApps","class":"OCA\\DocumentServer\\Controller\\StaticController","type":"->","args":["apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{" __class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","Line":78},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.130 Safari/537.36","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"documentserver_community","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":{"Exception":"OCA\\DocumentServer\\Document\\DocumentConversionException","Message":"sh: ./x2t: Exec format error\n","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php","line":64,"function":"run","class":"OCA\\DocumentServer\\Document\\ConverterBinary","type":"->","args":[""]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":34,"function":"test","class":"OCA\\DocumentServer\\Document\\ConverterBinary","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php","line":89,"function":"check","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"webApps","class":"OCA\\DocumentServer\\Controller\\StaticController","type":"->","args":["apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{" __class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{" __class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{" __class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Document/ConverterBinary.php","Line":56,"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"PHP","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":"fclose(): supplied resource is not a valid stream resource at /usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php#75","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"PHP","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":"stream_get_contents(): supplied resource is not a valid stream resource at /usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php#76","userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}
{"reqId":"yOPgSBdHILuurTedjusb","level":3,"time":"2020-01-31T19:30:39-05:00","remoteAddr":"192.168.1.134","user":"admin","app":"index","method":"GET","url":"/apps/documentserver_community/web-apps/apps/api/documents/api.js","message":{"Exception":"Exception","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{" __class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{" __class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{"__class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","Line":109,"Previous":{"Exception":"TypeError","Message":"trim() expects parameter 1 to be string, bool given","Code":0,"Trace":[{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":78,"function":"trim","args":[false]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","line":53,"function":"lddError","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/apps/documentserver_community/lib/Controller/StaticController.php","line":90,"function":"getHint","class":"OCA\\DocumentServer\\SetupCheck","type":"->","args":[]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":170,"function":"webApps","class":"OCA\\DocumentServer\\Controller\\StaticController","type":"->","args":["apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Http/Dispatcher.php","line":99,"function":"executeController","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/App.php","line":125,"function":"dispatch","class":"OC\\AppFramework\\Http\\Dispatcher","type":"->","args":[{"__class__":"OCA\\DocumentServer\\Controller\\StaticController"},"webApps"]},{"file":"/usr/local/www/nextcloud/lib/private/AppFramework/Routing/RouteActionHandler.php","line":47,"function":"main","class":"OC\\AppFramework\\App","type":"::","args":["OCA\\DocumentServer\\Controller\\StaticController","webApps",{"__class__":"OC\\AppFramework\\DependencyInjection\\DIContainer"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"function":"__invoke","class":"OC\\AppFramework\\Routing\\RouteActionHandler","type":"->","args":[{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/private/Route/Router.php","line":299,"function":"call_user_func","args":[{" __class__":"OC\\AppFramework\\Routing\\RouteActionHandler"},{"path":"apps/api/documents/api.js","_route":"documentserver_community.Static.webApps"}]},{"file":"/usr/local/www/nextcloud/lib/base.php","line":1008,"function":"match","class":"OC\\Route\\Router","type":"->","args":["/apps/documentserver_community/web-apps/apps/api/documents/api.js"]},{"file":"/usr/local/www/nextcloud/index.php","line":38,"function":"handleRequest","class":"OC","type":"::","args":[]}],"File":"/usr/local/www/nextcloud/apps/documentserver_community/lib/SetupCheck.php","Line":78},"CustomMessage":"--"},"userAgent":"Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:72.0) Gecko/20100101 Firefox/72.0","version":"18.0.0.10"}

```

The output of your config.php file in `/path/to/nextcloud` (make sure you remove any identifiable information!):

```auto
<?php
$CONFIG = array (
  'passwordsalt' => '(REDACTED)',
  'secret' => '(REDACTED)',
  'trusted_domains' => 
  array (
    0 => 'localhost',
    1 => 'cloud2.familybrown.org',
    2 => '192.168.1.24',
  ),
  'datadirectory' => '/mnt/files',
  'dbtype' => 'mysql',
  'version' => '18.0.0.10',
  'overwrite.cli.url' => 'https://cloud2.familybrown.org/',
  'dbname' => 'nextcloud',
  'dbhost' => 'localhost:/tmp/mysql.sock',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud',
  'dbpassword' => '(REDACTED)',
  'installed' => true,
  'instanceid' => 'oc0aozx3fw6f',
  'logtimezone' => 'America/New_York',
  'log_type' => 'file',
  'logfile' => '/var/log/nextcloud.log',
  'loglevel' => '2',
  'logrotate_size' => '104847600',
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'redis' => 
  array (
    'host' => '/tmp/redis.sock',
    'port' => 0,
  ),
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'htaccess.RewriteBase' => '/',
  'maintenance' => false,
);

```

The output of your Apache/nginx/system log in `/var/log/ ____ `:  
caddy.log:

```auto
2020/01/31 17:26:21 [INFO] Caddy version: v1.0.4
2020/01/31 17:26:21 [INFO][cache:0xc0001f8320] Started certificate maintenance routine
Activating privacy features... 2020/01/31 17:26:27 [INFO] acme: Registering account for admin@familybrown.org
2020/01/31 17:26:27 [INFO][cloud2.familybrown.org] Obtain certificate
2020/01/31 17:26:27 [INFO][cloud2.familybrown.org] Obtain: Waiting on rate limiter...
2020/01/31 17:26:27 [INFO][cloud2.familybrown.org] Obtain: Done waiting
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Obtaining bundled SAN certificate
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] AuthURL: https://acme-staging-v02.api.letsencrypt.org/acme/authz-v3/36325828
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Could not find solver for: tls-alpn-01
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Could not find solver for: http-01
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: use dns-01 solver
2020/01/31 17:26:27 [INFO] [cloud2.familybrown.org] acme: Preparing to solve DNS-01
2020/01/31 17:26:28 [INFO] cloudflare: new record for cloud2.familybrown.org, ID f2b9b88d4907b29af9496627b7a1f5ae
2020/01/31 17:26:28 [INFO] [cloud2.familybrown.org] acme: Trying to solve DNS-01
2020/01/31 17:26:28 [INFO] [cloud2.familybrown.org] acme: Checking DNS record propagation using [192.168.1.1:53]
2020/01/31 17:26:28 [INFO] Wait for propagation [timeout: 2m0s, interval: 2s]
2020/01/31 17:26:28 [INFO] [cloud2.familybrown.org] acme: Waiting for DNS record propagation.
2020/01/31 17:26:30 [INFO] [cloud2.familybrown.org] acme: Waiting for DNS record propagation.
2020/01/31 17:26:32 [INFO] [cloud2.familybrown.org] acme: Waiting for DNS record propagation.
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] The server validated our request
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] acme: Cleaning DNS-01 challenge
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] acme: Validations succeeded; requesting certificates
2020/01/31 17:26:40 [INFO] [cloud2.familybrown.org] Server responded with a certificate.
done.

Serving HTTPS on port 443 
https://cloud2.familybrown.org
https://192.168.1.24

2020/01/31 17:26:41 [INFO] Serving https://cloud2.familybrown.org 
2020/01/31 17:26:41 [INFO] Serving https://192.168.1.24 

Serving HTTP on port 80 
http://cloud2.familybrown.org

2020/01/31 17:26:41 [INFO] Serving http://cloud2.familybrown.org 
2020/01/31 17:28:56 http: TLS handshake error from 192.168.1.199:64651: remote error: tls: unknown certificate
2020/01/31 17:28:56 http: TLS handshake error from 192.168.1.199:64656: remote error: tls: unknown certificate
2020/01/31 17:28:56 http: TLS handshake error from 192.168.1.199:64659: remote error: tls: unknown certificate
2020/01/31 17:29:00 http: TLS handshake error from 192.168.1.199:64666: remote error: tls: unknown certificate
2020/01/31 17:29:00 http: TLS handshake error from 192.168.1.199:64668: remote error: tls: unknown certificate
2020/01/31 17:40:58 http: TLS handshake error from 192.168.1.24:18253: remote error: tls: unknown certificate authority
2020/01/31 17:43:22 [INFO] SIGTERM: Shutting down servers then terminating
2020/01/31 17:43:22 [INFO][cache:0xc0001f8320] Stopped certificate maintenance routine

```

---

<div class="post-metadata">

**Author:** ![Schmu](https://help.nextcloud.com/user_avatar/help.nextcloud.com/schmu/32/7823_2.png) [@Schmu](https://help.nextcloud.com/u/Schmu)\
**Post date:** [February 1, 2020, 12:11pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/2 "2020-02-01T12:11:15Z")

</div>

Hi,

can you search for “x2t” in the folder nextcloud/apps/documentserver\_community. It exists in a bin folder. Give the binaries x2t and docbuilder (=edited. Had it wrong with ‘docserver’ before) execution permission for the owner ‘www’ and then try again.  
I had the error that the execution permission was missing after installing the app.

---

<div class="post-metadata">

**Author:** ![SmallOne](https://help.nextcloud.com/user_avatar/help.nextcloud.com/smallone/32/5326_2.png) [@SmallOne](https://help.nextcloud.com/u/SmallOne)\
**Post date:** [February 1, 2020, 12:19pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/3 "2020-02-01T12:19:29Z")

</div>

the binary x2t is linux and x86 only as far as i know.

---

<div class="post-metadata">

**Author:** ![danb35](https://help.nextcloud.com/letter_avatar/danb35/32/5_5575768a8748004e209b776fc1b2916d.png) [@danb35](https://help.nextcloud.com/u/danb35)\
**Post date:** [February 1, 2020, 12:35pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/4 "2020-02-01T12:35:02Z")

</div>

> [@Schmu](#):
>
> Give the binaries x2t and docserver execution permission for the owner ‘www’ and then try again.

x2t is owned by www and is executable for all users:

```plaintext
root@nextcloud:/usr/local/www/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin # ll
total 59786
-rw-r--r-- 1 www www 110623 Jan 24 08:48 AllFonts.js
-rwxr-xr-x 1 www www 35176 Nov 22 11:48 docbuilder*
-rw-r--r-- 1 www www 832 Nov 22 11:46 DoctRenderer.config
drwxr-xr-x 2 www www 5 Nov 22 12:00 empty/
-rw-r--r-- 1 www www 45840 Jan 24 08:48 font_selection.bin
drwxr-xr-x 4 www www 17 Nov 22 12:00 HtmlFileInternal/
-rw-r--r-- 1 www www 10175056 Nov 22 11:46 icudtl.dat
-rw-r--r-- 1 www www 1267776 Nov 22 11:48 libDjVuFile.so
-rw-r--r-- 1 www www 16688688 Nov 22 11:48 libdoctrenderer.so
-rw-r--r-- 1 www www 6290104 Nov 22 11:48 libgraphics.so
-rw-r--r-- 1 www www 117808 Nov 22 11:48 libHtmlFile.so
-rw-r--r-- 1 www www 216416 Nov 22 11:48 libHtmlRenderer.so
-rw-r--r-- 1 www www 26215064 Nov 22 11:48 libicudata.so.58
-rw-r--r-- 1 www www 1849888 Nov 22 11:48 libicuuc.so.58
-rw-r--r-- 1 www www 2144760 Nov 22 11:48 libkernel.so
-rw-r--r-- 1 www www 4540960 Nov 22 11:48 libPdfReader.so
-rw-r--r-- 1 www www 3541320 Nov 22 11:48 libPdfWriter.so
-rw-r--r-- 1 www www 237368 Nov 22 11:48 libUnicodeConverter.so
-rw-r--r-- 1 www www 236976 Nov 22 11:48 libXpsFile.so
-rwxr-xr-x 1 www www 37453856 Nov 22 11:48 x2t*

```

I don’t find any binary or other file under the Nextcloud apps directory called `docserver`:

```plaintext
root@nextcloud:/usr/local/www/nextcloud/apps # find . -name docserver
root@nextcloud:/usr/local/www/nextcloud/apps # 

```

> [@SmallOne](#):
>
> the binary x2t is linux and x86 only

That does appear to be the case:

```plaintext
root@nextcloud:/usr/local/www/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin # file x2t
x2t: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.24, BuildID[sha1]=702ce357ba48aa06b820eba41081d1a5a83ff39b, stripped

```

x86 isn’t an issue, as that’s the only architecture FreeNAS runs on anyway, but the Linux thing would seem to explain the problem. Bother. I seem to recall hearing that there’s a way to run Linux binaries under FreeBSD–I’ll have to look into that.

Edit: OK, some progress. FreeBSD includes Linux binary compatibility–load a kernel module, install a package with base Linux libraries, and it should be good. `x2t` now runs:

```plaintext
root@nextcloud:/usr/local/www/nextcloud/apps/documentserver_community/3rdparty/onlyoffice/documentserver/server/FileConverter/bin # ./x2t

-------------------------------------------------------------------------------
		OOX/binary file converter. Version: 5.4.2.46
-------------------------------------------------------------------------------

USAGE: x2t "path_to_params_xml"
or
USAGE: x2t "path_to_file_1" "path_to_file_2" ["path_to_font_selection"]
WHERE:
	"path_to_file_1" is a path to file to be converted
	"path_to_file_2" is a path to the corresponding output file
	"path_to_font_selection" is a path to 'font_selection.bin' location

NOTE: conversion direction will be calculated from file extensions

```

After restarting the jail, the behavior changes, but it still isn’t working. When I click on a .docx file in the web GUI, the browser now downloads a 6-byte file called main.dms. Its contents in hex are:

```plaintext
dan@Dan-MacBook-Pro-2453  ~/Downloads  hexdump main.dms
0000000 03 00 00 00 00 00                              
0000006

```

No new information appears in nextcloud.log near the time of this request.

---

<div class="post-metadata">

**Author:** ![danb35](https://help.nextcloud.com/letter_avatar/danb35/32/5_5575768a8748004e209b776fc1b2916d.png) [@danb35](https://help.nextcloud.com/u/danb35)\
**Post date:** [February 2, 2020, 12:25pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/5 "2020-02-02T12:25:49Z")

</div>

What else should I be checking here?

---

<div class="post-metadata">

**Author:** ![danb35](https://help.nextcloud.com/letter_avatar/danb35/32/5_5575768a8748004e209b776fc1b2916d.png) [@danb35](https://help.nextcloud.com/u/danb35)\
**Post date:** [February 5, 2020, 11:20pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/6 "2020-02-05T23:20:38Z")

</div>

Anyone? There must be a log somewhere that would show what’s happening, right?

---

<div class="post-metadata">

**Author:** ![M4TH76](https://help.nextcloud.com/letter_avatar/m4th76/32/5_5575768a8748004e209b776fc1b2916d.png) [@M4TH76](https://help.nextcloud.com/u/M4TH76)\
**Post date:** [February 11, 2020, 9:40pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/7 "2020-02-11T21:40:35Z")

</div>

Hi @danb35,

Could you share the how-to run x2t in FreeBSD?

Following this topic for a FreeNAS installation.

Thank you.

---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 8:27pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/8 "2024-12-11T20:27:22Z")

</div>



---

<div class="post-metadata">

**Author:** ![wwe](https://help.nextcloud.com/user_avatar/help.nextcloud.com/wwe/32/72963_2.png) [@wwe](https://help.nextcloud.com/u/wwe)\
**Post date:** [December 11, 2024, 8:27pm UTC](https://help.nextcloud.com/t/community-document-server-under-freebsd/69820/9 "2024-12-11T20:27:24Z")

</div>


