# Cannot start ipfs daemon

**URL:** <https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877>\
**Category:** Help\
**Tags:** go-ipfs\
**Created:** [May 1, 2020, 11:10pm UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877 "2020-05-01T23:10:57Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![01fbk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/01fbk/32/3737_2.png) [@01fbk](https://discuss.ipfs.tech/u/01fbk)\
**Post date:** [May 1, 2020, 11:10pm UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/1 "2020-05-01T23:10:57Z")

</div>

Hello guys,

I am a complete beginner in ipfs and I wanted to install it in my ubuntu environment by using this tutorial here: [Tutorial: Host your own IPFS node and help the next generation of web | by David Hawig | Pact Care](https://blog.florence.chat/tutorial-host-your-own-ipfs-node-and-help-the-next-generation-of-web-2860eb59e45e)

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 0.0.0.0:4001: bind: address already in use listen tcp6 [::]:4001: bind: address already in use]

Thank you,  
Cristian

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [May 1, 2020, 11:34pm UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/2 "2020-05-01T23:34:34Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![01fbk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/01fbk/32/3737_2.png) [@01fbk](https://discuss.ipfs.tech/u/01fbk)\
**Post date:** [May 1, 2020, 11:39pm UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/3 "2020-05-01T23:39:28Z")

</div>

Hello @stebalien

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

Cristian

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [May 2, 2020, 12:18am UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/4 "2020-05-02T00:18:06Z")

</div>

What’s the result of?

```
systemctl status ipfs.service

```

And

```
sudo ss -l -A inet -p
```

---

<div class="post-metadata">

**Author:** ![01fbk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/01fbk/32/3737_2.png) [@01fbk](https://discuss.ipfs.tech/u/01fbk)\
**Post date:** [May 2, 2020, 7:53am UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/5 "2020-05-02T07:53:38Z")

</div>

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/172.17.0.1/tcp/4001  
> 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/127.0.0.1/tcp/4001  
> 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/127.0.0.1/tcp/5  
> May 02 00:40:34 zulu902 ipfs[9020]: WebUI: [http://127.0.0.1:5001/webui](http://127.0.0.1:5001/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 172.17.0.1:domain 0.0.0.0:_ users:((“named”,pid=952,fd=519),(“named”,pid=952,fd=518))  
> udp UNCONN 0 0 --myip–:domain 0.0.0.0:\* users:((“named”,pid=952,fd=517),(“named”,pid=952,fd=516))  
> udp UNCONN 0 0 127.0.0.1:domain 0.0.0.0:\* users:((“named”,pid=952,fd=515),(“named”,pid=952,fd=514))  
> udp UNCONN 0 0 127.0.0.53%lo:domain 0.0.0.0:\* users:((“systemd-resolve”,pid=643,fd=12))  
> udp UNCONN 0 0 --myip–%enp2s0:bootpc 0.0.0.0:\* 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 127.0.0.1:postgresql 0.0.0.0:\* users:((“postgres”,pid=2529,fd=7))  
> tcp LISTEN 0 100 0.0.0.0:smtp 0.0.0.0:\* users:((“smtpd”,pid=2843,fd=6),(“master”,pid=2576,fd=13),(“smtpd”,pid=2028,fd=6))  
> tcp LISTEN 0 128 127.0.0.1:953 0.0.0.0:\* users:((“named”,pid=952,fd=24))  
> tcp LISTEN 0 100 127.0.0.1:12346 0.0.0.0:\* users:((“master”,pid=2576,fd=101))  
> tcp LISTEN 0 128 0.0.0.0:8443 0.0.0.0:\* users:((“sw-cp-serverd”,pid=1761,fd=9),(“sw-cp-serverd”,pid=1759,fd=9))  
> tcp LISTEN 0 100 0.0.0.0:sieve 0.0.0.0:\* users:((“dovecot”,pid=748,fd=15))  
> tcp LISTEN 0 128 127.0.0.1:12768 0.0.0.0:\* users:((“psa-pc-remote”,pid=999,fd=3))  
> tcp LISTEN 0 128 0.0.0.0:4001 0.0.0.0:\* users:((“ipfs”,pid=9020,fd=10))  
> tcp LISTEN 0 128 0.0.0.0:imaps 0.0.0.0:\* users:((“dovecot”,pid=748,fd=39))  
> tcp LISTEN 0 128 0.0.0.0:pop3s 0.0.0.0:\* users:((“dovecot”,pid=748,fd=24))  
> tcp LISTEN 0 128 127.0.0.1:5001 0.0.0.0:\* users:((“ipfs”,pid=9020,fd=36))  
> tcp LISTEN 0 128 0.0.0.0:pop3 0.0.0.0:\* users:((“dovecot”,pid=748,fd=23))  
> tcp LISTEN 0 128 127.0.0.1:spamd 0.0.0.0:\* users:((“spamd child”,pid=29019,fd=5),(“spamd child”,pid=29018,fd=5),(“spamd”,pid=29014,fd=5))  
> tcp LISTEN 0 128 0.0.0.0:imap2 0.0.0.0:\* users:((“dovecot”,pid=748,fd=38))  
> tcp LISTEN 0 128 127.0.0.1:http-alt 0.0.0.0:\* users:((“ipfs”,pid=9020,fd=37))  
> tcp LISTEN 0 128 0.0.0.0:8880 0.0.0.0:\* users:((“sw-cp-serverd”,pid=1761,fd=10),(“sw-cp-serverd”,pid=1759,fd=10))  
> tcp LISTEN 0 100 0.0.0.0:urd 0.0.0.0:\* users:((“master”,pid=2576,fd=110))  
> tcp LISTEN 0 10 172.17.0.1:domain 0.0.0.0:\* users:((“named”,pid=952,fd=25))  
> tcp LISTEN 0 10 --myip–:domain 0.0.0.0:\* users:((“named”,pid=952,fd=23))  
> tcp LISTEN 0 10 127.0.0.1:domain 0.0.0.0:\* users:((“named”,pid=952,fd=22))  
> tcp LISTEN 0 128 127.0.0.53%lo:domain 0.0.0.0:\* users:((“systemd-resolve”,pid=643,fd=13))  
> tcp LISTEN 0 128 127.0.0.1:3030 0.0.0.0:\* users:((“grafana-server”,pid=3099,fd=6))  
> tcp LISTEN 0 128 0.0.0.0:ssh 0.0.0.0:\* 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 [::]:_ users:((“sw-cp-serverd”,pid=1761,fd=11),(“sw-cp-serverd”,pid=1759,fd=11))  
> 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 [::]: users:((“sw-cp-serverd”,pid=1761,fd=12),(“sw-cp-serverd”,pid=1759,fd=12))  
> tcp LISTEN 0 64 :ftp : users:((“xinetd”,pid=1681,fd=5))  
> tcp LISTEN 0 10 [::]:domain [::]: users:((“named”,pid=952,fd=21))  
> tcp LISTEN 0 128 [::]:ssh [::]:_ users:((“sshd”,pid=1022,fd=4))

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

Thanks,  
Cristian

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [May 4, 2020, 5:05am UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/6 "2020-05-04T05:05:55Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![01fbk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/01fbk/32/3737_2.png) [@01fbk](https://discuss.ipfs.tech/u/01fbk)\
**Post date:** [May 4, 2020, 6:45am UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/7 "2020-05-04T06:45:56Z")

</div>

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](http://myserverip:5001/webui) ?  
When I access it, I get a server timeout message.

Thanks,  
Cristian

---

<div class="post-metadata">

**Author:** ![stebalien](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/stebalien/32/156_2.png) [@stebalien](https://discuss.ipfs.tech/u/stebalien)\
**Post date:** [May 5, 2020, 12:07am UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/8 "2020-05-05T00:07:41Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![01fbk](https://sea2.discourse-cdn.com/flex020/user_avatar/discuss.ipfs.tech/01fbk/32/3737_2.png) [@01fbk](https://discuss.ipfs.tech/u/01fbk)\
**Post date:** [May 5, 2020, 8:32am UTC](https://discuss.ipfs.tech/t/cannot-start-ipfs-daemon/7877/9 "2020-05-05T08:32:00Z")

</div>

I understand, thank you for all your help 🙂

Cristian
