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 to launch ipfs daemon in background (Windows cmd) #3572

Closed
slrslr opened this issue Jan 7, 2017 · 4 comments
Closed

How to launch ipfs daemon in background (Windows cmd) #3572

slrslr opened this issue Jan 7, 2017 · 4 comments

Comments

@slrslr
Copy link

slrslr commented Jan 7, 2017

Hello,

i downloaded Windows version of the IPFS from https://ipfs.io/docs/install/
and i am having .bat script that is launching multiple applications on my computer start.

I used this commands in that .bat script:

start "" /MIN /B "C:\Windows\system32\ipfs.exe" daemon
start "" /MIN "C:\Windows\system32\ipfs.exe" daemon
start "" "C:\Windows\system32\ipfs.exe" daemon

It launch the daemon, but i still see the command line window and i do not want to see it, i want it to run on background (hiddenly). Which command to use or how to do it in Windows? Thank you

@kpcyrd
Copy link
Contributor

kpcyrd commented Jan 7, 2017

This might help:
https://superuser.com/questions/198525/how-can-i-execute-a-windows-command-line-in-background

The cleanest way in windows is probably having a desktop client that has a regular installer and sets itself to auto-start, while also having go-ipfs as a subprocess. (I think some other open source projects do something like this).

@slrslr
Copy link
Author

slrslr commented Jan 8, 2017

I thought there is only one ipfs for Windows. btw, none of the "START" kind of commands mentioned on yours linked page worked for me to launch ipfs daemon the way that it is not terminated when the command line window is closed.

But in my case I still have to keep open one cmd window because of other app that is running inside it, so i made it the way that i launch ipfs first at background and then this other app like this:
start /B "" "C:\Windows\system32\ipfs.exe" daemon > ipfsoutput.txt & start c:\path\to\other\exe

I still will be looking for the way to run daemon better way on windows without cmd window being open.

@kenXengineering
Copy link

kenXengineering commented Jan 27, 2017

Ok, I found a way to start IPFS in the backgroup without a command window staying up. The downside is you don't see any logs, and you have to kill the program via the Task Manager. If you have Git for Windows installed, then you just need to create a bash file to execute IPFS. The contents would be:

#!/bin/bash
/c/Windows/System32/ipfs daemon &

Save this as something like ipfs_daemon.sh, then place it in C:\Users\<Name>\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup. This folder will auto-start whatever is inside it. Now on login/startup, it will start the daemon in the background.

@Kubuxu
Copy link
Member

Kubuxu commented Mar 15, 2017

Closing as it it is not actionable from go-ipfs side. If you have more questions about that use http://ipfs.trydiscourse.com/.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants