DLNA addon for your self-hosted Nextcloud app instance that allows you to stream Nextcloud users content on client devices in your network. It supports the group folders as well.
Find a file
2023-10-24 19:30:03 +02:00
.github/workflows Update gradle.yml 2023-10-22 14:33:45 +02:00
examples Running with docker examples 2023-10-22 13:42:35 +02:00
gradle/wrapper Initial commit 2023-10-08 10:46:54 +02:00
src test for adding children to node added 2023-10-24 19:30:03 +02:00
.gitignore ignore profile configs 2023-10-09 16:14:57 +02:00
build.gradle Merge remote-tracking branch 'origin/upnpservice_as_bean' into dev 2023-10-22 12:57:16 +02:00
docker-build-image.sh improved docker image build 2023-10-18 16:40:50 +02:00
Dockerfile better base docker image 2023-10-19 14:38:13 +02:00
gradlew Initial commit 2023-10-08 10:46:54 +02:00
gradlew.bat Initial commit 2023-10-08 10:46:54 +02:00
LICENSE Create LICENSE 2023-10-09 18:50:54 +02:00
README.md readme update 2023-10-23 21:18:32 +02:00
settings.gradle Initial commit 2023-10-08 10:46:54 +02:00

Nextcloud DLNA server

Java CI with Gradle

DLNA addon for your self-hosted Nextcloud app instance that allows you to stream Nextcloud users content on client devices in your network. It supports the group folders as well.

Running in Docker

You can use the docker image with nextcloud-dlna e.g.:

docker run -d \
 --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

or, if used together with the official Nextcloud docker image using the docker-composer. See the examples directory. for more details about running nextcloud-dlna server in the docker container.

You can pass to the container other env variables that are listed below.

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:

./gradlew clean bootRun

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

ENV variables

Available env variables with their default values that you can overwrite:

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
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)
NEXTCLOUD_DB_TYPE mariadb nextcloud database type (mysql, mariadb, postgresql)
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

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 cling.