Posts by DaveOB

    Edit: Sorry, misread. It goes over LAN if possible.


    I think that is not true. The idea of Home users is that they don't have to pay anything if you already have a plex pass. You may verify that in Plex forums.

    Sorry, when I said "Home Owner Account" i should have been more specific, and said the Plex Pass Account.


    I guess each family needs to evaluate the $40 per year for a single Plex Pass, or for each family member device paying the once-off $5 'per device' cost.


    As you pointed out, only the Home account owner can add / delete content from the shared library, so maybe it is better for each family member to have their own Plex account, and share their libraries with each other.

    It has nothing to do with OMV or shared folders.

    Thanks. so I don't need to give access to the Plex folders on the home NAS.


    So if I invite a family member/s ( each with their own Plex account ) as a Home User, and they want to access media that is stored on the NAS, would that stream go out via the internet ( use bandwidth ), or would the Home User view the media over the same based network ?


    Only con that I see with each member having their own account, is that each user then has to pay for the device/s that they use ( android phones or tablets ), whereas with the Managed User setup, they all piggyback off the Home Owner account for using remote devices.

    Hi all


    Just installed Plex on Pi4 / OMV5 as a docker container - followed TechoDad's video.


    I can connect from my desktop pc to Plex thru my web browser using the Plex IP address and port ( :32400 ), and happy with the results.


    What's the best way to share the content with other family members ( wife & kids ) on the same home network ?


    Should they each have their own free Plex account / login ?


    Do I need to add Privileges for each user to the shared folders ?


    The folders that I have shared on my OMV are :

    Code
    /srv/dev-disk-by-label-NAShd1/Plex_app
    /srv/dev-disk-by-label-NAShd1/Plex_download
    /srv/dev-disk-by-label-NAShd1/Plex_media
    /srv/dev-disk-by-label-NAShd1/Plex_photos

    Would be ideal if each family member could add movies / downloads to the family folder, and maybe also have their own folder for stuff only they would watch.


    Do I create a sub-folder for each family member on the NAS so they can store downloads that can be accessed by other family members ?

    try docker exec nginx php /config/www/EXDdata/exdgo.php in scheduled tasks

    both of these options work. I assume that your suggestion ( the second line ) is more secure or stable.


    Code
    sudo docker exec -u root nginx php /config/www/EXDdata/exdgo.php
    docker exec nginx php /config/www/EXDdata/exdgo.php


    I am guessing that the OMV Scheduled Tasks are automatically run 'sudo' and that use 'root' is not required in the command as the Scheduled Task dialog already contains the 'root' as the user


    Thank You sincerely for your assistance Morlan. I would not have got this working without your input and guidance. Much appreciated.

    Should the php file be run as root?

    i have no idea ( subject unknown to me )


    I did try changing 'root' to 'pi' and the message was simply 'error occurred' and the details show :

    Code
    Error #0:
    OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export SHELL=/bin/sh; sudo --shell --non-interactive --user=pi -- docker exec nginx sudo -u pi php /config/www/www/EXDdata/exdgo.php 2>&1' with exit code '1': Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/nginx/json: dial unix /var/run/docker.sock: connect: permission denied in /usr/share/openmediavault/engined/rpc/cron.inc:177
    Stack trace:
    #0 /usr/share/php/openmediavault/rpc/serviceabstract.inc(588): Engined\Rpc\Cron->Engined\Rpc\{closure}('/tmp/bgstatuszG...', '/tmp/bgoutputz4...')
    #1 /usr/share/openmediavault/engined/rpc/cron.inc(181): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
    #2 [internal function]: Engined\Rpc\Cron->execute(Array, Array)
    #3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
    #4 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('execute', Array, Array)
    #5 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Cron', 'execute', Array, Array, 1)
    #6 {main}

    Oh sorry:

    docker exec nginx sudo -u root php /config/www/www/EXDdata/exdgo.php

    still results in an error :


    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- docker exec nginx sudo -u root php /config/www/www/EXDdata/exdgo.php 2>&1' with exit code '126': OCI runtime exec failed: exec failed: container_linux.go:349: starting container process caused "exec: \"sudo\": executable file not found in $PATH": unknown

    You could either add cron to the docker container via a container mod.


    Or you could run it via schedule jobs in omv. With this method you need pass the command with docker exec. For example create a scheduled job as root: docker exec sudo -u abc php /config/www/myscript.php



    set the Command in the OMV Scheduled Tasks :


    Code
    docker exec sudo -u root php /config/www/www/EXDdata/exdgo.php

    Got this error :

    Code
    Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export SHELL=/bin/sh; sudo --shell --non-interactive --user=root -- docker exec sudo -u root php /config/www/www/EXDdata/exdgo.php 2>&1' with exit code '1': Error: No such container: sudo

    Problem with linux php ftp nginx portainer docker openmediavault problem.


    With some awesome assistance and guidance by Morlan, I have managed to get Nginx installed and can access the files.


    Next problem is uploading files using php ftp_put from the Nginx based php scripts, to a remote ftp web server.


    Was running OMV4 on RPi3B+ with Nginx as a plugin. Worked 100%.


    Upgraded to RPi4 4Gb and OMV5.


    OMV5 does not have plugin for Nginx, so has to be in a Container in Docker.


    So Installed Docker, Portainer, and created a Stack in Portainer for Nginx.


    In the stack script, I set the Volume to my existing Shared Folder, and I can map network drive to my PC and view & edit these files from my PC. All good so far.


    Started testing php script, and had to make a few small path changes, then everything worked 100%, except for an ftp_put command.


    The ftp connect and Login both work, but the ftp_put simply creates a zero sized file on the destination online ftp server, and after about a minute, then pc browser says : " 504 Gateway Time-out ".


    Found an error log that contains :

    2020/10/21 18:27:46 [error] 333#333: *1 upstream timed out (110: Operation timed out) while reading response header from upstream, client: 192.168.1.91, server: _, request: "GET /EXDdata/testupload.php HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host: "192.168.1.136"


    I know this script worked perfectly when on the RPi3B+ on OMV4 with Nginx as a plugin, so I assume the problem is related to the new Pi, Docker, Portainer Container settings, or some config on Nginx.


    Anyone able to diagnose this ?

    something went wrong :


    ran this as a stack :


    seemed to install correctly, but ...

    when I browse to the IP from my PC ( 192.168.1.136 ) then I get a page saying :

    Code
    Welcome to our server
    The website is currently being setup under this address.

    but when I go to the shared www folder, it contains my original pages ( including the original index.html page ) and not this page that I am seeing.


    There are no new files in the www shared folder

    I can not get this to work, and know i must be missing something simple ( likely lack of understanding on my part )


    Just upgraded Pi3 ( OMV 4 ) to Pi4 and installed OMV 5 ( technoDad video guides ).


    Have Docker running, and Portainer installed.


    Used 'Add Templates' to create a Container for nginx


    I need ( want ) to use an existing Sharedfolder ( www/ ) that I have on the HDD that was used by nginx on the Pi3 and contains my html and php files.


    How do I tell nginx to use that folder ?


    I also want to be able to access that folder from my win PC, which I can do as the www/ folder is a shared folder and listed in SMB

    after a load of digging with Cloud Commander, I found the default index.html page here :

    /var/lib/docker/volumes/c045ac8ef091973de611ad602b647cbfdf8e8181d470b9ee2d13f26e60cb6a46/_data


    Verified by editing the file, changing a character, and saving. When viewed from my PC browser, the change is visible.


    So having found the location of the files, I tried adding the path as a Shared Folder in OMV5, and added to SMB so I can map as a network drive from my win PC.


    The network map connects, but I can't see any of the 3 files that are in the folder on the Pi.


    Is this a setting, or better solution - how do I specify the folder for nginx to use, as a different shared folder ?

    I am completely lost.

    Replacing Pi3B+ ( OMV4 ) with Pi4 ( OMV5 ), and found that I can't simply move the SD card from Pi3 to Pi4.

    Followed TechnoDad videos to get a new image on to the SD and install OMV. OK to this point.


    On the OMV4 / Pi3, I had nginx running as a plugin.


    If I understand correctly now, with OMV5, these plugins ( which had system wide access ) should now be run in a self-containing bubble, Docker.

    I guess Docker is the OS for these bubbles, and Portainer is the User Interface for the bubbles / dockers.


    So using Portainer > App Templates, I found nginx and 'Deploy Container' ( I assume this is the equivalent of an install )


    Next, went to Portainer > Containers and I see the "PiWeb' named container in the list.


    I can browse ( on my PC on same network ) to the IP of the Pi4, and I get the " Welcome to nginx " screen.


    On the Pi3, I had the web folder that nginx set as a shared folder, so that I can access it from my local PC as a network folder.


    The nginx plugin listed the server root as : /dev-disk-by-label-NAShd1/www/


    How / where do I change the settings in nginx / Portainer to use that same specific folder for the web pages ?

    If you have everything up to date it should be fine. You might have to run omv-firstaid if the network adapter doesn't get an IP address.

    Thanks. I use a mikrotik router so I think I can just delete the existing Static IP / MAC link, and create a new Static IP for the Pi based on the Pi's new MAC Address..