How to set ipfs local dir?

From @cxgreat2014 on Fri Dec 16 2016 05:20:40 GMT+0000 (UTC)

I find that ipfs default data path in windows is in %USERPROFILE%/.ipfs, how to change it to other place? thanks.

Copied from original issue:

From @Kubuxu on Fri Dec 16 2016 10:43:46 GMT+0000 (UTC)

It is controlled by environment variable IPFS_PATH

See help notes of ipfs init --help.

From @cxgreat2014 on Fri Dec 16 2016 14:31:12 GMT+0000 (UTC)

Thanks a lot~!

I did this and added the env variable to my shell config, so i works every time I open a terminal and run ipfs daemon to store in the folder I want.

But…when I try to run the IPFS desktop, it says it’s storing files in ~/.ipfs.

Is there some way to make the Desktop version use the same env variable from my shell config?