nextcloud-dlna/README.md

72 lines
4 KiB
Markdown
Raw Permalink Normal View History

2023-10-08 19:14:49 +00:00
# Nextcloud DLNA server
2023-10-22 13:01:08 +00:00
[![Java CI with Gradle](https://github.com/thanek/nextcloud-dlna/actions/workflows/gradle.yml/badge.svg)](https://github.com/thanek/nextcloud-dlna/actions/workflows/gradle.yml)
2023-10-08 19:20:10 +00:00
DLNA addon for your self-hosted Nextcloud app instance that allows you to stream Nextcloud users content on client
devices in your network.
2023-10-08 19:14:49 +00:00
It supports the group folders as well.
2023-10-22 11:42:35 +00:00
## Running in Docker
2023-10-23 19:18:32 +00:00
2023-10-22 11:42:35 +00:00
You can use the docker image with nextcloud-dlna e.g.:
```bash
docker run -d \
2023-10-22 14:15:06 +00:00
--name="nextcloud-dlna" \
--net=host \
-v /path/to/nextcloud/app/ending/with/data:/nextcloud \
-e NEXTCLOUD_DATA_DIR=/nextcloud \
-e NEXTCLOUD_DB_HOST='<your_nextcloud_db_host_ip_here>' \
-e NEXTCLOUD_DB_PASS='<your_nextcloud_db_pass_here>' \
thanek/nextcloud-dlna
2023-10-22 11:42:35 +00:00
```
2023-10-23 19:18:32 +00:00
or, if used together with the official Nextcloud docker image using the docker-composer. See the [examples](./examples)
2023-10-22 11:42:35 +00:00
directory. for more details about running nextcloud-dlna server in the docker container.
2023-10-31 16:05:13 +00:00
While using docker, you can pass to the container the `NC_DOMAIN` and `NC_PORT` environment variables and force the container
to check and wait for the nextcloud HTTP server to appear on the specified domain and port address.
You can also pass to the container other env variables that are listed below.
2023-10-22 11:42:35 +00:00
Note that it would not work on Mac OS since docker is a Linux container and the `host` networking mode doesn't actually
share the host's network interfaces.
See https://hub.docker.com/r/thanek/nextcloud-dlna for more docker image details.
## Building the project
Build the project with:
2023-10-08 19:14:49 +00:00
2023-10-08 19:20:10 +00:00
`./gradlew clean bootRun`
2023-10-09 16:27:45 +00:00
You can also pass the environment variables without editing the config files:
`NEXTCLOUD_DLNA_SERVER_PORT=9999 ./gradlew clean bootRun`
or, if you've already built the project and created the jar file:
`NEXTCLOUD_DLNA_SERVER_PORT=9999 java -jar nextcloud-dlna-X.Y.Z.jar`
2023-10-22 11:42:35 +00:00
## ENV variables
2023-10-09 16:27:45 +00:00
Available env variables with their default values that you can overwrite:
2023-10-23 19:18:32 +00:00
| env variable | default value | description |
|------------------------------|----------------|---------------------------------------------------------------------------------------------------------------|
| NEXTCLOUD_DLNA_SERVER_PORT | 8080 | port on which the contentController will listen |
| NEXTCLOUD_DLNA_INTERFACE | | (optional) interface the server will be listening on<br/>if not given, the default local address will be used |
| NEXTCLOUD_DLNA_FRIENDLY_NAME | Nextcloud-DLNA | friendly name of the DLNA service |
| NEXTCLOUD_DATA_DIR | | nextcloud installation directory (that ends with /data) |
2023-10-31 16:47:12 +00:00
| NEXTCLOUD_DB_TYPE | mariadb | nextcloud database type (mysql, mariadb, postgres) |
2023-10-23 19:18:32 +00:00
| NEXTCLOUD_DB_HOST | localhost | nextcloud database host |
| NEXTCLOUD_DB_PORT | 3306 | nextcloud database port |
| NEXTCLOUD_DB_NAME | nextcloud | nextcloud database name |
| NEXTCLOUD_DB_USER | nextcloud | nextcloud database username |
| NEXTCLOUD_DB_PASS | nextcloud | nextcloud database password |
### Code used
2023-10-08 19:20:10 +00:00
Some java code was taken from https://github.com/haku/dlnatoad
and https://github.com/UniversalMediaServer/UniversalMediaServer converted to Kotlin with upgrade to jupnp instead of
2023-10-17 14:13:57 +00:00
cling.