Skip to content

Latest commit

 

History

History
128 lines (88 loc) · 5.81 KB

HOWTO.md

File metadata and controls

128 lines (88 loc) · 5.81 KB

Getting Molly with UnifiedPush working

Here are the steps required to get things working. If you want to understand the big picture of what we're setting up, check out What we're building and why.

If any of these steps give you trouble, then check out Troubleshooting.

Table of Contents:

  1. Fork this repository
  2. Launch your MollySocket server
  3. Install a UnifiedPush distributor on your Android phone
  4. Install Molly on your Android phone
  5. Setup the Molly app for push notifications
  6. Establish the connection on your MollySocket server
  7. Restart the server
  8. Set up automatic updates
  9. Subscribe to mollysocket-fly releases

Fork this repository

You technically don't need to fork this repository, however having your own fork on GitHub will allow you to use GitHub Actions to automatically keep your MollySocket server up-to-date (explained below). If you choose not to fork this repository, that's fine, but you will need to set up your own software update routine using make deploy.

Launch your MollySocket server

Set up a Fly.io account and install the CLI. You may also need to associate a credit card with that account.

Then clone your repository and create your Fly.io app:

git clone [email protected]:${GITHUB_USERNAME}/mollysocket-fly.git
cd mollysocket-fly
make launch

If this completes successfully, you'll have a new app in Fly.io, plus a new fly.toml configuration file in your current directory. You shouldn't need to edit this file, but it's good to know that it exists, and you should definitely keep it around.

Install a UnifiedPush distributor on your Android phone

I recommend installing ntfy as a UnifiedPush distributor, and it requires no configuration whatsoever. It just needs to be installed and running.

Disable battery optimization for ntfy in Android settings. Don't worry; In my experience, ntfy has next to zero impact on battery life when on WiFi, and is significantly better than Signal when on mobile data connections.

Install Molly on your Android phone

Install Molly on your phone and migrate your Signal account (if necessary).

Also disable battery optimizations for the Molly app. And once again don't worry; Molly won't eat your battery like the Signal app.

Setup the Molly app for push notifications

Once Molly is all set up and running, go into notification settings in Molly and scroll down to the bottom.

  1. Find Delivery service and click on it.
  2. Select UnifiedPush. This will bring up a message about scanning a QR code.
  3. Come back to the git repository you cloned. Run make qr. This should show you a QR code.
  4. On your phone, click Scan QR code. Allow the app to use your camera, and scan the code. If your terminal background is light (what kind of monster are you? 😉) and you have trouble scanning the QR code, try running make qr-invert instead.
  5. Click on "Server parameters" to copy a command to the clipboard.

Send that command to your computer where you're working somehow (for example via Signal's "Note to self" feature and the Signal Desktop app).

Establish the connection on your MollySocket server

Come back to the git repository you cloned. Run

make ssh

This will open an interactive terminal on your server. Then run mollysocket <the-command-you-just-copied-above>

You should see a new Molly notification on your phone:

This is a test notification received from your MollySocket server.

Almost done! Run exit to exit the SSH session and come back to your local machine.

Restart the server

Run make restart. This will restart the MollySocket server, which will cause MollySocket to begin monitoring the Signal service for notifications.

If everything is working, there's just one thing left to do:

Set up automatic updates

Go to your repository's GitHub Actions tab (https://github.com/${GITHUB_USERNAME}/mollysocket-fly/actions) and click the big green "I understand my workflows, go ahead and enable them" button. Feel free to review the workflows to make sure I'm not doing anything nasty to you.

Go to your repository settings on GitHub and head over to Secrets and Variables -> Actions (https://github.com/${GITHUB_USERNAME}/mollysocket-fly/settings/secrets/actions)

Populate the FLY_APP repository secret with the name of the app. This should be toward the top of your fly.toml file.

Back on your terminal, while you're in your cloned repository, run make deploy-token. Then populate the FLY_DEPLOY_TOKEN repository secret with the output of that command.

At this point GitHub Actions will update your MollySocket instance once per week. If you want to configure this, you can edit the deploy.yml file.

Subscribe to mollysocket-fly releases

I periodically update this repository. If you want to keep your configuration up-to-date with the latest changes, subscribe to releases on this repository. On the repository's main page click the Watch button, then Custom, then the Releases checkbox.

When any significant changes happen here, we'll cut a new release, and GitHub will notify you. You can read the release notes and optionally synchronize your fork with the main repository.