Open lafintiger opened 4 months ago
You just need to replace 127.0.0.1
in the docker compose file with the actual domain assigned to your backend and rebuild the images (making sure the previous ones are deleted).
If anyone get this working should share
Basically @ItzCrazyKns posted the solution.
I don't know about ngrok, but likely your problem is that you are only forwarding the frontend and not the backend, I created this nginx config file for my host:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
upstream perplexica-frontend {
server localhost:3000;
}
upstream perplexica-backend {
server localhost:3001;
}
server {
server_name <redacted>;
listen 443 ssl http2;
listen [::]:443 ssl http2;
location / {
proxy_pass http://perplexica-frontend;
include proxy_params;
}
location /api {
proxy_pass http://perplexica-backend/api;
include proxy_params;
}
location /ws {
proxy_pass http://perplexica-backend;
include proxy_params;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
}
}
This does the following: Proxy requests to the frontend, except /api and /ws which are proxied to the backend. And in the docker-compose.yml I set the following:
- NEXT_PUBLIC_API_URL=https://<redacted>/api
- NEXT_PUBLIC_WS_URL=wss://<redacted>/ws
You can elaborate? Where you put this file, and wich is the name, in the compose tree under /Perplexica/ ? Or Nginx should be installed separated?
You can elaborate? Where you put this file, and wich is the name, in the compose tree under /Perplexica/ ? Or Nginx should be installed separated?
nginx is a reverse proxy like Caddy, Haproxy. Nginx just happens to be what I used. It is something extra you need to have, but If you have another reverse proxy already installed you can use that.
nginx is a reverse proxy like Caddy, Haproxy. Nginx just happens to be what I used. It is something extra you need to have, but If you have another reverse proxy already installed you can use that.
I'll try to install Nginx and go this route, perhaps this time I'm lucky. we tried Cloudflare tunnels with not luck. It would be easier if Perplexica was designed to run remote.
I'll try to use Caddy as I'm using zrok for the other projects. I'll try to translate to their syntax
one question:
Great to know
Is your feature request related to a problem? Please describe. Yes, I followed the instructions for lan access and that worked fine for accessing via lan. But when I use ngrok when I access the page the page loads but hangs on the spinning circle in the middle.
Describe the solution you'd like Instruction on how to get this awesome project accessible from off the lan. I would like to be at work and still access this from my server that I have running it.
Describe alternatives you've considered I tried ngrok and loclx. I only get the spinning circle.
Additional context None.