I need some ipfs hashes to remain available over months or years, therefore I want to run the ipfs daemon on my own machine. What is the best way to achieve this?
This is what I tried:
I am running a cloud-hosted VM, installed the latest ipfs and did ipfs init, all working fine.
I ipfs pin the objects that I want to remain available, all still fine.
I run ipfs daemon inside a tmux session to run in background and also when I log out. Since the cloud machine might reboot at times I want ipfs daemon to run on boot. Therefore I added the following lines to /etc/rc.local
Unfortunately ipfs does not seem to be able to launch inside a tmux session - it gives me the following error:
root@xxx:~# ipfs daemon
Initializing daemon...
Adjusting current ulimit to 2048...
Successfully raised file descriptor limit to 2048.
Error: no IPFS repo found in ~/.ipfs.
please run: 'ipfs init'
root@xxx:~#
When running ipfs daemon outside of tmux all is good.
The text was updated successfully, but these errors were encountered:
I just realized that all works well when starting the daemon via sudo ipfs daemon. This is a default Ubuntu 16.04 machine on Digital Ocean - I am anyway root already and dont understand why this is required.
SCBuergel
changed the title
how do I start ipfs daemon inside tmux?
why do I need sudo to start ipfs daemon inside tmux?
May 15, 2017
It just can't find the repo, probably your session isn't setup correctly and $HOME points who-knows-where. What does echo $HOME print?
We discourage running go-ipfs as root for security reasons -- only run things as root if you know what you're doing. (This applies to any software, not just go-ipfs.)
SCBuergel commentedMay 15, 2017
I need some ipfs hashes to remain available over months or years, therefore I want to run the ipfs daemon on my own machine. What is the best way to achieve this?
This is what I tried:
ipfs init, all working fine.ipfs pinthe objects that I want to remain available, all still fine.ipfs daemoninside atmuxsession to run in background and also when I log out. Since the cloud machine might reboot at times I wantipfs daemonto run on boot. Therefore I added the following lines to/etc/rc.localUnfortunately ipfs does not seem to be able to launch inside a
tmuxsession - it gives me the following error:When running
ipfs daemonoutside oftmuxall is good.The text was updated successfully, but these errors were encountered: