perplexica/docs/installation/NETWORKING.md

110 lines
2.2 KiB
Markdown
Raw Normal View History

2024-05-11 04:53:05 +00:00
# Expose Perplexica to a network
This guide will show you how to make Perplexica available over a network. Follow these steps to allow computers on the same network to interact with Perplexica. Choose the instructions that match the operating system you are using.
## Windows
1. Open PowerShell as Administrator
2. Navigate to the directory containing the `docker-compose.yaml` file
3. Stop and remove the existing Perplexica containers and images:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
docker compose down --rmi all
```
2024-05-11 04:53:05 +00:00
4. Open the `docker-compose.yaml` file in a text editor like Notepad++
5. Replace `127.0.0.1` with the IP address of the server Perplexica is running on in these two lines:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
args:
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
```
2024-05-11 04:53:05 +00:00
6. Save and close the `docker-compose.yaml` file
7. Rebuild and restart the Perplexica container:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
docker compose up -d --build
```
2024-05-11 04:53:05 +00:00
2024-05-12 06:45:53 +00:00
## macOS
2024-05-11 04:53:05 +00:00
1. Open the Terminal application
2. Navigate to the directory with the `docker-compose.yaml` file:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
cd /path/to/docker-compose.yaml
```
2024-05-11 04:53:05 +00:00
3. Stop and remove existing containers and images:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
docker compose down --rmi all
```
2024-05-11 04:53:05 +00:00
4. Open `docker-compose.yaml` in a text editor like Sublime Text:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
nano docker-compose.yaml
```
2024-05-11 04:53:05 +00:00
5. Replace `127.0.0.1` with the server IP in these lines:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
args:
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
```
2024-05-11 04:53:05 +00:00
6. Save and exit the editor
7. Rebuild and restart Perplexica:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
docker compose up -d --build
```
2024-05-11 04:53:05 +00:00
## Linux
2024-05-12 06:45:53 +00:00
1. Open the terminal
2024-05-11 04:53:05 +00:00
2. Navigate to the `docker-compose.yaml` directory:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
cd /path/to/docker-compose.yaml
```
2024-05-11 04:53:05 +00:00
3. Stop and remove containers and images:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
docker compose down --rmi all
```
2024-05-11 04:53:05 +00:00
4. Edit `docker-compose.yaml`:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
nano docker-compose.yaml
```
2024-05-11 04:53:05 +00:00
5. Replace `127.0.0.1` with the server IP:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
args:
- NEXT_PUBLIC_API_URL=http://127.0.0.1:3001/api
- NEXT_PUBLIC_WS_URL=ws://127.0.0.1:3001
```
2024-05-11 04:53:05 +00:00
6. Save and exit the editor
7. Rebuild and restart Perplexica:
2024-05-12 06:45:53 +00:00
2024-12-05 14:49:52 +00:00
```bash
docker compose up -d --build
```