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:
- Fork this repository
- Launch your MollySocket server
- Install a UnifiedPush distributor on your Android phone
- Install Molly on your Android phone
- Setup the Molly app for push notifications
- Establish the connection on your MollySocket server
- Restart the server
- Set up automatic updates
- Subscribe to mollysocket-fly releases
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
.
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.
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 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.
Once Molly is all set up and running, go into notification settings in Molly and scroll down to the bottom.
- Find Delivery service and click on it.
- Select UnifiedPush. This will bring up a message about scanning a QR code.
- Come back to the git repository you cloned. Run
make qr
. This should show you a QR code. - 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. - 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).
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.
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:
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.
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.