Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How can you use it on Windows ? #18

Open
synlau opened this issue Jan 11, 2020 · 2 comments
Open

How can you use it on Windows ? #18

synlau opened this issue Jan 11, 2020 · 2 comments
Labels
help wanted Extra attention is needed

Comments

@synlau
Copy link

synlau commented Jan 11, 2020

How can you use it on Windows ?

@Fmstrat Fmstrat added the help wanted Extra attention is needed label Jan 12, 2020
@Fmstrat
Copy link
Owner

Fmstrat commented Jan 12, 2020

As the application runs in Docker, you just need to set up Windows' SSH server on the remote machine first: https://winaero.com/blog/enable-openssh-server-windows-10/

Then you can have it execute whatever Windows command you require to stop and start Plex. If you are running PMS as a service, then it's just net stop and net start.

Lastly, fire the app up in docker (or WSL with sqlite3).

@tricamtech
Copy link

tricamtech commented Jul 19, 2020

@Fmstrat I have this running in a docker container hosted on windows and ssh'ing to my remote server on ubuntu. I had to modify the cron-script to add the do not compare DB flag but otherwise the script is working great.
I am hoping you might have some insight as to how to get the host plex server (not in docker) to stop and start, I am currently using the commands
--plex-start-2 "C:\Program Files (x86)\Plex\Plex Media Server\Plex Media Server.exe" --plex-stop-2 "taskkill /IM Plex Media Server.exe"
but I don't believe these will affect the host at all, is there something else I can do here besides manually start and stop the server?

--------EDIT-----------
I am a dummy.
The simple solution here is just to ssh to the host machine, even if it is a windows host. for anyone who might be wondering heres an idea of how my cron-script file looks.

echo "[`date`] Mounting sshfs for server 1..."
sshfs -o allow_other,cache=no,no_readahead,noauto_cache,StrictHostKeyChecking=no,IdentityFile="/sshkey" -p 22 [email protected]:"/opt/plex/Library/Application Support/Plex Media Server/Plug-in Support/Databases" /mnt/S1
/plex-db-sync --dry-run "false" --backup "false" --nocomparedb "true" --debug "true" --tmp-folder "/tmp/plex-db-sync" --plex-db-1 "/mnt/S1/com.plexapp.plugins.library.db" --plex-start-1 "ssh -oStrictHostKeyChecking=no -i /sshkey [email protected] 'docker start plex'" --plex-stop-1 "ssh -oStrictHostKeyChecking=no -i /sshkey [email protected] 'docker stop plex'" --plex-db-2 "/mnt/DB2/com.plexapp.plugins.library.db" --plex-start-2 "ssh -oStrictHostKeyChecking=no -i /sshkey username@hostIPaddress 'net start plexservice'" --plex-stop-2 "ssh -oStrictHostKeyChecking=no -i /sshkey username@hostIPaddress 'net stop plexservice'" --ignore-accounts ""
umount /mnt/S1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants