Why does wiki.js need public URL when installing?
Asked Answered
M

2

5

After configuring my database and running my Wiki.js instance using nodejs, I was prompted to "install" Wiki.js on localhost:3000. However, there is this input bar asking for the public URL wiki.example.com: Wiki.js installation page with public URL input I am trying wiki.js out on my own computer, which has nothing to do with public URLs. In the future, I plan to use nginx to reverse proxy received request to two different ports on my server, which also does not require public URL exposing to the service (proxied by nginx already).

Therefore I am curious: Why does wiki.js need public URL when installing? What do I need to configure when testing Wiki.js on my computer? What do I need to configure in nginx reverse proxy and what to fill here in the public URL input bar?

Miyamoto answered 13/1, 2021 at 16:22 Comment(1)
Reverse proxy doesn't work with Wiki.js if you have no exclusive (sub) domain for it. Sad but true.Universalism
F
7

TL;DR if you're on localhost and testing it doesn't matter what URL you put. Also note that this setting can be easily changed after installation from admin area.

I was deploying wiki.js in our company and first I was setting it up on throwaway domain before switching to target domain, and I was confused by this as well.

I've put target URL during installation and it seemed at first like this setting is unused - I was able to use wiki normally. Later I found out that it is in fact used in few places like for example when user requests password reset, the reset link will be generated against this URL.

Note that while using reverse proxy allows you to easily change on which domain name is wiki.js served, if the wiki is public for users, the system WILL have to know this public URL, for reasons like password reset mentioned above.

Focus answered 12/4, 2021 at 12:6 Comment(0)
C
1

The public url may appear in emails sent to events. In this case, the system needs to know where it is available. This is even more important based on what you describe, because hiding behind different proxies will no longer be able to identify the availability of your own url.

Containerize answered 7/7, 2021 at 14:58 Comment(1)
Please explain why a (reverse) proxy "hides" something. I'm only allowed to use port 80 for web services running on "my" server. Even if I could change the port of Wiki.js it would be useless because it's not the only application. I'm FORCED to use a reverse proxy.Universalism

© 2022 - 2024 — McMap. All rights reserved.