Cannot start ipfs daemon

Hello guys,

I am a complete beginner in ipfs and I wanted to install it in my ubuntu environment by using this tutorial here:

The problem is that when I want to start the daemon, the following errors occurs and I cannot seem to find a solution:

ERROR cmd/ipfs ipfs/daemon.go:344 error from node construction: failed to listen on any addresses: [listen tcp4 bind: address already in use listen tcp6 [::]:4001: bind: address already in use]

Thank you,

Hi Cristian, it sounds like you’re already running ipfs in a separate process. What OS are you using?

Hello @stebalien

Thank you for your reply. I am using Ubuntu 18.04.4 LTS


What’s the result of?

systemctl status ipfs.service


sudo ss -l -A inet -p
1 Like

Hello @stebalien

Here is the data for the status:

ipfs.service - ipfs daemon
Loaded: loaded (/etc/systemd/system/ipfs.service; enabled; vendor preset: ena
Active: active (running) since Sat 2020-05-02 00:40:33 CEST; 9h ago
Main PID: 9020 (ipfs)
Tasks: 23 (limit: 4915)
CGroup: /system.slice/ipfs.service
└─9020 /usr/local/bin/ipfs daemon --enable-gc
May 02 00:40:34 zulu902 ipfs[9020]: Swarm listening on /ip4/
May 02 00:40:34 zulu902 ipfs[9020]: Swarm listening on /ip4/–myip–/tcp/4
May 02 00:40:34 zulu902 ipfs[9020]: Swarm listening on /p2p-circuit
May 02 00:40:34 zulu902 ipfs[9020]: Swarm announcing /ip4/
May 02 00:40:34 zulu902 ipfs[9020]: Swarm announcing /ip4/–myip–/tcp/400
May 02 00:40:34 zulu902 ipfs[9020]: API server listening on /ip4/
May 02 00:40:34 zulu902 ipfs[9020]: WebUI:
May 02 00:40:34 zulu902 ipfs[9020]: Gateway (readonly) server listening on /ip4/
May 02 00:40:34 zulu902 ipfs[9020]: Daemon is ready
May 02 00:40:40 zulu902 systemd[1]: ipfs.service: Current command vanished from

Here is the data for the second command:

NetidState Recv-Q Send-Q Local Address:Port Peer Address:Port
icmp6UNCONN 0 0 %enp2s0:ipv6-icmp : users:((“systemd-network”,pid=396,fd=17))
udp UNCONN 0 0
udp UNCONN 0 0 --myip–:domain* users:((“named”,pid=952,fd=517),(“named”,pid=952,fd=516))
udp UNCONN 0 0* users:((“named”,pid=952,fd=515),(“named”,pid=952,fd=514))
udp UNCONN 0 0* users:((“systemd-resolve”,pid=643,fd=12))
udp UNCONN 0 0 --myip–%enp2s0:bootpc* users:((“systemd-network”,pid=396,fd=19))
udp UNCONN 0 0 [::]:domain [::]:* users:((“named”,pid=952,fd=513),(“named”,pid=952,fd=512))
tcp LISTEN 0 128* users:((“postgres”,pid=2529,fd=7))
tcp LISTEN 0 100* users:((“smtpd”,pid=2843,fd=6),(“master”,pid=2576,fd=13),(“smtpd”,pid=2028,fd=6))
tcp LISTEN 0 128* users:((“named”,pid=952,fd=24))
tcp LISTEN 0 100* users:((“master”,pid=2576,fd=101))
tcp LISTEN 0 128* users:((“sw-cp-serverd”,pid=1761,fd=9),(“sw-cp-serverd”,pid=1759,fd=9))
tcp LISTEN 0 100* users:((“dovecot”,pid=748,fd=15))
tcp LISTEN 0 128* users:((“psa-pc-remote”,pid=999,fd=3))
tcp LISTEN 0 128* users:((“ipfs”,pid=9020,fd=10))
tcp LISTEN 0 128* users:((“dovecot”,pid=748,fd=39))
tcp LISTEN 0 128* users:((“dovecot”,pid=748,fd=24))
tcp LISTEN 0 128* users:((“ipfs”,pid=9020,fd=36))
tcp LISTEN 0 128* users:((“dovecot”,pid=748,fd=23))
tcp LISTEN 0 128* users:((“spamd child”,pid=29019,fd=5),(“spamd child”,pid=29018,fd=5),(“spamd”,pid=29014,fd=5))
tcp LISTEN 0 128* users:((“dovecot”,pid=748,fd=38))
tcp LISTEN 0 128* users:((“ipfs”,pid=9020,fd=37))
tcp LISTEN 0 128* users:((“sw-cp-serverd”,pid=1761,fd=10),(“sw-cp-serverd”,pid=1759,fd=10))
tcp LISTEN 0 100* users:((“master”,pid=2576,fd=110))
tcp LISTEN 0 10* users:((“named”,pid=952,fd=25))
tcp LISTEN 0 10 --myip–:domain* users:((“named”,pid=952,fd=23))
tcp LISTEN 0 10* users:((“named”,pid=952,fd=22))
tcp LISTEN 0 128* users:((“systemd-resolve”,pid=643,fd=13))
tcp LISTEN 0 128* users:((“grafana-server”,pid=3099,fd=6))
tcp LISTEN 0 128* users:((“sshd”,pid=1022,fd=3))
tcp LISTEN 0 128 :https : users:((“apache2”,pid=29287,fd=6),(“apache2”,pid=29286,fd=6),(“apache2”,pid=29248,fd=6),(“apache2”,pid=5557,fd=6))
tcp LISTEN 0 128 [::]:8443 [::]:
tcp LISTEN 0 128 [::]:4001 [::]:* users:((“ipfs”,pid=9020,fd=9))
tcp LISTEN 0 128 *:mysql : users:((“mysqld”,pid=1398,fd=21))
tcp LISTEN 0 64 :poppassd : users:((“xinetd”,pid=1681,fd=6))
tcp LISTEN 0 128 :http : users:((“apache2”,pid=29287,fd=4),(“apache2”,pid=29286,fd=4),(“apache2”,pid=29248,fd=4),(“apache2”,pid=5557,fd=4))
tcp LISTEN 0 128 [::]:8880 [::]:
tcp LISTEN 0 64 :ftp : users:((“xinetd”,pid=1681,fd=5))
tcp LISTEN 0 10 [::]:domain [::]:
tcp LISTEN 0 128 [::]:ssh [::]:

In the above data I have changed my hosting IP address with: --myip–


You’re already running an ipfs daemon through systemd. This daemon is using the same ports. You’ll either need to disable that instance (sudo systemctl disable --now ipfs.service) or just not try to run the daemon a second time.

Hi @stebalien

I thought that was the case after seeing the commands that you gave me to run…
What I did not understand is why I cannot see the webui. Shouldn’t it be accessible at: http://myserverip:5001/webui ?
When I access it, I get a server timeout message.


The API and gateway run on localhost, not your public IP address. You can change this but be careful. The API is powerful and should not be exposed to the public internet.

1 Like

I understand, thank you for all your help :slight_smile: