pluja / nerostr

nostr paid relay, but with monero

Home Page:https://xmr.usenostr.org

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PreExistent monero wallet ?

alaakaazaam opened this issue · comments

Hi man,
in your docker-compose.yml, the volume defined in monero-wallet-rpc service points from './nerostr_data/wallet/' to :

volumes:
      - ./nerostr_data/wallet/:/home/monero/wallet/

Does it mean one should create this user 'monero' on his server ?

Any hint appreciated

Cheers

Hey @alaakaazaam,

the colon separates two paths. The left path is the one on your host machine and the right one is the path in your container. The user monero already exists inside the container. The wallet directory gets mapped to the folder on the left side of your host machine.

Read more about it in the docker documentaion

Hi, as @hundehausen has already stated, what you are looking at is what is called a "bind" volume. As dockers are containerized (you can see them as a box with a separate OS inside) this indicates that you want to map a directory that is on your host machine to the volume inside the container, so this:

volumes:
      - ./nerostr_data/wallet/:/home/monero/wallet/

would mean:

"Map the local directory ./nerostr_data/wallet/ on my computer to the directory /home/monero/wallet/ that exists inside the container, so these two directories are essentially the same one. "

The directories inside the container are defined and created when the container is built, in this case it happens in this Dockerfile line. If these were not to be predefined, Docker would create them inside the container as empty directories.

You don't have to worry about creating the directories in your host, as Docker manages that automatically and will create the bind directories if these don't exist. In any case, if you should take any action (maybe change permissions) it should be stated in the project's documentation.

In the case of nerostr, you should create the directory ./nerostr_data/wallet/ in the same directory where the docker-compose.yml is placed and put in there your wallet files. If you don't create it and start the project, you will see that docker will create an empty directory and nerostr will not work, since the wallet files will not be in there.

I hope this and the answer from @hundehausen clarify your questions!

Perfect, thanks for these clarifications