Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 9 additions & 35 deletions LDAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,38 +2,12 @@

Fireshare has LDAP support. The following environment variables are required to configure it:

### `LDAP_ENABLE`

Whether to enable LDAP support.
Default: `false`

### `LDAP_URL`

LDAP Server connection URL.
Example: `ldap://localhost:3890`

### `LDAP_BINDDN`

DN for the admin user.
Example: `uid=admin,ou=people`

### `LDAP_PASSWORD`

Password for the admin user.

### `LDAP_BASEDN`

Base DN
Example: `dc=example,dc=com`

### `LDAP_USER_FILTER`

User filter for LDAP login
`{input}` replaced by username the user put in the webui
Example for match email and uid: `(&(|(uid={input})(mail={input}))(objectClass=person))`

### `LDAP_ADMIN_GROUP`

LDAP group to be admin in fireshare. If not provided, everyone is admin.
Uses `memberOf`
Example: `lldap_admin`
| Environment Variable | Description | Example | Default |
|----------------------|-------------|---------|----------|
| `LDAP_ENABLE` | Whether to enable LDAP support. || false |
| `LDAP_URL` | LDAP Server connection URL |`ldap://localhost:3890`| |
| `LDAP_BINDDN` | DN for the admin user |`uid=admin,ou=people` | |
| `LDAP_PASSWORD` | Password for the admin user. | |
| `LDAP_BASEDN` | Base DN |`dc=example,dc=com` | |
| `LDAP_USER_FILTER` | User filter for LDAP login. `{input}` is replaced by the UI username. | |
| `LDAP_ADMIN_GROUP` | LDAP group for admin privileges via `memberOf`. If empty, everyone is admin. | |
58 changes: 58 additions & 0 deletions Notifications.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
## Notifications
Firesahre has a limited setup for notifications when a new video is uploaded. Primarily Discord and a Generic Webhook. Since Gaming and Discord is so ubiquitous it makes sense to have a dedicated Discord channel just for clip highlights to share with your friends. For this reason there is the Discord integration, to notify a channel when a new video has been uploaded. A similar premise has been made for the Generic Webhook. There are many notification systems, and to program them all would be an undertaking, so with the Generic Webhook, this allows what should be a means to still notify any system that can take a HTTP-POST and a JSON payload for webhooks.
### Discord
The Discord Notification integration is very simple, you just add the webhook URL to the channel you want it to be send to. You can learn how to generate a webhook URL for your Discord server and channel here: [Discord - Webhook Documentation](https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks)

Docker ENV example:

`DISCORD_WEBHOOK_URL='https://discord.com/api/webhooks/123456789/abcdefghijklmnopqrstuvwxyz'`

### Generic Webhook
For any other service you would want to send a notification to, that also supports a generic JSON payload-based webhook. Please note, you will have to set not only the POST URL but also the JSON Payload. If you do not know what this is you can learn more here:

Basically, you will need to enter valid JSON data into the "Generic Webhook JSON Payload" box on the integrations page, with the JSON payload that will work for your specific app or service. Please consult the webhook documentation for the service you are wanting to use, if they offer webhook support. For instance, the JSON data could look something like the following:

```
{
"Title": "Fireshare",
"message": "New Video Uploaded to Fireshare",
}
```

There is one variable avaliable that can be used in the JSON payload that can inject the video perma link. This could be useful that when you see the notification on your service you have a direct link to this new video. This can be achived using this exact format anywhere it makes sense: `[video_url]`

Example:
```
{
"Title": "Fireshare",
"message": "New Video Uploaded to Fireshare [video_url]",
}
```
What this will look like send to your service as a json payload:

```
{
"Title": "Fireshare",
"message": "New Video Uploaded to Fireshare https://yourdomain.com/w/c415d34530d15b2892fa4a4e037b6c05",
}
```

**Syntax Note**

Please keep in mind that the json payload is not a simple string, it has key/value pairs that have string in it. This means these strings are usually wrapped in either single quotes `'` or double `"`. Meaning if you are just pasting your json via the gui, just pick one and fireshare will take care of the rest. However for Docker ENVs you need to make sure you are choosing one for the total encapuslation of the json, and then another for the actual internal json strings.

Example:

```
GENERIC_WEBHOOK_PAYLOAD='{"Title": "Fireshare", "message": "New Video Uploaded to Fireshare [video_url]"}'
#Notice this is a sinlge line ^
```


**Full Docker ENV example:**

```
GENERIC_WEBHOOK_URL='https://webhook.com/at/endpoint12345'
GENERIC_WEBHOOK_PAYLOAD='{"Title": "Fireshare", "message": "New Video Uploaded to Fireshare [video_url]"}'
# You must have both ENVs filled in for Generic Webhook to work
```
43 changes: 40 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,18 @@
- Video Cropping
- Video Tags for improved search and categorization
- Open Graph metadata for rich link previews
- [Notifications to Discord and others](./Notifications.md)
- RSS feed for new public videos
- LDAP support
- Optional video transcoding with CPU or NVIDIA GPU
- [LDAP support](./LDAP.md)
- Optional [video transcoding with CPU or NVIDIA GPU](#transcoding-optional)

# Navigation

- [Installation](#installation)
- [Configuration](#configuration)
- [Demo](#demo)
- [Contributing](#contributing)


<h3 align="center">Dashboard</h3>

Expand Down Expand Up @@ -112,6 +121,11 @@ Open `http://localhost:8080`.

## Configuration

- [LDAP](#ldap)
- [Transcoding](#transcoding-optional)
- [Docker ENV Variables](#docker-environment-variables)

### LDAP
- LDAP setup: [LDAP.md](./LDAP.md)

### Transcoding (Optional)
Expand Down Expand Up @@ -157,6 +171,27 @@ When GPU mode is enabled, Fireshare selects the best available encoder:
- H.264 with CPU — Most compatible, faster encoding
- AV1 with CPU — Best compression, slower

### Docker Environment Variables

| Environment Variable | Description | Default | Required |
|----------------------|-------------|---------|----------|
| **App Configuration** | | |
| `DOMAIN` | The base URL or domain name where the instance is hosted. This is needed for things like link sharing, and notifications to work properly| |
| `STEAMGRIDDB_API_KEY` | API key for SteamGridDB integration to fetch game metadata and assets. | |
| **Storage** | | |
| `DATA_DIRECTORY` | Absolute path to the directory where application database and metadata are stored. | `$(pwd)/dev_root/dev_data/` | Yes |
| `VIDEO_DIRECTORY` | Absolute path to the source directory containing raw video files. | `$(pwd)/dev_root/dev_videos/` | Yes |
| `PROCESSED_DIRECTORY` | Absolute path to the directory where optimized/transcoded videos are stored. | `$(pwd)/dev_root/dev_processed/` | Yes |
| `THUMBNAIL_VIDEO_LOCATION` | The timestamp (in seconds) used to capture the video thumbnail preview. | `50` |
| **Security** | | |
| `ADMIN_USERNAME` | The username for the initial administrative account. | `admin` | Yes |
| `ADMIN_PASSWORD` | The password for the initial administrative account. | `admin` | Yes |
| LDAP | See [LDAP.md](./LDAP.md) for full LDAP configuration instructions
| **Integrations** | | |
| `DISCORD_WEBHOOK_URL` | Discord Server/Channel webhook URL used to send a notification of a new fireshare upload. [See Docs](./Notifications.md#discord) | |
| `GENERIC_WEBHOOK_URL` | Notification Integration, to send a generic webhook POST. Has to be used with `GENERIC_WEBHOOK_PAYLOAD` to work. [See Docs](./Notifications.md#generic-webhook) | |
| `GENERIC_WEBHOOK_PAYLOAD` | JSON Based payload that will be POSTed to webhook url. Please [See Docs](./Notifications.md#generic-webhook) for full example and payload options | |

## Local Development

Requirements: Python 3, Node.js, and npm.
Expand Down Expand Up @@ -216,9 +251,11 @@ proxy_read_timeout 999999s;

If you use a different proxy, apply equivalent upload size and timeout settings there.



---

[card-view]: .github/images/card-view.png
[folders]: .github/images/folders.png
[folders-game]: .github/images/folders-game.png
[edit]: .github/images/edit-details.png
[edit]: .github/images/edit-details.png
4 changes: 2 additions & 2 deletions app/client/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading