Skip to content

Add samourai-server app#461

Merged
lukechilds merged 65 commits into
getumbrel:masterfrom
louneskmt:samourai-dojo
Feb 12, 2021
Merged

Add samourai-server app#461
lukechilds merged 65 commits into
getumbrel:masterfrom
louneskmt:samourai-dojo

Conversation

@louneskmt

@louneskmt louneskmt commented Jan 26, 2021

Copy link
Copy Markdown
Contributor

App Submission

App name

Samourai Server

Version

1.8.0

One line description of the app

(max 50 characters)

Your private backing server for Samourai Wallet

Summary of the app

(50 to 200 words)

Samourai Server is an exclusive Umbrel app that runs both the Samourai Dojo and Whirlpool servers, and provides you easy step-by-step instructions to connect your Samourai Wallet to them. Samourai Wallet is unrivaled in transaction privacy, but its default configuration is still subject to network level privacy loss.

By default, Samourai Wallet will connect to its centrally controlled Dojo hosted in Iceland. By hosting your own Samourai Server, you can bypass its servers completely when using Samourai Wallet or Sentinel, and gain total financial sovereignty without any complexity.

Developed by

Samourai

Developer website

https://samouraiwallet.com

Source code repository

https://code.samourai.io/dojo/samourai-dojo

Support link

(Link to your Telegram support channel, GitHub issues/discussions, support portal, or any other place where users could contact you for support.)

https://t.me/SamouraiWallet

Uses

  • Bitcoin Core
  • Electrum server
  • LND

256x256 SVG icon

(GitHub doesn't allow uploadig SVGs directly. Upload your file to an alternate service, like https://svgur.com, and paste the link below.)

icon

App screenshots

(Upload 3 to 5 high-quality screenshots (at least 1280x800px) of your app in PNG format.)

...

I have tested my app on:

Closes #458
Closes #459

@lukechilds lukechilds left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't able to run this locally due to IP collisions but here's some feedback based on skimming the code.

Comment thread apps/samourai-dojo/docker-compose.yml Outdated
Comment thread apps/samourai-dojo/docker-compose.yml Outdated
Comment thread apps/samourai-dojo/docker-compose.yml Outdated
Comment thread apps/samourai-dojo/docker-compose.yml
Comment thread apps/samourai-dojo/docker-compose.yml Outdated
Comment thread apps/samourai-dojo/docker-compose.yml Outdated
Comment thread apps/samourai-dojo/docker-compose.yml Outdated
Comment thread apps/samourai-dojo/docker-compose.yml Outdated
Comment thread scripts/app Outdated
Comment thread templates/bitcoin-sample.conf Outdated
@louneskmt louneskmt marked this pull request as ready for review January 29, 2021 16:05
Comment thread apps/samourai-server/nginx/connect/index.html Outdated
@AaronDewes

Copy link
Copy Markdown
Contributor

Where is the source code for the whirlpool container?

@lukechilds

Copy link
Copy Markdown
Member

@AaronDewes

Copy link
Copy Markdown
Contributor

@AaronDewes we're waiting on @louneskmt to push his fork but it's basically this with some minor modifications: https://code.samourai.io/dojo/samourai-dojo/-/blob/develop/docker/my-dojo/whirlpool/Dockerfile

Great! I'll try to implement whirlpools actual GUI next week if no one else does it until then

@louneskmt

Copy link
Copy Markdown
Contributor Author

@AaronDewes we're waiting on @louneskmt to push his fork but it's basically this with some minor modifications: https://code.samourai.io/dojo/samourai-dojo/-/blob/develop/docker/my-dojo/whirlpool/Dockerfile

Here is my PR to Dojo source : https://code.samourai.io/dojo/samourai-dojo/-/merge_requests/196

Once it's merged (if it gets merged haha), the only manual change we will have to do is to switch from uid:gid 1110:1113 to 1000:1000 in Whirlpool Dockerfile. Unless we find another workaround which doesn't involve changing source.

@louneskmt

louneskmt commented Feb 12, 2021

Copy link
Copy Markdown
Contributor Author

Great! I'll try to implement whirlpools actual GUI next week if no one else does it until then

Unfortunately that likely won't be possible, @lukechilds and I have already checked. Whirlpool GUI is an Electron app, with no clear separation between front end and backend.

@lukechilds

Copy link
Copy Markdown
Member

It's definitely possible it's just a bit of a pain. All of the web ui <> node communication is done via electron ipc, so that all needs to be replaced with an HTTP API.

You could potentially even just stub out the electron ipc module with something that translates all the calls to HTTP.

However there might be some other issues too, e.g disable connection setup UI and pass all the local connection details directly in.

Definitely possible but a fairly big job. Feel free to have a crack at it though @AaronDewes, it would be a huge improvement to the Samourai experience on Umbrel if we could drop the Whirlpool GUI requirement!

@lukechilds

Copy link
Copy Markdown
Member

Also the changes would need to be submitted upstream to Whirlpool GUI with either a runtime flag to toggle between Electron/web mode, or refactor the Electron app to do all communication via HTTP.

That way we can easily keep the Umbrel Whirlpool UI up to date with the official Whirlpool GUI since they would share the same codebase. What we really don't want to do is have our own separate web based fork of Whirlpool UI that we then need to continuously maintain to keep up to date.

It might be worth finding out if the Samourai devs would accept such a change before investing a lot of time into it.

@lukechilds

lukechilds commented Feb 12, 2021

Copy link
Copy Markdown
Member

@louneskmt are you able to push the exact source your containers are built from to GitHub?

Ideally then rebuild and push to Docker Hub to ensure the checksums match. That way anyone is able to re-build from source to verify the images for themselves.

Once that's done, this is good to be merged!

@louneskmt

Copy link
Copy Markdown
Contributor Author

@lukechilds As I've said, if this PR gets merged, it will be possible to build the images directly from the Dojo official source.

Isn't it possible to find a workaround to fix this permissions issue (uid:gid) so it's possible to build Whirlpool image too without any modifications?

Here is my PR to Dojo source : https://code.samourai.io/dojo/samourai-dojo/-/merge_requests/196

Once it's merged (if it gets merged haha), the only manual change we will have to do is to switch from uid:gid 1110:1113 to 1000:1000 in Whirlpool Dockerfile. Unless we find another workaround which doesn't involve changing source.

@lukechilds

Copy link
Copy Markdown
Member

Right but that requires manual changes, even just something tiny like changing the uids will result in a totally different checksum for the resulting Docker images so no one can verify the images unless they know the exact changes.

We should have code publicly available for all Docker images user in Umbrel that anyone can pull down and build to reproduce the images.

@lukechilds

Copy link
Copy Markdown
Member

Isn't it possible to find a workaround to fix this permissions issue (uid:gid) so it's possible to build Whirlpool image too without any modifications?

Yes but we shouldn't do that. Umbrel should be in control of the container UID, not the Dockerfile. Otherwise a Dockerfile could run itself as root. For a Dockerfile to be compatible with Umbrel it needs to be able to be run under any UID.

@lukechilds

Copy link
Copy Markdown
Member

@louneskmt if you could ping me once that's done and the latest images are pushed based on the public sources I'll add the checksums and do one last test (just in the unlikely case the latest images broke anything) and then we can merge!

@louneskmt

Copy link
Copy Markdown
Contributor Author

@louneskmt if you could ping me once that's done and the latest images are pushed based on the public sources I'll add the checksums and do one last test (just in the unlikely case the latest images broke anything) and then we can merge!

Samourai Dojo source code, edited for Umbrel, is now available at https://github.com/louneskmt/umbrel-samourai-dojo.

Latest version is tagged here.

Latest images are built and pushed to Docker Hub: dojo-nodejs and dojo-whirlpool.

Images tested and checksums added in e8ddbd2.

@lukechilds @mayankchhabra

@lukechilds lukechilds left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Excellent stuff @louneskmt, really great job!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Package Samourai Whirlpool Package Samourai Dojo

5 participants