1
1
# Ollama Token API
2
2
3
- The ** ollama-token-api** project aims to add bearer authentication to Ollama, allowing users to secure their access without needing different client libraries. It works by validating tokens stored in a MongoDB database and reverse proxying requests to the Ollama server using Hono.
3
+ The ** ollama-token-api** project aims to add bearer authentication to Ollama,
4
+ allowing users to secure their access without needing different client
5
+ libraries. It works by validating tokens stored in a MongoDB database and
6
+ reverse proxying requests to the Ollama server using Hono.
4
7
5
8
## Table of Contents
9
+
6
10
- [ Features] ( #features )
7
11
- [ Installation] ( #installation )
8
12
- [ Using Docker (Recommended)] ( #using-docker-recommended )
@@ -13,59 +17,77 @@ The **ollama-token-api** project aims to add bearer authentication to Ollama, al
13
17
14
18
## Features
15
19
16
- - ** Bearer Authorization:** Implement OAuth2 bearer token authentication for Ollama.
20
+ - ** Bearer Authorization:** Implement OAuth2 bearer token authentication for
21
+ Ollama.
17
22
- ** MongoDB Token Storage:** Store and retrieve tokens from a MongoDB database.
18
- - ** Honol Reverse Proxying:** Use Hono to reverse proxy requests to the Ollama server.
19
- - ** Highly Customizable:** Configurable via environmental variables or configuration files.
23
+ - ** Honol Reverse Proxying:** Use Hono to reverse proxy requests to the Ollama
24
+ server.
25
+ - ** Highly Customizable:** Configurable via environmental variables or
26
+ configuration files.
20
27
21
28
## Installation
22
29
23
30
### Using Docker (Recommended)
24
31
25
- You can deploy this API using Docker. The official Docker image is available on both GitHub and our private registry.
32
+ You can deploy this API using Docker. The official Docker image is available on
33
+ both GitHub and our private registry.
26
34
27
35
#### Pulling Docker Image from Public Registry
36
+
28
37
``` sh
29
38
docker pull ghcr.io/clowdertech/ollama-token-api:latest
30
39
```
31
40
32
41
Or, for a specific tag:
42
+
33
43
``` sh
34
44
docker pull ghcr.io/clowdertech/ollama-token-api:< tag>
35
45
```
36
46
37
47
#### Pulling Docker Image from Private Forgejo Registry
38
48
39
- If you aim to contribute or access the latest development builds, use our dedicated registry.
49
+ If you aim to contribute or access the latest development builds, use our
50
+ dedicated registry.
40
51
41
52
``` sh
42
53
docker pull forgejo.clowdertech.com/clowdertech/ollama-token-api:master
43
54
```
44
55
45
56
### Manual Installation
46
57
47
- TODO: Add detailed installation instructions for manual setup (including setting up MongoDB and Hono).
58
+ TODO: Add detailed installation instructions for manual setup (including setting
59
+ up MongoDB and Hono).
48
60
49
61
## Usage
50
62
51
- Once installed, start using Ollama Token API by sending requests with appropriately authenticated bearer tokens.
63
+ Once installed, start using Ollama Token API by sending requests with
64
+ appropriately authenticated bearer tokens.
65
+
66
+ For additional configuration options or advanced usage, please refer to the
67
+ following file:
52
68
53
- For additional configuration options or advanced usage, please refer to the following file:
54
69
- [ docs/configuration.md] ( docs/configuration.md )
55
70
56
71
## Contributing
57
- Contributions are highly welcomed! If you wish to contribute to this project, please follow these steps:
58
72
59
- 1 . Fork this repository using Forgejo (https://forgejo.clowdertech.com/clowdertech/ollama-token-api ).
73
+ Contributions are highly welcomed! If you wish to contribute to this project,
74
+ please follow these steps:
75
+
76
+ 1 . Fork this repository using Forgejo
77
+ (https://forgejo.clowdertech.com/clowdertech/ollama-token-api ).
60
78
2 . Create a new feature branch from ` master ` .
61
79
3 . Commit your changes following standard conventions.
62
80
4 . Push the branch to your fork and create a Pull Request.
63
81
64
82
For more details on contribution guidelines, see:
83
+
65
84
- [ CONTRIBUTING.md] ( CONTRIBUTING.md )
66
85
67
86
## License
68
- This project is licensed under the terms of the ** Apache License** . See LICENSE file for full details.
87
+
88
+ This project is licensed under the terms of the ** Apache License** . See LICENSE
89
+ file for full details.
69
90
70
91
---
71
- * Built with ❤️ by ClowderTech*
92
+
93
+ _ Built with ❤️ by ClowderTech_
0 commit comments