Skip to content

Commit 15a3086

Browse files
authored
Merge pull request #63 from linkwarden/dev
Dev
2 parents 14222b7 + 1a85383 commit 15a3086

File tree

4 files changed

+53
-11
lines changed

4 files changed

+53
-11
lines changed

docs/self-hosting/ai-worker.md

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ sidebar_position: 2
44

55
# AI Tagging
66

7-
The AI Tagging feature uses [Ollama](https://github.com/ollama/ollama) behind the scenes. If you're self-hosting Linkwarden, you need to set up Ollama and pull your preferred model onto your server to use this feature. A lightweight model like the `phi3:mini-4k` is enough for this feature.
7+
You need to set up an AI provider to use the AI tagging feature in your self-hosted instance of the app. This feature allows you to automatically tag your media files with relevant keywords, making it easier to search and organize your content.
8+
9+
## Supported Providers
10+
11+
### Ollama Provider
12+
13+
You can set up [Ollama](https://github.com/ollama/ollama) and pull your preferred model onto your server to use this feature. A lightweight model like the `phi3:mini-4k` is enough for this feature.
814

915
After that, you need to define the `NEXT_PUBLIC_OLLAMA_ENDPOINT_URL` and `OLLAMA_MODEL` environment variables inside your `.env` file.
1016

@@ -14,3 +20,28 @@ Here's an example:
1420
NEXT_PUBLIC_OLLAMA_ENDPOINT_URL=http://localhost:11434
1521
OLLAMA_MODEL=phi3:mini-4k
1622
```
23+
24+
### OpenAI Compatible Provider
25+
26+
You can use an OpenAI-compatible provider for AI tagging by defining the following environment variables in your `.env` file:
27+
28+
```
29+
CUSTOM_OPENAI_BASE_URL=
30+
OPENAI_MODEL=
31+
OPENAI_API_KEY=
32+
```
33+
34+
Note that if you want to use OpenAI's official API, you don't need to define the `CUSTOM_OPENAI_BASE_URL` variable, as it defaults to OpenAI's API URL. Here's an example of how to set it up:
35+
36+
```
37+
OPENAI_MODEL=gpt-4o
38+
OPENAI_API_KEY=YOUR_OPENAI_API_KEY
39+
```
40+
41+
Another example, to use Gemini:
42+
43+
```
44+
CUSTOM_OPENAI_BASE_URL=https://generativelanguage.googleapis.com/v1beta
45+
OPENAI_MODEL=gemini-2.5-flash-preview-04-17
46+
OPENAI_API_KEY=YOUR_GOOGLE_AI_STUDIO_API_KEY
47+
```

docs/self-hosting/environment-variables.md

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,13 @@ sidebar_position: 3
44

55
# Environment Variables
66

7-
Here are all the additional variables you can define in the `.env` file for setting up a self-hosted instance:
7+
Here are all the additional variables you can define in the `.env` file for setting up a self-hosted instance.
8+
9+
:::note For Docker Users
10+
11+
After changing your .env file, a `$ docker compose restart` won't suffice, you'll need to do a `$ docker compose down` and `$ docker compose up -d` to have the new .env variables propagate.
12+
13+
:::
814

915
| Environment Variable | Default | Description |
1016
| --------------------- | ------- | ------------------------------------------------------------------------------ |
@@ -36,10 +42,15 @@ Digital Ocean Spaces uses AWS S3 behind the scenes, so you can also choose to st
3642

3743
## SMTP Settings
3844

39-
The variables you need to configure to enable password recovery without the admin interfering, email verification, etc...
45+
The variables you need to configure to enable password recovery without the admin interfering, email verification, etc.
46+
47+
Make sure to define the correct protocol depending on the port you want to use:
48+
49+
- `smtp://` with port 587 (STARTTLS)
50+
- `smtps://` with port 465 (Implicit SSL/TLS)
4051

41-
| Environment Variable | Default | Description |
42-
| -------------------------- | ------- | --------------------------------------------------------------------------------------------- |
43-
| NEXT_PUBLIC_EMAIL_PROVIDER | - | If set to true, email will be enabled and you'll need to define the next two variables below. |
44-
| EMAIL_FROM | - | The email that will send the verification emails. |
45-
| EMAIL_SERVER | - | That sensitive string that starts with `smtp://...` . |
52+
| Environment Variable | Default | Description |
53+
| -------------------------- | ------- | -------------------------------------------------------------------------------------------------- |
54+
| NEXT_PUBLIC_EMAIL_PROVIDER | - | If set to true, email will be enabled and you'll need to define the next two variables below. |
55+
| EMAIL_FROM | - | The email that will send the verification emails. |
56+
| EMAIL_SERVER | - | A url-encoded string with your credentials and the smtp server. (`smtp://user:password@host:port`) |

docs/self-hosting/installation.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ NEXTAUTH_SECRET=VERY_SENSITIVE_SECRET
5252
POSTGRES_PASSWORD=CUSTOM_POSTGRES_PASSWORD
5353
```
5454

55-
The only thing you MUST change here is `NEXTAUTH_SECRET` and `POSTGRES_PASSWORD`, they both should be different secret phrases.
55+
The only thing you MUST change here is `NEXTAUTH_SECRET` and `POSTGRES_PASSWORD`, they both should be different secret phrases. The phrase should be wrapped in single or double quotes if any special characters are used.
5656

5757
The `NEXTAUTH_URL` should be changed to your domain name _only if you are hosting it somewhere else_.
5858

@@ -72,7 +72,7 @@ After a few minutes (depending on your internet connection) you can access Linkw
7272

7373
:::note
7474

75-
The Manual Installation is targeted towards a more technical audience, to take an easier path, go for installation using [Docker](/self-hosting/installation#docker-compose).
75+
The Manual Installation is targeted towards a more technical audience, to take an easier path, go for installation using [Docker](/self-hosting/installation#docker-).
7676

7777
:::
7878

openapi/linkwarden.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -963,7 +963,7 @@ paths:
963963
parameters:
964964
- name: id
965965
in: path
966-
description: The ID of the link to be deleted.
966+
description: The ID of the link to be retrieved.
967967
required: true
968968
schema:
969969
type: integer

0 commit comments

Comments
 (0)