#

citrine

(6 articles)

Run Your Own Nostr Relay on Your Android Phone

You don't need a server. You don't need to pay for hosting. Your Android phone is enough to run a personal Nostr relay, accessible from anywhere, over Tor, for free. This guide covers: 1. Installing apps via **Zap Store** 2. Setting up **Citrine** as your relay 3. Exposing it over Tor with **Orbot** 4. Connecting from desktop browsers using **Tor + FoxyProxy** --- ## Step 1: Get Zap Store [Zap Store](https://zapstore.dev) is a Nostr-native app store. Apps are published by their creators directly on Nostr, so you can follow the developer, see their other work, and zap them to support development, all without ads or shady monetization. Discovery can take some getting used to, but there are genuinely useful apps there that you won't find pushed by algorithm or paid placement. If someone you follow builds an app, you can find it on Zap Store and follow their work directly. Install Zap Store first. We'll use it to install the other apps in this guide. --- ## Step 2: Install and Configure Citrine **Citrine** is a Nostr relay that runs locally on your Android phone. It's made by the same developer as **Amber** (the popular Nostr signer app), which is a good trust signal. Install it from Zap Store (or Play Store). Once installed, you have a few options for how permissive your relay is: ### Option A: Personal relay only Only store events from your pubkey or events that mention you. Your relay stays small and relevant to you only. Good default for most people. ### Option B: Open relay with auto-cleanup Allow anyone to publish events to your relay, but run automatic cleanup so old events get deleted. You can configure it to never delete your own events while cleaning up everything else. ### Option C: No filtering Accept and keep everything. Generous, but be aware: your relay is open to spam and your storage will fill up over time. Pick what fits your use case. After configuring, Citrine will start listening on a local port (default: `4869`). Note this port number — you'll need it in the next step. --- ## Step 3: Expose Your Relay Over Tor with Orbot Your relay is running, but it's only accessible locally on your phone. To reach it from other devices and networks, you'll use **Orbot** to create a Tor hidden service (`.onion` address). Install Orbot from Zap Store or Play Store. ### Create a hidden service 1. Open Orbot 2. Go to settings and find **Hidden Services** (or "Tor Hidden Services") 3. Add a new hidden service pointed at the port Citrine is using (e.g. `4869`) 4. Orbot will generate a `.onion` address. Save this, it's your relay address ### Whitelist Citrine in Orbot In Orbot's app list, enable Tor **only for Citrine**. This routes Citrine's traffic through Tor but leaves all your other apps unaffected. ### Set Orbot as Always-On VPN Go to **Android Settings → Network → VPN**, find Orbot, and enable **Always-on VPN**. This makes Orbot start automatically when your phone boots, keeping your relay reachable without manual intervention. > Do not enable the "Block connections without VPN" / kill switch option. Since > only Citrine is whitelisted, enabling it would cut internet access for all > your other apps. Your relay is now live. The `.onion` address works over mobile data, Wi-Fi, any network, no port forwarding, no static IP needed. --- ## Step 4: Add Your Relay to Your Nostr Clients Your `.onion` relay address looks like: `ws://youraddress.onion` Add it to your relay list in your Nostr client. Most mobile Nostr apps (Yakihonne, Amethyst, etc.) have built-in Tor support and will connect to `.onion` relays automatically once you add the address. --- ## Step 5: Connect from Desktop Most mobile apps work out of the box, but desktop browsers can't resolve `.onion` addresses natively. Fix this with Tor + FoxyProxy. ### Install Tor You need Tor running locally. Install it however you prefer. On macOS and Linux, Homebrew is the easiest way: ```bash brew install tor brew services start tor ``` Homebrew itself can be installed from [brew.sh](https://brew.sh). Once running, Tor listens on `localhost:9050` (SOCKS5). ### Install FoxyProxy Install the **FoxyProxy** extension for Firefox or Chromium-based browsers. ### Configure FoxyProxy 1. Click the FoxyProxy icon → **Options** 2. Go to **Proxies** → **Add** 3. Fill in: - **Title:** Onion Resolver (or anything you like) - **Type:** SOCKS5 - **Hostname:** `127.0.0.1` - **Port:** `9050` 4. Scroll down to **Proxy by Patterns** → **Add Pattern** - **Title:** onion - **Pattern:** `*.onion` 5. Save 6. Back in FoxyProxy popup, switch mode to **Proxy by Patterns** Now your browser will route only `.onion` addresses through Tor, leaving all normal traffic unchanged. The goal here is connectivity, not anonymity. You're just making `.onion` addresses resolvable. Open your web-based Nostr client (e.g. Yakihonne web, Primal) and add your relay. It will connect. --- ## You're Done You now have a personal Nostr relay running on your phone, reachable from anywhere in the world. No server, no fees, no central point of failure. Your data lives on your device.

Citrine 0.5.3

## Citrine 0.5.4 - Fix notification icon size - Fix loading screen - Update dependencies Download it with [zap.store](https://zap.store/download), [Obtainium](https://github.com/ImranR98/Obtainium), [f-droid](https://f-droid.org/packages/com.greenart7c3.citrine) or download it directly in the [releases page](https://github.com/greenart7c3/Citrine/releases/tag/v0.5.4) If you like my work consider making a [donation](https://greenart7c3.com) ## Verifying the release In order to verify the release, you'll need to have `gpg` or `gpg2` installed on your system. Once you've obtained a copy (and hopefully verified that as well), you'll first need to import the keys that have signed this release if you haven't done so already: ```bash gpg --keyserver hkps://keys.openpgp.org --recv-keys 44F0AAEB77F373747E3D5444885822EED3A26A6D ``` Once you have his PGP key you can verify the release (assuming `manifest-v0.5.4.txt` and `manifest-v0.5.4.txt.sig` are in the current directory) with: ```bash gpg --verify manifest-v0.5.4.txt.sig manifest-v0.5.4.txt ``` You should see the following if the verification was successful: ```bash gpg: Signature made Fri 13 Sep 2024 08:06:52 AM -03 gpg: using RSA key 44F0AAEB77F373747E3D5444885822EED3A26A6D gpg: Good signature from "greenart7c3 <greenart7c3@proton.me>" ``` That will verify the signature on the main manifest page which ensures integrity and authenticity of the binaries you've downloaded locally. Next, depending on your operating system you should then re-calculate the sha256 sum of the binary, and compare that with the following hashes: ```bash cat manifest-v0.5.4.txt ``` One can use the `shasum -a 256 <file name here>` tool in order to re-compute the `sha256` hash of the target binary for your operating system. The produced hash should be compared with the hashes listed above and they should match exactly.