[Support] Linuxserver.io - Wikijs


Recommended Posts

linuxserver_medium.png?v=4&s=4000

 

Application Name: Wikijs
Application Site: https://github.com/Requarks/wiki
Docker Hub: https://hub.docker.com/r/linuxserver/wikijs/
Github: https://github.com/linuxserver/docker-wikijs

 

Please post any questions/issues relating to this docker you have in this thread.

If you are not using Unraid (and you should be!) then please do not post here, rather use the linuxserver.io forum for support.

  • Like 2
Link to comment
  • 2 months later...

Question regarding usage of this container.

It seems this container comes with a SQlight DB already set up. However the documentation of Wiki.js actually advised not to use SQlight and use PostegrSQL instead.  In fact it mentions:

 

Quote

 

These engines (MySQL, MariaDB, MS SQL Server and SQLite) may not be supported in the next major version of Wiki.js. Make sure you understand the implications of migrating your database to PostgreSQL if you plan on upgrading to 3.x+ in the coming years.

SQLite is not recommended for production deployments.

 

 

 

So the question is, does this container support the use of other DB back-ends? And if yes, does it use the environment variables mentioned in the official documentation or does it work differently?

Another reason to use PostegreSQL would be the search function as the one included with SQlite is much more limited compared to PostegreSQL.

 

As normally @linuxserver.io knows what it is doing I would be curious to know why the choice for SQLight was made and the use of another DB  not documented. Was this a deliberate choice or maybe an oversight?
Not criticism, just genuine curiosity as I would like to understand the container and it's use case better.

 

Link to comment
20 minutes ago, TheIstar said:

Question regarding usage of this container.

It seems this container comes with a SQlight DB already set up. However the documentation of Wiki.js actually advised not to use SQlight and use PostegrSQL instead.  In fact it mentions:

 

 

 

So the question is, does this container support the use of other DB back-ends? And if yes, does it use the environment variables mentioned in the official documentation or does it work differently?

Another reason to use PostegreSQL would be the search function as the one included with SQlite is much more limited compared to PostegreSQL.

 

As normally @linuxserver.io knows what it is doing I would be curious to know why the choice for SQLight was made and the use of another DB  not documented. Was this a deliberate choice or maybe an oversight?
Not criticism, just genuine curiosity as I would like to understand the container and it's use case better.

 

 

I dont know why sqlite was chosen, but did you consider  that it might have been supported at the time we released it? It is still supported in the current version.

 

You can configure the database you want by editing the config file.

 

Looking at the container it might seem like we haven't really released it properly as there are some env vars that is missing from the documentation.

Link to comment

Hi Saarg,

 

I never said it was not supported, I only pointed out that the developer warns against using it. I think it is normal then for me to worry that in some months I might have an issue where my data is stuck in a not supported database. It's called planning ahead.

And again, I was not criticizing anyone for it I was only asking why this decision was made and if it was deliberate. And if there was a way for me to setup a different DB if I want to.

 

I did see the config file, however I am/was worried it might be problematic to edit this as I can only edit this after first starting the container. Not sure if changing the DB at that point might break something.

 

Do you know what env vars are missing?

 

Link to comment
2 hours ago, TheIstar said:

Hi Saarg,

 

I never said it was not supported, I only pointed out that the developer warns against using it. I think it is normal then for me to worry that in some months I might have an issue where my data is stuck in a not supported database. It's called planning ahead.

And again, I was not criticizing anyone for it I was only asking why this decision was made and if it was deliberate. And if there was a way for me to setup a different DB if I want to.

 

I did see the config file, however I am/was worried it might be problematic to edit this as I can only edit this after first starting the container. Not sure if changing the DB at that point might break something.

 

Do you know what env vars are missing?

 

 

It's the environment variables for setting up the database connection and type. If you look at the 50-config file you can see what they are. But they are only set on first container run when there is no config file in the appdata folder.

Link to comment
16 hours ago, TheIstar said:

Aah yes I found it.

So if I would set those myself when first running the container would that overwrite those in the file, or would the file overwrite whatever I set in the run command?

The env variables only work the first time you start the container and has an empty appdata. After that you have to edit the config file to change it.

Link to comment
  • 1 month later...

Why isn't there a proxy .conf for this container? There's one for Docuwiki but not wiki.js? I'm not sure how to get this working on my subdomain: I get "502 Bad Gateway", because I'm not sure what my wikijs.subdomain.conf should look like, and I don't know what kind of additional configuration is required in the config.yml file.

 

 

Edited by Stubbs
Link to comment

Also the search function doesn't appear to be working:

 

2021-02-15T19:37:08.451Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:08.451Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:09.935Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:09.935Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:10.937Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:10.937Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:11.940Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:11.940Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:12.940Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:12.940Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:13.947Z [MASTER] �[33mwarn�[39m: Search Engine Error:

 

Using a postgresql database.

Link to comment
3 hours ago, Stubbs said:

Why isn't there a proxy .conf for this container? There's one for Docuwiki but not wiki.js? I'm not sure how to get this working on my subdomain: I get "502 Bad Gateway", because I'm not sure what my wikijs.subdomain.conf should look like, and I don't know what kind of additional configuration is required in the config.yml file.

 

 

Because nobody has supplied one.

Link to comment
1 hour ago, Stubbs said:

Also the search function doesn't appear to be working:

 


2021-02-15T19:37:08.451Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:08.451Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:09.935Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:09.935Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:10.937Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:10.937Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:11.940Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:11.940Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:12.940Z [MASTER] �[33mwarn�[39m: Search Engine Error:
2021-02-15T19:37:12.940Z [MASTER] �[33mwarn�[39m: SELECT word, word <-> $1 AS rank FROM "pagesWords" WHERE similarity(word, $2) > 0.2 ORDER BY rank LIMIT 5; - operator does not exist: text <-> unknown
2021-02-15T19:37:13.947Z [MASTER] �[33mwarn�[39m: Search Engine Error:

 

Using a postgresql database.

Probably better to report it to wiki.js

Link to comment
  • 3 months later...

Hi,

 

I've been trying to setup Wikijs with an PostgreSQL data base, however I get an "EACCES: permission denied, mkdir '/data/cache'" I click Install when setting up the admin account and public URL. From the logs, it seems Wikijs connects to database, but not authorized, what am I doing wrong?

 

Wikijs log:

2021-06-13T12:02:03.869Z [MASTER] [32minfo[39m: =======================================
2021-06-13T12:02:03.870Z [MASTER] [32minfo[39m: = Wiki.js 2.5.201 =====================
2021-06-13T12:02:03.870Z [MASTER] [32minfo[39m: =======================================
2021-06-13T12:02:03.870Z [MASTER] [32minfo[39m: Initializing...
2021-06-13T12:02:04.315Z [MASTER] [32minfo[39m: Using database driver pg for postgres [ OK ]
2021-06-13T12:02:04.319Z [MASTER] [32minfo[39m: Connecting to database...
2021-06-13T12:02:04.332Z [MASTER] [32minfo[39m: Database Connection Successful [ OK ]
2021-06-13T12:02:06.213Z [MASTER] [33mwarn[39m: DB Configuration is empty or incomplete. Switching to Setup mode...
2021-06-13T12:02:06.213Z [MASTER] [32minfo[39m: Starting setup wizard...
2021-06-13T12:02:06.312Z [MASTER] [32minfo[39m: Starting HTTP server on port 3000...
2021-06-13T12:02:06.312Z [MASTER] [32minfo[39m: HTTP Server on port: [ 3000 ]
2021-06-13T12:02:06.315Z [MASTER] [32minfo[39m: HTTP Server: [ RUNNING ]
2021-06-13T12:02:06.315Z [MASTER] [32minfo[39m: 🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻🔻
2021-06-13T12:02:06.315Z [MASTER] [32minfo[39m:
2021-06-13T12:02:06.315Z [MASTER] [32minfo[39m: Browse to http://YOUR-SERVER-IP:3000/ to complete setup!
2021-06-13T12:02:06.315Z [MASTER] [32minfo[39m:
2021-06-13T12:02:06.315Z [MASTER] [32minfo[39m: 🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺🔺
2021-06-13T12:03:48.969Z [MASTER] [32minfo[39m: Creating data directories...

 

PostgreSQL log:

PostgreSQL Database directory appears to contain a database; Skipping initialization

2021-06-13 13:59:42.859 CEST [1] LOG: starting PostgreSQL 12.5 on x86_64-pc-linux-musl, compiled by gcc (Alpine 10.2.1_pre1) 10.2.1 20201203, 64-bit
2021-06-13 13:59:42.859 CEST [1] LOG: listening on IPv4 address "0.0.0.0", port 5432
2021-06-13 13:59:42.859 CEST [1] LOG: listening on IPv6 address "::", port 5432
2021-06-13 13:59:43.010 CEST [1] LOG: listening on Unix socket "/var/run/postgresql/.s.PGSQL.5432"
2021-06-13 13:59:43.202 CEST [21] LOG: database system was shut down at 2021-06-13 13:59:39 CEST
2021-06-13 13:59:43.269 CEST [1] LOG: database system is ready to accept connections

 

Link to comment
  • 4 weeks later...
On 2/15/2021 at 7:11 PM, Stubbs said:

Why isn't there a proxy .conf for this container? There's one for Docuwiki but not wiki.js? I'm not sure how to get this working on my subdomain: I get "502 Bad Gateway", because I'm not sure what my wikijs.subdomain.conf should look like, and I don't know what kind of additional configuration is required in the config.yml file.

 

 

Has someone been able to get the reverse proxy "swag" working with this?

 

I receive the message that the certificate is not valid, after ignoring this I receive "502"

 

--------------- Edit --------------------------

 

Got it to work:

this ist the configuration for wiki.subdomain.conf:

 

server {
    listen [::]:443 ssl http2;
    listen 443 ssl http2;
    
    server_name wiki.*;

    charset utf-8;
    client_max_body_size 50M;

    include /config/nginx/ssl.conf;

    location / {
        include /config/nginx/proxy.conf;
        proxy_set_header Host $http_host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_next_upstream http_504;
        resolver 127.0.0.11 valid=30s;
        set $upstream_app wikijs;
        set $upstream_port 3000;
        set $upstream_proto http;
        proxy_pass $upstream_proto://$upstream_app:$upstream_port;
    }
}

 

Important:

- Do not forget to Update your CNAME at your DNS provider

- Enter wiki at the Docker configuration as you can see below.

image.thumb.png.14777dabc2af9d881e4b9f951718dc48.png

Edited by RepoMordi
Solution found
Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.