Update README.md

This commit is contained in:
Saifeddine ALOUI
2025-06-23 16:13:39 +02:00
committed by GitHub
parent 9f9f4b68ef
commit 92192a0263

View File

@@ -143,6 +143,63 @@ Alternatively, you can use the newly created `ops` command:
sudo ops add_user username:password
```
## Setup as a Service
### Using `setup_service.sh`
The repository includes a script called `setup_service.sh` to set up Ollama Proxy Server as a systemd service. This allows it to run in the background and start on boot.
1. **Download the Repository:**
```bash
git clone https://github.com/ParisNeo/ollama_proxy_server.git
cd ollama_proxy_server
```
2. **Make `setup_service.sh` Executable:**
```bash
chmod +x setup_service.sh
```
3. **Run the Script with sudo Privileges:**
```bash
sudo ./setup_service.sh /path/to/working/directory
```
Replace `/path/to/working/directory` with the path where you want to set up your proxy server.
4. **Follow Prompts:**
- You will be prompted to provide a port number (default is 11534) and log path.
- You'll also add users and their passwords which will populate `/etc/ops/authorized_users.txt`.
5. **Start the Service:**
```bash
sudo systemctl start ollama-proxy-server
```
6. **Enable the Service to Start on Boot:**
```bash
sudo systemctl enable ollama-proxy-server
```
7. **Check the Status of the Service:**
```bash
sudo journalctl -u ollama-proxy-server -f
```
### Managing Users with `ops` Command
After setting up the service, you can add more users using the new `ops` command:
```bash
sudo ops add_user username:password
```
## Contributing
Contributions are welcome! Please follow these steps: