Hello,
I am looking for a systemd script to run this as a service for multiple users.
There were a few systemd related PRs in the past: https://github.com/ipfs/go-ipfs/pull/5583 https://github.com/ipfs/go-ipfs/pull/1864
There's an example here : https://github.com/ipfs/website/tree/master/static/docs/examples/init#systemd
Some points that are related to this
go-ipfs looks like it is not really built as a service for all the users. Once you run ipfs as a systemd service all the users that wants to use IPFS are forced to:
IPFS_PATH to be set anyway or --apiIPFS_PATH and have the permissions to run commandsSystemd does support user services, but that doesn't help much if it is a multi user system where all the users wants IPFS running even if they are not logged in (please correct me if I am wrong!).
I hope to see ipfs growing into a more stable daemon that can be run on systemd!
You can actually configure the ipfs client to use a remote server by running:
> mkdir -p ~/.ipfs
> echo '/dns4/localhost/tcp/5001' > ~/.ipfs/api
We should _probably_ have a nice command for this.
You can actually configure the ipfs client to use a remote server by running:
> mkdir -p ~/.ipfs > echo '/dns4/localhost/tcp/5001' > ~/.ipfs/apiWe should _probably_ have a nice command for this.
My point is that it should not be required to do that if it was a service (even with or without systemd running it). Hashicorp's products are a good example.
Ah, yeah, I agree (but we need multitenent support for that to really happen).
finally, some info on how to run ipfs for multiple users!
We are maintaining (auto-generated) also a apt repository with deb packages (works both for ubuntu and deb) that includes the service for multiple user:
https://blog.siderus.io/how-to-get-ipfs-on-ubuntu-debian-linux-d7920c1a42b7
The builds are automated and we are using it on most of the gateways. ipfs-gateway is the name of the package for the global service but it requires are repo in /var/ipfs (just install the package and it is set up out of the box). That is a downside as I have explained few message before, hopefully go-ipfs will get better! 馃憤 馃殌 馃挭
Done. See misc/systemd.
Most helpful comment
Some points that are related to this
go-ipfslooks like it is not really built as a service for all the users. Once you run ipfs as a systemd service all the users that wants to use IPFS are forced to:IPFS_PATHto be set anyway or--apiIPFS_PATHand have the permissions to run commandsSystemd does support user services, but that doesn't help much if it is a multi user system where all the users wants IPFS running even if they are not logged in (please correct me if I am wrong!).
I hope to see ipfs growing into a more stable daemon that can be run on systemd!