upcboy

[Now Implemented!] Btsync As A Windows Service

Recommended Posts

So the old wishlist thread did get too confusing after all, eh? ;)

It was more of a case that there's an existing dedicated "Feature Request" forum for the BitTorrent Client that people were regularly - and incorrectly - posting requests in for BitTorrent Sync (a different application)!

 

That said, I will also be trying to pick out similar requests from the previous 1,000+ post "Wishlist" thread and merge them into single-topic Feature Request threads in this forum when appropriate, to try and make it easier for users to discuss and add their voice/vote to similar/identical Feature Requests. (For example, I've already merged into this thread a number of previous posts from the "Wishlist" thread where users have also requested the same ability to natively run Sync as a Windows Service)

 

Finally, I'd also like to echo your particular feature request, as the ability to natively install and run Sync as a Windows service would be VERY useful! :)

Share this post


Link to post
Share on other sites

For completeness, the following users also previously requested such features in the original Wishlist thread:
 

- Service daemon instalation

i'd like to have somekind of BTSync-Service ... for Windows.

That would enable me to push VM-Images to my clients in background while they run even if no user is logged in.

Also running as a system level service would be great and then the ability to throw commands at the system service as necessary would be nice too.

+1 for windows service

 

+1 for windows service

+2

 

2 Windows service: currently, both devices being synchronised have to have users logged in simultaneously to sync - BTSync available as a service on Windows would fix this (both machines would have to be switched on, but not logged in).

8. Windows Service

Windows Service Install

3. BitSync as windows service (unix daemon) without wrappers.


Continued...

Share this post


Link to post
Share on other sites

...continued

For completeness, the following users also previously requested such features in the original Wishlist thread:

+1 for making it a Windows service so you don't have to be logged in to run it.

3) Ability to run BTSync as service. Yes, this is possible with TaskScheduler as well, but to have an option under the client itself to install the service or create the task would be nice.

Also +1 for running as service on Windows.

2) option to run BTSync as a service.

I know it is a known workaround, but it would be good to have this as a native feature during the installation process.

A 'true' windows service.

* Run as service. (I see it is on a todo list).

A possibilty to start as a service

The ability to start BTSync as a service and still be able to manage the shared folders easily.

Also to be able to have sync run as a service with a gui. (I am currently running it as a task on a couple computers)

3) Run as a service - For those of us who want to install a copy on a central repository "Our own, not quite cloud, solution." This would be handy, there are ways of doing this now. But they need to be converted back to a normal start up in order to add or remove folders. (Running as a service this way makes the interface no longer assessable.)

Continued...

Share this post


Link to post
Share on other sites

What's the advantage of NSSM over just running BTSync as a scheduled task? You still have no access to the GUI because BTSync on Windows was not designed to run as a background process.

Share this post


Link to post
Share on other sites

Starting the service isn't the issue, the problem is interfacing the program settings while it's running.  It would be nice to have a tray icon upon login, similar to the behavior of many programs for example teamviewer or virus scanners.

 

When you have to kill the process and re-load the client you have to wait for it to index up.

 

Another thing useful for server compatibility would be to prevent transfers until indexing is complete.

Share this post


Link to post
Share on other sites

@all

Thanks for clarification, I've got the main demand of "running sync as service" as "run with no user logged in with ability to control btsync".

 

@shallowz

No big news for now. Feature won't be a part of upcoming 1.4, but we still plan to implement it in future.

Share this post


Link to post
Share on other sites

It would be nice if btsync could be run as a system service on Windows utilizing a config file and settings folder located where the binary is.

 

Advantages:

  • An administrator could then set up sync shares of user data without exposing the GUI to the users.
  • An administrator would not need to be logged in.
  • btsync managed like other windows services
  • btsync could log to the event log

 

Share this post


Link to post
Share on other sites

I've struggled with this for hours.. Ran BTSync interactively and configured it, so that it syncs. Then, configured a scheduled task (as same user) to run on system start. After a reboot, the BTSync runs but doesn't sync anything, just sits there without any CPU or Network usage. If I restart the task manually, the new instance of BTSync will start syncing just fine. I also tried to install BTSync as service (using NSSM) and I didn't see it sync at all. Is there anything I'm missing?? I'm stumped. How do I make it run automatically on system start?? Thanks.

 

(using latest v1.3.106 on Windows 8)

Edited by mod57903

Share this post


Link to post
Share on other sites

To my previous question.. I think I know what's going on, but I don't know why. The BTSync.exe process that's started on system startup opens the following file:

 

C:\Users\Default\AppData\Roaming\BitTorrentSync\sync.log

 

which is the Default user, instead of the Admin user, even though, it's launched as Admin. For some reason, USERPROFILE and APPDATA env variables point to Default user's folder. If I restart the task manually though, while signed in as Admin, the APPDATA points to Admin user - as expected.

 

Something very similar is described in this thread:

http://social.technet.microsoft.com/forums/windows/en-US/9ffd9d23-b939-435f-bb87-f650dc0703d4/scheduled-task-in-windows-8

 

The point is: THE SCHEDULE TASK METHOD DOES NOT WORK ON WINDOWS 8/8.1


Darn, here is Microsoft's acknowledgement of this bug in Windows 8/8.1:

http://support.microsoft.com/kb/2968540

 

Still looking for a workaround..

Edited by mod57903

Share this post


Link to post
Share on other sites

Here is my solution, tested on Windows 8 and 8.1:

 

Step 1: Create "C:\Program Files\BitTorrentSync\BTSync.cmd":

 

@rem This is a workaround for schedule task problem on
@rem Windows 8/8.1 with default profile selection. See
set "USERPROFILE=%USERPROFILE%\..\%USERNAME%"
set "APPDATA=%USERPROFILE%\AppData\Roaming"
set "LOCALAPPDATA=%USERPROFILE%\AppData\Local"
"%~dp0\BTSync.exe"
 
Step 2: Specify "C:\Program Files\BitTorrentSync\BTSync.cmd" in task's actions, which is configured with a trigger "At startup".
 
Reboot, and check BTSync.exe with Process Explorer, make sure it's CPU and Network appear active.

Share this post


Link to post
Share on other sites

I still want the GUI.  We have it running in the background, but it is a PITA to modify or check as you have to end the process and re-launch Sync to get into it.  Still waiting....

Share this post


Link to post
Share on other sites

Just telling you:

I will soon experiment with BTsync running on local administrator-account while a non-admin user is logged in.

The settings will all be set up beforehand so there will be no need for the non-admin user to interact with BTsync, though he can't, because he won't have the trayicon, nor access to the process itself.

This will be likely done by an autotask, starting the process with different user-credentials. If this won't work, i will programm some startup-executable via C# myself.

 

But nethertheless, have the service-option from beginning would have many advantages ;)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.