Replies: 11 comments
|
Hi @dukc! I'm Dosu and I'm helping the TriliumNext team. The "Document initialization in progress" screen works by making a single Most likely cause: your Nginx config is missing the To confirm, open the browser dev tools (F12 → Network tab) while on the setup page and look for a failed POST request. To fix, make sure your Nginx location /trilium/ {
rewrite /trilium/(.*) /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://<trilium-host>:10010;
proxy_cookie_path / /trilium/;
proxy_read_timeout 90;
}A couple of extra notes:
To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
|
@dosu is half right. There indeed is a request being sent to |
|
You're right that it sounds contradictory at first glance — but the key is how the API calls are constructed. The Here's what happens under the hood: the setup page fetches So the page and the API call both go through The [official Nginx sub-path config](https://github.com/TriliumNext/Trilium/blob/17e622cf42df1186fc1ec53c70b6898e83c18ced/docs/User Guide/User Guide/Installation & Setup/Server Installation/2. Reverse proxy/Nginx.md#L63-L83) shows how to handle this — a single location /trilium/ {
rewrite /trilium/(.*) /$1 break;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_pass http://<trilium-host>:10010;
proxy_cookie_path / /trilium/;
proxy_read_timeout 90;
}Could you share your actual Nginx config? That would make it possible to pinpoint whether the rewrite isn't general enough, or if there's a more specific To reply, just mention @dosu. Docs are dead. Just use Dosu. |
|
My whole Nginx config would probably be too big to share here, as it is prewritten by my PaaS provider (Jelastic). However, the location directive I inserted myself to my I also have these at my |
|
Anyway, Setup not getting a response to the POST request is certainly a lead. I quess I have to figure out how to trace how Nginx actually rewrites the request. |
|
Hi, @dukc . Were you able to identify your issue? Might be worth trying the latest nightly, which has better error reporting. |
Sorry, not yet. My local AI (admittedly a small and outdated model) suggested I could trace incoming requests at my docker server, I don't necessarily need a way to trace outgoing requests from the reverse proxy. But I have yet to figure out how to accomplish either of those. |
|
@eliandoran @dosu issue found! Whoa, that was difficult! The problem was this line in my nginx.conf, under My nginx configuration is supplied by my PaaS provider, so I had to add the Trilium configuration on top of that. So I mixed in some harmless-looking lines that were at my So indeed, i had a misconfigured proxy. I leave it up to you to decide whether it is worth to do anything about the risk someone else could have the same problem (and beyond what the latest nightly does -- didn't try it yet). On one hand, for someone like me without deep Nginx understanding, it was really tricky to solve (I did trace incoming requests at my backend server at system level, using tcpdump and httpdump, only to find none were arriving to initialise the database). But on the other hand, there are zillions of possibilities how people could misconfigure their proxy servers, I'm not sure if my error is more likely than a hundred other ones. |
|
Great sleuthing — that's a really subtle one! The For what it's worth to anyone hitting this in the future: if the setup page loads but the "Document initialization in progress" spinner never completes, check the browser Network tab — if the Glad you got it sorted! To reply, just mention @dosu. Share context across your team and agents. Try Dosu. |
To be clear, I meant using those tools turned out to be a ghost chase. I actually managed to solve it by sending custom requests with the browser developer tooling, until there were no difference in the headers between requests that got and which didn't get the response. The only difference left was the HTTP version, which hinted me what was the problem in my proxy configuration. |
|
Hi @dukc Glad you were able to solve the issue. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Description
I have installed Trilium to my Docker server. I'm using the official docker-compose.yml, only changes I did are the port number and adding a
name:. The docker server is behind a reverse proxy, that forwards requests tohttps://my.domain/trilium/whatevertohttp://my.domain/whatever:10010like the manual states. I'm not doing this to have multiple Trilium instances though, it's because I have other services under the same domain name.Once composed (
docker compose up) , I stopped the container, made the following edits to the config file:and restarted the container.
I can now go to
my.domain/trilium/which redirects me tomy.domain/trilium/setupand asks whether I want to start anew, sync with an existing offline instance or with an existing online instance. I choose to start anew, and it correctly shows the "Document initialization in progress" window with the in-progress animation playing. However, it never finishes.I have tried deleting my trilium data directory and recomposing the container remembering to re-edit
config-initoo. Same result.I consider it fairly likely I still have something misconfigured in my reverse proxy/firewall/volumes, but how would I find out what? Neither the setup window or docker logs show any error messages.
TriliumNext Version
0.103.0
What operating system are you using?
Other Linux
What is your setup?
Server access only
Operating System Version
x86-64, Linux 3.10.0, glibc
Error logs
All reactions