Author

Topic: Electrum on server for receiving and sending payments (Read 291 times)

full member
Activity: 634
Merit: 106
Europe Belongs To Christians
Hello,
I would like to use Electrum in the following way:
  • Generate new deposit address
  • User sends their funds to this address
  • After user deposit is received, electrum sends the funds to a different address, e.g. in cold storage
So basically use Electrum to generate addresses, receive funds and redirect funds to another place.

It is possible to do with Electrum? I was not able to find any docs how to do such things, especially working on server for receiving and redirecting.



try this then  -> https://bcoin.io/
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
Basically yes, I would like to create a hot wallet, but didn't really think that it is called "hot". Are there any tutorials or resources how to make an Electrum-based hot wallet on server?

If you install any full, funded wallet (be it core, electrum, btcd,...) on an online webserver and use it to automatically handle payouts, it is per defenition a hot wallet.

You can find info about the json rpc interface: http://docs.electrum.org/en/latest/merchant.html
newbie
Activity: 17
Merit: 0
Basically yes, I would like to create a hot wallet, but didn't really think that it is called "hot". Are there any tutorials or resources how to make an Electrum-based hot wallet on server?
legendary
Activity: 1624
Merit: 2481
The idea would be that your offline-wallet (which holds the private keys) won't be vulnerable to attacks.
A wallet on an online server does always create a risk. With a watch-only wallet, you'll be able to generate receiving addresses but won't be able to send funds (since no private keys are stored).

If you then want to move funds, you'll need to do that from your offline-wallet (which is the only wallet holding the private keys).


You can't modify the watch-only wallet so that it will be able to send funds (if that's what your question was). This would be an oxymoron.

Generally this 2-wallet-setup is the best approach. Storing private keys on an online server is never a good idea. But in some cases it is required (e.g. hot wallet of an exchange).
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
Thanks for the tip with watch only wallet. The thing is - I also need to send bitcoins from Electrum. Would this cold wallet solution, perhaps with some modifications, work for sending or a completely different approach is neede then?

Sure, you can use your watch-only wallet to create unsigned transactions, then transfer them to your cold wallet for signing and back to your watch-only wallet for broadcasting.

Or, you can just install electrum on a 100% clean desktop PC that can actually connect to the internet, generate a new seed (write it down), export the xpub to your server for a watch only wallet. In this case, you can just spend your funds from the electrum wallet on your online desktop PC.. Offcourse, this setup is less secure than a real cold wallet.
A different, safer, sollution would be to use a hardware wallet and export it's xpub (and import it on your watch-only wallet on your server). This way, you could spend your funds by using your hardware wallet Wink
newbie
Activity: 17
Merit: 0
Thanks for the tip with watch only wallet. The thing is - I also need to send bitcoins from Electrum. Would this cold wallet solution, perhaps with some modifications, work for sending or a completely different approach is neede then?
legendary
Activity: 3710
Merit: 1586
As mocacinno said there is no need for that last step. You can simply create a cold storage wallet on an offline device or via a linux live cd with the net disconnected. Then grab the master public key of that wallet via wallet menu > information and copy that to a text file on a removable drive. On the server you can create a watch only wallet with that mpk like so:

Code:
electrum restore 

(replace with the actual mpk starting with xpub...)

The watch only wallet will let you generate receive addresses but not spend your bitcoins. So you basically will be receiving funds directly to your cold storage wallet without exposing your private keys to an online device.

To generate receive addresses using addrequest with the --force switch:

Code:
electrum addrequest --force 0.1

0.1 can be any amount. The command requires an amount but that doesn't affect how much someone can send you.

newbie
Activity: 17
Merit: 0
Thank you for the replies guys. I will start with installation of Electrum on Linux and read the docs on commands.
HCP
legendary
Activity: 2086
Merit: 4363
I also saw Electrum for LTC and DASH for example. Looks like they all share the same Python command interface. Does that mean that they are also capable to do the same things as Electrum BTC does?
Not necessarily.

NONE of the Electrum forks are created by the original Electrum Devs... they are all created by other people and may or may not support any features of the original Electrum... you would need to check with the Devs of each fork to see if it still works as intended.
legendary
Activity: 3612
Merit: 5297
https://merel.mobi => buy facemasks with BTC/LTC
Just a remark here... Wouldn't it be easyer to run electrum as a daemon and create a watch only wallet by importing the cold wallet's xpub?

This way the online electrum daemon would derive addresses from the xpub, but there would be no way for a hacker to rob you, since the xprv is only stored in an offline machine. This setup will save you a lot of headache, time and fees...

I know this doesn't answer your questions directly, i was merely trying to give you a different perspective... Sometimes we get caught up in a sollution that's stuck in our mind without considering there might be better sollutions to begin with Wink
legendary
Activity: 1624
Merit: 2481
Thank you for the reply. Is it possible to install Electrum (not ElectrumX, just standard one) on server and access it commands?

Yes, of course.

ElectrumX is an electrum server (Clients (standard electrum) contacts electrum servers to get the block header and all necessary information).
You don't need to (and according to your post: don't want to) run an electrum server.

Note that running electrum on a server is NOT the same as running an electrum server.

Simply install electrum on your server.



I also saw Electrum for LTC and DASH for example. Looks like they all share the same Python command interface. Does that mean that they are also capable to do the same things as Electrum BTC does?

The official electrum only supports BTC. All other versions for other coins are forks.

IF they support the same commands, then yes.. they can do the same as the original electrum. But you'll have to check that first.
newbie
Activity: 17
Merit: 0
Thank you for the reply. Is it possible to install Electrum (not ElectrumX, just standard one) on server and access it commands?

I also saw Electrum for LTC and DASH for example. Looks like they all share the same Python command interface. Does that mean that they are also capable to do the same things as Electrum BTC does?
legendary
Activity: 1624
Merit: 2481
Yes, you can do this with electrum.

There is no automatic 'redirection' of funds available. You'll need to program that logic yourself.

You can use RPCs to generate new addresses, check whether funds have been received and to send funds.
There isn't much more necessary to implement your concept.


Further information can be found in the documentation (http://docs.electrum.org/en/latest/). Especially under 'How to accept Bitcoin on a website using Electrum'
newbie
Activity: 17
Merit: 0
Hello,
I would like to use Electrum in the following way:
  • Generate new deposit address
  • User sends their funds to this address
  • After user deposit is received, electrum sends the funds to a different address, e.g. in cold storage
So basically use Electrum to generate addresses, receive funds and redirect funds to another place.

It is possible to do with Electrum? I was not able to find any docs how to do such things, especially working on server for receiving and redirecting.
Jump to: