Error: lock /config/ipfs/repo.lock: someone else has the lock

root@280f47b7675f:/# ipfs daemon
Initializing daemon...
go-ipfs version: 0.5.1-8c67a90723
Repo version: 9
System version: amd64/linux
Golang version: go1.13.10

Error: lock /config/ipfs/repo.lock: someone else has the lock

I am also unable to load the main page. I get could not connect to ipfs api. I have run the commands as suggested but this did not work.

  "API": {
    "HTTPHeaders": {
      "Access-Control-Allow-Methods": [
      "Access-Control-Allow-Origin": [

Where am I going wrong here?
This is being run on an unraid docker.

# Could not connect to the IPFS API

Check out the installation guide in the [IPFS Docs](, or try these common fixes:

1. Is your IPFS daemon running? Try starting or restarting it from your terminal:


`$ ipfs daemon` `Initializing daemon...` `API server listening on /ip4/`

2. Is your IPFS API configured to allow [cross-origin (CORS) requests]( If not, run these commands and then start your daemon from the terminal:


`$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["", "http://localhost:3000", "", ""]'` `$ ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "POST"]'`

3. Is your IPFS API on a port other than 5001? If your node is configured with a [custom API address](, enter it here.

The error in the first part looks as if a previous run crashed leaving the repo.lock file in place. Try removing the lock with the command “rm /config/ipfs/repo.lock” before running the ipfs daemon again.