Go-ipfs: Please include a systemd script

Created on 12 May 2019  路  9Comments  路  Source: ipfs/go-ipfs

Type:

  • "doc": If it's related to missing/incorrect documentation.

Description:

Hello,

I am looking for a systemd script to run this as a service for multiple users.

help wanted topidocs-ipfs

Most helpful comment

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:

  1. Use the API: this should be the default behaviour but requires IPFS_PATH to be set anyway or --api
  2. Set up IPFS_PATH and have the permissions to run commands

Systemd 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!

All 9 comments

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:

  1. Use the API: this should be the default behaviour but requires IPFS_PATH to be set anyway or --api
  2. Set up IPFS_PATH and have the permissions to run commands

Systemd 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/api

We 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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

whyrusleeping picture whyrusleeping  路  4Comments

jonchoi picture jonchoi  路  3Comments

Jorropo picture Jorropo  路  3Comments

JesseWeinstein picture JesseWeinstein  路  4Comments

emelleme picture emelleme  路  3Comments