Self-hosting
Deploy on Fly.io
Run your own Moru node on Fly.io as one Machine with one volume, with a custom domain and backups.
On Fly.io a node is one app with one Machine and one volume. Fly’s proxy terminates TLS, and the Machine runs the published image as it is.
You need flyctl (the fly command), signed in with fly auth login. The examples use an app called acme-moru in the ord region; pick your own name and a region near your team.
1. Write fly.toml#
Put this in an empty directory as fly.toml, with your app name and URL:
app = "acme-moru"
primary_region = "ord"
[build]
image = "ghcr.io/webstonehq/moru-node:latest"
[env]
# The URL people use: https://<app>.fly.dev, or your own domain.
MORU_PUBLIC_URL = "https://acme-moru.fly.dev"
# Fly's proxy reaches the Machine on a private IPv4 address.
MORU_TRUSTED_PROXIES = "private"
[[mounts]]
source = "moru_data"
destination = "/data"
[http_service]
internal_port = 7070
force_https = true
# One Machine that never sleeps: runners long-poll it, and the node keeps in
# memory which runners are online.
auto_stop_machines = "off"
auto_start_machines = true
min_machines_running = 1
[[http_service.checks]]
grace_period = "20s"
interval = "30s"
method = "GET"
path = "/api/v0/health"
timeout = "5s"
[[vm]]
size = "shared-cpu-2x"
memory = "2gb" What matters here:
- One Machine, never stopped. Don’t scale the app out: two Machines would be two separate nodes with two volumes. A host on several nodes is set up differently; see Running many nodes. Keep
auto_stop_machinesoff, since runners and open browser tabs expect the node to be there. - The volume at
/dataholds everything the node keeps. Fly mounts it as root; the image hands it to its own user (uid 10001) on start. MORU_TRUSTED_PROXIES = "private"lets sign-in rate limits see each client’s address instead of Fly’s proxy.MORU_PUBLIC_URLmust be the address people use. Change it when you add your own domain.
Add other settings from Configuration under [env]. Pin the image to a version (ghcr.io/webstonehq/moru-node:2026.11.5) if you want to upgrade only when you choose.
2. Create the app and its volume#
Create the volume in the same region as primary_region:
fly apps create acme-moru
fly volumes create moru_data --app acme-moru --region ord --size 10 --size is in GB. Repos, their history and backups’ temporary files all live there; you can extend the volume later with fly volumes extend.
3. Deploy and create the first admin#
fly deploy
fly logs --app acme-moru --no-tail | grep 'setup#code=' Open the setup link from the log, pick a handle and a password, and you’re the node’s admin. The link works once, for 24 hours, and each restart replaces it until it’s used. See Create the first admin.
Check that the health check is green:
fly status --app acme-moru 4. Use your own domain#
fly certs add moru.example.com --app acme-moru Add the DNS records it prints. Once fly certs show moru.example.com --app acme-moru says the certificate is issued, set MORU_PUBLIC_URL = "https://moru.example.com" in fly.toml and deploy again. Links the node makes (clone URLs, invites, runner commands) then use the new address.
If you plan to use a did:plc host identity, choose the final domain first: the public URL is written into the DID document. See Host identity.
Run commands on the node#
fly ssh console runs a command in the Machine. moru-node there runs as the node’s user and knows where the data is:
fly ssh console --app acme-moru -C "moru-node create-user jon"
fly ssh console --app acme-moru -C "moru-node list-runners" Backups#
Write the backup inside the Machine, copy it off, then delete it:
fly ssh console --app acme-moru -C "moru-node backup /tmp/moru.tgz"
fly ssh sftp get /tmp/moru.tgz --app acme-moru
fly ssh console --app acme-moru -C "rm /tmp/moru.tgz" The archive holds unencrypted keys, so encrypt it before you store it, for example with age. A Fly volume lives on one server. Fly’s daily volume snapshots help, but keep your own backups somewhere else as well. See Backups.
Upgrading#
Fly doesn’t pull a new image by itself. With :latest in fly.toml, deploy again to get the newest release (and the weekly rebuilds with fresh system packages):
fly deploy With a pinned version, change the tag and deploy. Take a backup first. See Upgrading.
Runners#
Runners connect out to the node, so they can run anywhere: a server, a laptop, another cloud. See Add a runner. A Fly Machine works too: it’s a VM of its own, so the agents can reach only what you put on it. Install git, the runner and the toolchains your repositories need, then register and start it as on any Linux machine. See Where to run a runner.