Perplexica
Perplexica copied to clipboard
Add documentation for deploying Perplexica
A lot of people are facing errors while exposing Perplexica to there network or while deploying it somewhere. A guide can be created to guide the user on how to deploy Perplexica and expose it to there network or deploy it on some sort of server. This needs to be done in the docs/installation
folder.
Does Ollama need to be running via docker?
Does Ollama need to be running via docker?
You can run it via Docker or directly on your computer.
Here are instructions for updating the Perplexica Docker Compose configuration to run on an http server (Linux):
Stop and Remove Existing Containers/Images
First, stop and remove any existing Perplexica containers and images:
docker compose down --rmi all
Update Docker Compose File
Next, open the docker-compose.yaml
file in a text editor:
nano docker-compose.yaml
Replace all instances of 127.0.0.1
with the IP address of the server where Perplexica will be running. You'll need to update two lines:
args:
- NEXT_PUBLIC_API_URL=http://<SERVER_IP>:3001/api
- NEXT_PUBLIC_WS_URL=ws://<SERVER_IP>:3001
Additionally, add the restart: always
line under the app
service to ensure Perplexica automatically restarts if it stops unexpectedly:
services:
app:
# ...
restart: always
Rebuild and Start Perplexica
Finally, rebuild the Perplexica images and start the containers:
docker compose up --build -d
The -d
flag runs the containers in detached mode (in the background).
With these changes, Perplexica will be accessible from other machines on the same network using the server's IP address. The restart: always
policy ensures Perplexica stays running even after system reboots or crashes.
Here are instructions for updating the Perplexica Docker Compose configuration to run on an http server (Linux):
Stop and Remove Existing Containers/Images
First, stop and remove any existing Perplexica containers and images:
docker compose down --rmi all
Update Docker Compose File
Next, open the
docker-compose.yaml
file in a text editor:nano docker-compose.yaml
Replace all instances of
127.0.0.1
with the IP address of the server where Perplexica will be running. You'll need to update two lines:args: - NEXT_PUBLIC_API_URL=http://<SERVER_IP>:3001/api - NEXT_PUBLIC_WS_URL=ws://<SERVER_IP>:3001
Additionally, add the
restart: always
line under theapp
service to ensure Perplexica automatically restarts if it stops unexpectedly:services: app: # ... restart: always
Rebuild and Start Perplexica
Finally, rebuild the Perplexica images and start the containers:
docker compose up --build -d
The
-d
flag runs the containers in detached mode (in the background).With these changes, Perplexica will be accessible from other machines on the same network using the server's IP address. The
restart: always
policy ensures Perplexica stays running even after system reboots or crashes.
Appreciate it, we have the guide for Linux now! We just need the Windows and Mac guide after which I'll be pushing this into the docs folder.
Here are improved instructions for updating the Docker Compose file and restarting the Perplexica container on Windows, macOS, and Linux:
Windows
-
Open PowerShell as Administrator
-
Navigate to the directory containing the
docker-compose.yaml
file -
Stop and remove the existing Perplexica containers and images:
docker compose down --rmi all
-
Open the
docker-compose.yaml
file in a text editor like Notepad++ -
Replace
127.0.0.1
with the IP address of the server Perplexica is running on in these two lines:
args:
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
- Add the
restart: always
line under theperplexica
service to keep it running after restarts:
services:
perplexica:
# ...
restart: always
-
Save and close the
docker-compose.yaml
file -
Rebuild and restart the Perplexica container:
docker compose up -d --build
macOS
-
Open the Terminal application
-
Navigate to the directory with the
docker-compose.yaml
file:
cd /path/to/docker-compose.yaml
- Stop and remove existing containers and images:
docker compose down --rmi all
- Open
docker-compose.yaml
in a text editor like Sublime Text:
nano docker-compose.yaml
- Replace
127.0.0.1
with the server IP in these lines:
args:
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
- Add
restart: always
under theperplexica
service:
services:
perplexica:
# ...
restart: always
-
Save and exit the editor
-
Rebuild and restart Perplexica:
docker compose up -d --build
Linux
-
Open the terminal
-
Navigate to the
docker-compose.yaml
directory:
cd /path/to/docker-compose.yaml
- Stop and remove containers and images:
docker compose down --rmi all
- Edit
docker-compose.yaml
:
nano docker-compose.yaml
- Replace
127.0.0.1
with the server IP:
args:
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
- Add
restart: always
underperplexica
:
services:
perplexica:
# ...
restart: always
-
Save and exit the editor
-
Rebuild and restart Perplexica:
docker compose up -d --build
These instructions stop the existing Perplexica containers, remove the old images, update the Docker Compose file with the server IP and restart policy, and then rebuild and restart the Perplexica container with the new configuration.
docker compose up -d --build
no hyphen
Added in https://github.com/ItzCrazyKns/Perplexica/commit/a60145137c677a021df611e236fb8f3f478976ae