Command line

Every moor command and its flags.

On this page

Every command of moor, as its --help says it. This page is made from the commands themselves, and a test keeps it the same as they are. The documentation lists the common ones.

An app is chosen with --app, $MOOR_APP, [app].name in the moorage.toml of the current directory, or the repository's moorage git remote.

Commands that talk to a server also take these, which are left out below:

FlagWhat it says
--server URLThe server. By default $MOOR_SERVER, or the server configured on this machine
--token TOKENAn API token. By default $MOOR_TOKEN, or the admin token of the server on this machine
--ca-cert FILEA PEM file of an extra CA to trust, such as the server's internal CA. By default $MOOR_CA_CERT

moor access#

Each environment has a gate, which applies to everything it serves:

  public    anyone
  password  a shared password; scripts send it with HTTP Basic
  login     people signed in to Moorage, with a role in its project, or with
            --any-user anyone with an account; the app hears who they are, and
            scripts send an API token with the gate scope
  share     only people with a share link

A share link works with every gate. A list of addresses can be combined with any of them. Unless one is set here, the gate is what the manifest asks, or else the server's default for that kind of environment.

moor access
moor access
moor access set password --env staging
moor access set login --allow-cidr 10.0.0.0/8
moor access set default --env staging
moor share --expires 3d
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor access set#

Change an environment's gate, at once. default leaves it to the manifest and the server. The password gate asks for its password, without echoing it, or reads it from standard input. Changing the gate or its password ends everyone's way in.

--allow-cidr replaces the list of addresses it can be reached from, and --anywhere takes the list away. Otherwise the list stays as it is.

moor access set public|password|login|share|default
FlagDefaultWhat it does
--allow-cidr stringsaddresses it can be reached from, such as 10.0.0.0/8
--any-userwith login, let in anyone with an account
--anywheretake away the list of addresses
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--passwordset the password too, for when the manifest asks for the gate

moor agent#

Tell coding agents how to use Moorage

moor agent init#

Add instructions for coding agents to the repository in DIR (default: the current directory): a section of AGENTS.md, and an Agent Skill in .agents/skills, .claude/skills and .kiro/skills. They teach an agent to deploy and look at this app with moor or moor mcp, and what to be careful of. They hold no token, so they can be committed. Running this again brings them up to date, and leaves the rest of AGENTS.md as it was.

moor agent init [DIR]
moor agent init --app shop
FlagDefaultWhat it does
--app stringthe app; moorage.toml's name if left out

moor alerts#

List an environment's thresholds. Past one for as long as it says, a notification goes to whoever a rule sends "A threshold is crossed" to, and another when it comes right.

moor alerts
moor alerts add error-rate 5 --for 5m
moor alerts add latency-p95 800 --for 10m --env staging
moor alerts add memory 90
moor alerts rm thr_01J…
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint JSON

moor alerts add#

Add a threshold. METRIC is one of:

  error-rate    the percentage of answers that are 5xx, over the last minute
  latency-p95   how long the slowest 5 in 100 requests took at least, in milliseconds
  memory        the instance using the most, as a percentage of its [resources] limit
  cpu           the instance using the most, as a percentage of one core

A minute with no requests in it, or fewer than 5 for an error rate, says nothing either way.

moor alerts add METRIC ABOVE
moor alerts add error-rate 5 --for 5m
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--for string5mhow long it has to go on for

moor alerts rm#

Remove a threshold

moor alerts rm ID
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor apps#

List the apps

moor apps
FlagDefaultWhat it does
--jsonprint as JSON

moor apps create#

Create an app, before its first deployment. Deploying also creates one, in the default project: this is how an app starts in another.

moor apps create NAME
moor apps create shop --project payments
FlagDefaultWhat it does
--project stringthe project it goes in (default: the default project)

moor apps delete#

Delete an app: its instances, variables, releases, builds, logs and repository, and its data directory unless --keep-data keeps it. This cannot be undone. It asks you to type the app's name first, unless --yes.

moor apps delete NAME
moor apps delete shop
moor apps delete shop --keep-data --yes
FlagDefaultWhat it does
--keep-datakeep its data directory
--yesdo not ask

moor apps info#

Show an app's address and project, and how much room it takes

moor apps info NAME
FlagDefaultWhat it does
--jsonprint as JSON

moor apps move#

Put an app in another project. It takes being a maintainer of both.

moor apps move NAME --project PROJECT
moor apps move shop --project payments
FlagDefaultWhat it does
--project stringthe project it goes in

moor apps rename#

Give an app another name, which is another address and another git remote. Its instances stop and start again under the new name, so there is a moment of downtime.

Change [app].name in its moorage.toml, and its git remote, to match: a deploy by the old name makes a new app.

moor apps rename NAME NEW
moor apps rename shop store

moor audit#

Show who did what, newest first: every change through the API or the console, every sign-in, every push and every secret revealed, whether it worked or not, kept for a year. It takes an administrator.

moor audit
moor audit -n 20
moor audit --actor ana@example.com --action signin
FlagDefaultWhat it does
--action stringonly actions with this text
--actor stringonly what this person did
--jsonprint as JSON
-n, --number int50how many, up to 200
--target stringonly what was done to this

moor context#

A context is a server and the token for it, saved by moor login. Commands use the current one, unless --server or $MOOR_SERVER says otherwise.

moor context

moor context rm#

Forget a context, without revoking its token

moor context rm NAME

moor context use#

Make a context the current one

moor context use NAME

moor cron#

Cron jobs are declared in moorage.toml as [[cron]], and run as one-off instances of the current release. The last 100 runs of each are kept, with what they said.

moor cron
moor cron
moor cron run nightly-cleanup
moor cron runs nightly-cleanup
moor cron log run_01J…
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor cron log#

Show what a run said, and go on showing it until it ends

moor cron log RUN
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor cron run#

Run a cron job now, whatever its schedule says

moor cron run JOB
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--detachstart it and return
--env stringproductionenvironment

moor cron runs#

List an environment's runs, newest first; a job's, if it is named

moor cron runs [JOB]
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor deploy#

Deploy to an app's production environment. The app is created if it does not exist yet.

Without a flag, DIR (default: the current directory) is source: it is uploaded, leaving out what .gitignore and .moorignore exclude, and the server builds it as moorage.toml says (or as it detects: Go, Python, Node.js, a static site), runs the release command, and rolls the new release out. The build's output is shown as it happens; Ctrl-C stops following, not the deployment.

With --static, the files under DIR are uploaded and served as they are, following the [static] rules of moorage.toml in the current directory. DIR defaults to [static].dir in moorage.toml, or the current directory.

With --artifact, DIR (default: the current directory) holds an app that is ready to run, such as a compiled binary; the [processes] of moorage.toml in the current directory say how to run it.

With --image, the server fetches an image and runs it in a container, pinned to the digest it has now. The moorage.toml in DIR (default: the current directory) is sent with it, if there is one, and no other file. A private registry needs its credentials on the server: see moor registry login.

A new release takes over once its instances are healthy; until then the previous release keeps serving.

moor deploy [DIR]
moor deploy                       # build and deploy the current directory
moor deploy ./api --app api
moor deploy --static ./public --app docs
moor deploy --artifact ./dist --app api
moor deploy --image ghcr.io/acme/api:1.4 --app api
FlagDefaultWhat it does
--app stringapp to deploy to (default: $MOOR_APP or [app].name in moorage.toml)
--artifactupload an app that is ready to run and run its [processes]
--detachreturn once the deployment is queued, without following it
--env stringproductionenvironment to deploy to
--image stringrun this image in a container, pinned to its digest, instead of building DIR
--staticupload a directory of files and serve them as they are

moor deployments#

List an app's latest deployments: what was deployed, how it went, and the release it made. Show one with 'moor deployments show ID', and follow one that is running with 'moor deployments follow ID'.

moor deployments
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON
--limit int20how many to list

moor deployments follow#

Print a deployment's log from its start and, while it runs, as it is written. Fails if the deployment failed.

moor deployments follow ID

moor deployments show#

Show a deployment

moor deployments show ID
FlagDefaultWhat it does
--jsonprint as JSON

moor domains#

Attach a hostname of your own to an environment, or a path on one, so that several apps can share a hostname. Its DNS must point here before it serves: a CNAME to the environment's own hostname, or an address of this server.

A path is kept in what the app hears, which X-Forwarded-Prefix also says, unless --strip-prefix takes it away. Redirects and cookies from the app are made to fit it. Links in what the app sends are its own affair.

moor domains
moor domains add portal.example.com
moor domains add tools.example.com/reports --app reports
moor domains verify portal.example.com
moor domains remove portal.example.com
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor domains add#

Attach a domain, which serves once its DNS points here

moor domains add HOSTNAME[/PATH]
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--strip-prefixtake the path away from what the app hears

moor domains remove#

Detach a domain, at once

moor domains remove HOSTNAME[/PATH]
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor domains verify#

Look now at where a domain points

moor domains verify HOSTNAME[/PATH]
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor env#

Variables set on the server configure an app without changing its code. They override the [env] of moorage.toml, and a variable set for one environment overrides one set for every environment (--all-envs).

Secret values (--secret) are encrypted on the server and never shown again; they are kept out of the logs. Every change makes a new release of the current build, rolled out without downtime (--no-restart keeps the change for the next deploy).

moor env
moor env
moor env set LOG_LEVEL=debug FEATURE_X=on
moor env set --secret STRIPE_KEY        # asks for the value
moor env set --secret DB_PASSWORD < password.txt
moor env unset FEATURE_X
moor env import .env --secret
moor env export > production.env
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor env export#

Print the variables set on the server for an environment, as a .env file. Secrets are listed as comments, without their values.

moor env export
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor env import#

Set the variables of a .env file (NAME=value lines; # comments; values may be quoted, and "export " in front of a line is allowed) in one change. Use - to read standard input.

moor env import FILE
FlagDefaultWhat it does
--all-envschange the variables of every environment of the app
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--buildmake the variables available to builds too
--env stringproductionenvironment
--no-restartkeep the change for the next deploy instead of releasing it now
--production-onlykeep previews from inheriting the variables
--secretstore the values encrypted and never show them again

moor env list#

List an app's variables

moor env list
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor env reveal#

Print a secret's value. It takes being a maintainer of the app's project, and is recorded in the audit log.

moor env reveal NAME
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor env set#

Set variables and release the change: a new release of the current build, rolled out without downtime.

A secret given as NAME alone, without a value, is read from standard input, or asked for without echoing it, so that it stays out of the shell's history.

moor env set NAME=value… | set --secret NAME
FlagDefaultWhat it does
--all-envschange the variables of every environment of the app
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--buildmake the variables available to builds too
--env stringproductionenvironment
--no-restartkeep the change for the next deploy instead of releasing it now
--production-onlykeep previews from inheriting the variables
--secretstore the values encrypted and never show them again

moor env unset#

Unset variables and release the change

moor env unset NAME…
FlagDefaultWhat it does
--all-envschange the variables of every environment of the app
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--no-restartkeep the change for the next deploy instead of releasing it now

moor environments#

An environment is a place an app runs, with its own address, variables, data and releases. Every app has production. A named environment, such as staging, stays until it is removed; a preview comes and goes with its branch.

An environment other than production is at <app>--<environment> beside the app's own address, and asks search engines not to index it.

moor environments
moor environments --app shop
moor environments create staging --branch develop
moor deploy --env staging
moor promote --from staging
moor environments delete staging
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--jsonprint as JSON

moor environments create#

Make a named environment. It starts with the variables an app has for every environment and an empty data directory, and has nothing to serve until something is deployed to it. With --branch, a push to that branch deploys to it.

moor environments create NAME
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--branch stringthe branch whose pushes deploy to it

moor environments delete#

Remove an environment, with its data, logs and releases. Production cannot be removed: delete the app for that.

moor environments delete NAME
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor events#

Show what happened on the server, oldest first: deployments, releases, instances that exited or sickened, and changes of variables (their names, never their values). Events are kept for 90 days. -f goes on showing them as they happen.

moor events
moor events
moor events --app shop -n 20
moor events -f
FlagDefaultWhat it does
--app stringonly what happened to this app
--env stringonly what happened to this environment
-f, --followgo on showing them as they happen
--jsonprint as JSON
-n, --limit int50how many to show

moor exec#

Run a command in a container that is running, as seen in moor ps, in among what it has open and has written, which a new one-off instance would not be. moor ends with the command's own exit status. What is said in it is not kept.

An app that is not in a container has nothing of its own to go into, as a process sees the same files from anywhere: moor run has them, with its variables and its user.

moor exec INSTANCE [flags] -- COMMAND [ARG...]
moor exec ins_01J… -it -- /bin/sh
moor exec ins_01J… -- ps aux
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
-i, --interactivesend what is typed, or standard input, to it
--timeout stringhow long it may take, such as 10m (default 1h)
-t, --ttygive it a terminal

moor files#

An environment's data directory is where its app keeps what it means to keep, and each environment has its own. This lists a directory within it, from the top if you do not say which. A link that leads out of it is not followed, and neither is anything else an app might leave there to mislead the server.

moor files [PATH]
moor files
moor files uploads --env staging
moor files get backups/nightly.sql
moor files put seed.sql
moor files rm old.log
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint JSON

moor files get#

Copy a file out of a data directory, to the name it has here, or to DESTINATION. - is standard output.

moor files get PATH [DESTINATION]
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor files mkdir#

Make a directory in a data directory

moor files mkdir PATH
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor files put#

Copy a file into a data directory, at the top with the name it has unless PATH says where. It appears all at once, belongs to the app, and stops at something already there unless --replace says otherwise. Up to 1 GB. The directory has to be there: moor files mkdir.

moor files put FILE [PATH]
moor files put seed.sql
moor files put build/index.bin indexes/current.bin --replace
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--replacetake the place of what is already there

moor files rm#

Remove a file, a link or an empty directory from a data directory, or with -r a directory and all that is in it. There is no way back but a backup.

moor files rm PATH
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
-r, --recursivea directory and all that is in it

moor forge#

Connect an app to a repository on a forge. A push to its default branch deploys to production, a push to a branch that an environment names deploys to that environment, and each pull request gets a preview of its own, which reports back to the pull request if the server has a token to do it with.

A pull request from a fork, or from someone the forge does not say may push there, is not built until someone approves that commit: building it would run their code here.

moor forge
moor forge connect https://github.com/acme/shop.git --token-stdin
moor forge pulls
moor forge approve 42 1f3a9c07
moor forge sync
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--jsonprint JSON

moor forge approve#

Have a pull request built, at the commit that you looked at, as moor forge pulls shows it. Building it runs its code on this server, and its preview has the app's preview variables, so look at it first. This is for that one commit: if it has moved on, nothing is built, and another commit needs approving too. It also builds again one that failed.

moor forge approve NUMBER COMMIT
moor forge approve 42 1f3a9c07
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor forge connect#

Connect an app to a repository, by its https address. It answers with an address and a secret for the forge's webhook settings: the secret is shown this once.

A token reads a private repository, and sets the checks and comments on pull requests. Give it on standard input, or be asked for it, so that it stays out of your history. A server that a forge cannot reach can look for itself, every minute, with --poll: it then sees branches, and no pull requests.

Connecting deploys nothing. The next push does, or: moor forge sync

moor forge connect URL
moor forge connect https://github.com/acme/shop.git --token-stdin < token
moor forge connect https://git.example.com/acme/shop.git --kind gitea
moor forge connect https://github.com/acme/shop.git --poll
FlagDefaultWhat it does
--api-url stringwhere the forge's API is, if not where it usually is
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--branch stringits production branch (default: what the repository says)
--kind stringgithub, gitlab, gitea or generic (github.com and gitlab.com need not say)
--no-previewsleave pull requests alone
--polllook every minute, for a server that the forge cannot reach
--token-stdinread a token from standard input, or ask for it

moor forge disconnect#

Let go of a repository, its secret and its token. What it deployed stays, previews too.

moor forge disconnect
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor forge pulls#

List pull requests and their previews

moor forge pulls
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--jsonprint JSON

moor forge sync#

Have the server look at the repository now, and deploy what has changed. This is how what is there already gets its first deployment, and how one that failed gets another try.

moor forge sync
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor git#

Push to an app's repository on the server to deploy it: the production branch (main, unless the first push named another) deploys to production.

  moor git remote            add the "moorage" remote to this repository
  git push moorage main      deploy; the build is shown as it happens

moor git remote#

Add a git remote for the app to the repository in the current directory, so that git push deploys it. The remote uses SSH, with a key registered with moor keys add; with --http, it uses HTTPS and the API token, which moor git credential gives git.

The app is --app, $MOOR_APP, [app].name in moorage.toml, or the directory's name. It need not exist yet: the first push creates it.

moor git remote
moor git remote
moor git remote --http
git push moorage main
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP, [app].name in moorage.toml, or the directory's name)
--httppush over HTTPS with the API token instead of SSH
--name stringmooragethe remote's name

moor keys#

List the SSH public keys that may push to the apps' repositories over SSH. Register yours with 'moor keys add', remove one with 'moor keys remove'.

moor keys
FlagDefaultWhat it does
--jsonprint as JSON

moor keys add#

Register an SSH public key, so that git pushes over SSH signed with it are accepted. FILE is a .pub file, or - for standard input; without it, the first of ~/.ssh/id_ed25519.pub, id_ecdsa.pub and id_rsa.pub. The key is named after its comment unless --name says otherwise.

moor keys add [FILE]
moor keys add
moor keys add ~/.ssh/work.pub --name work-laptop
FlagDefaultWhat it does
--name stringthe key's name (default: its comment)

moor keys remove#

Remove an SSH key

moor keys remove NAME|FINGERPRINT

moor lock#

Stop deployments to an environment until it is unlocked, as after a rollback, while what went wrong is looked into. Rollbacks and changes of variables go on working.

moor lock
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor login#

Sign in to a server, and save it as a context for later commands. moor login opens the server's approval page in your browser, and receives a token when you approve it; no password is typed into the terminal.

On a machine without a browser, open the address it prints on any other machine, or pass an API token on standard input with --with-token.

URL is the server's console, such as https://moorage.apps.example.com. It defaults to $MOOR_SERVER, the current context's server, or the server on this machine.

moor login [URL]
moor login https://moorage.apps.example.com
moor login https://moorage.apps.example.com --no-browser
moor login https://moorage.apps.example.com --with-token < token.txt
FlagDefaultWhat it does
--name stringthe context's name (default: the server's hostname)
--no-browserprint the approval page's address without opening a browser
--with-tokenread an API token from standard input instead of opening a browser

moor logout#

Sign out of the current server, revoking the token

moor logout

moor logs#

Show the output of an app's instances, merged by time. Lines marked with * are notes from Moorage (starts, exits, restarts); lines marked with ! came from standard error.

--source chooses what to show, from stdout, stderr, moorage, build, access and events; the first three unless asked.

--service shows the newest of what a service has said instead, which its engine keeps, so that it has only --tail.

moor logs
moor logs --app api
moor logs -f --app api --process worker
moor logs --app api --source stderr,build --since 1h --grep timeout
moor logs --app api --problems --since 24h
moor logs --app api --service db --tail 500
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
-f, --followkeep showing new lines
--grep stringshow the lines with this text, whatever its case
--instance stringshow one instance only: its number or its ID
--jsonprint each line as JSON
--problemsshow the lines that report a problem: errors, warnings, standard error, failed requests
--process stringshow one process only, such as web
--service stringshow what this service has said instead
--since stringshow lines since then: how long ago (15m, 2h, 7d) or a moment
--source stringsources to show, separated by commas: stdout, stderr, moorage, build, access, events
-n, --tail int100lines to show from the end
--until stringshow lines until then

moor manifest#

moorage.toml tells Moorage how to build and run an app. These commands check it, show what Moorage will do with an app, and print the manifest's JSON Schema for editors.

moor manifest explain#

Show the plan Moorage makes for the app in DIR (default: the current directory) from its moorage.toml and its files: the runtime, the toolchains, the build commands, the processes and their environment. The server makes the same plan when it builds the app; toolchain versions are resolved then.

moor manifest explain [DIR]
FlagDefaultWhat it does
--jsonprint the plan as JSON
--os stringthis systemoperating system of the server (linux, darwin or windows)

moor manifest schema#

Print the JSON Schema of moorage.toml, for editors that validate and complete TOML files (for example with a "#:schema ./moorage.schema.json" comment at the top of the manifest).

moor manifest schema

moor manifest validate#

Check the moorage.toml in DIR (default: the current directory): its syntax, keys and values. Warnings point at values that look like credentials and at settings this version accepts but does not act on yet.

moor manifest validate [DIR]

moor mcp#

Serve coding agents over the Model Context Protocol, on standard input and output. A client runs this for itself: moor mcp setup says how, and makes the token it needs.

It reads apps, deployments, releases and logs. With --allow-deploy, it can also deploy, roll back and restart. Nothing here runs commands, reads secrets or deletes anything. check_manifest and deploy read files below the directory it started in, or --root, and only if that is not your home directory or above it.

Its token is what limits it, so it refuses one that can do everything, and does not fall back on what moor login stored. It takes the context named agent, or another by --context, or $MOOR_SERVER and $MOOR_TOKEN. Logs are written by the app and whoever can reach it, and an agent should not be trusted further for having read them.

moor mcp
moor mcp setup --client claude-code --app shop
moor mcp --allow-deploy --app shop
FlagDefaultWhat it does
--allow-deployoffer deploying, rolling back and restarting; the token has to allow them too
--app stringthe app to use when a tool is not told
--context stringagentthe context to use, from moor mcp setup
--root stringthe directory that local files are read from, and only below it; where this started if left out

moor mcp setup#

Make a narrow, expiring token for a coding agent, keep it in a context of its own, and tell its client how to run moor mcp. The token stays in moor's own file, which only you can read, and goes in no client's configuration or repository.

By default the token can only read. With --deploy it can also deploy, roll back and restart, in previews that take nothing of production's, whose names start with agent-, and it can reach nothing else: --envs all lets it reach every environment, production included.

Running this again replaces the token. With --client, it runs that client's own command where it has one, or says what to put where. Without, it lists them all.

The clients are: antigravity, claude-code, claude-desktop, cline, codex, cursor, devin, gemini, goose, jetbrains, junie, kiro, vscode, zed.

Code an agent deploys runs on your server. On Linux, an app's environments share a user, so a preview's code can read production's data. To keep what an agent makes from production altogether, give it an app of its own with --app.

moor mcp setup
moor mcp setup --client claude-code --app shop
moor mcp setup --client codex --app shop-dev --deploy
FlagDefaultWhat it does
--app stringlimit the token to one app
--client stringthe client to set up
--context stringagentthe context to keep it in
--deploylet it deploy, roll back and restart
--envs stringpreviews or all; with --deploy, previews unless told otherwise
--expires string90dhow long the token lasts
--printsay what to do, and run nothing of the client's
--root stringthe directory that moor mcp reads local files from; where the client starts it if left out

moor metrics#

Show an environment's requests, response times, CPU and memory, as a line of text for each, with its latest value. --range is live, 1h, 24h, 7d or 30d. The console's Metrics tab has the same as charts.

moor metrics
moor metrics
moor metrics --range 24h --series latency
moor metrics --env staging --json
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON
--range string1hlive, 1h, 24h, 7d or 30d
--series stringonly requests, latency, cpu or memory

moor notifications#

Show what you have been told: of failed deployments, apps that keep crashing and cron jobs that fail in the projects you maintain, and of your own deployments that fail. Channels and rules send the same to webhooks, chat and email.

moor notifications
moor notifications
moor notifications --read
moor notifications channels add alerts --kind slack
moor notifications rules add --channel alerts --project web
FlagDefaultWhat it does
--jsonprint as JSON
--readmark all you have been told as read

moor notifications channels#

List where notifications can go. Adding, testing and removing channels takes an admin, who also sees where each one goes.

moor notifications channels
FlagDefaultWhat it does
--jsonprint as JSON

moor notifications channels add#

Add somewhere notifications can go. A webhook, slack, teams or discord channel asks for its address, which is a secret, unless --url gives it, and also reads it from standard input. Email asks for the mail server's password if --username gives one to sign in with. A webhook's signing secret is shown once, here. All of it is sealed with the server's master key.

moor notifications channels add NAME
moor notifications channels add alerts --kind slack
moor notifications channels add ops --kind webhook --url https://example.com/hook
moor notifications channels add mail --kind email --host smtp.example.com --from moorage@example.com --to ops@example.com
FlagDefaultWhat it does
--from stringthe address mail comes from
--host stringthe mail server
--kind stringwebhookwebhook, slack, teams, discord or email
--port intthe mail server's port (587 if not given; 465 means TLS from the start)
--to stringsthe addresses mail goes to
--url stringthe webhook's address
--username stringwhom to sign in to the mail server as

moor notifications channels remove#

Remove a channel, and the rules that use it

moor notifications channels remove NAME

moor notifications channels test#

Send a channel a test, and say how it went

moor notifications channels test NAME

moor notifications rules#

List which events go to which channel, of what you can see. A rule of the whole server takes an admin, and one of a project or an app takes a maintainer of it.

moor notifications rules
FlagDefaultWhat it does
--jsonprint as JSON

moor notifications rules add#

Send events to a channel: of an app, or a project, or the whole server if neither is given. Without --events it asks for failures: deployment.failed, instance.crashloop, cron.failed, server.disk_low, backup.failed, server.certificate_failed and server.engine_down. It can also ask for instance.unhealthy and deployment.live, or for * to have them all. A channel that is told something went wrong is also told when it has come right.

moor notifications rules add
moor notifications rules add --channel alerts
moor notifications rules add --channel alerts --project web
moor notifications rules add --channel ops --app shop --events deployment.failed,deployment.live
FlagDefaultWhat it does
--app stringonly for this app
--channel stringthe channel it goes to
--events stringswhat it asks for
--project stringonly for this project

moor notifications rules remove#

Remove a rule

moor notifications rules remove ID

moor password#

Change your password. It asks for the current one and a new one, without showing them, or reads both from standard input, one on each line. Your other sessions end; API tokens and SSH keys go on working.

moor password

moor previews#

Pushing a branch makes a preview of it: its own build, at its own address, with the variables of production (except those marked --production-only) and an empty data directory. Deleting the branch destroys it, and so does going unused for the time [previews].ttl says, seven days unless told otherwise, unless it is pinned. An app may have ten at a time.

moor previews
moor previews
moor previews create feature/new-pricing --app shop
moor previews pin feature-new-pricing --app shop
moor previews destroy feature-new-pricing --app shop
FlagDefaultWhat it does
--app stringonly the previews of this app
--jsonprint as JSON

moor previews create#

Make a preview of a branch that was pushed

moor previews create BRANCH
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--detachqueue the deployment and return

moor previews destroy#

Destroy a preview, with its data, logs and releases. Its branch stays, and a new push to it makes another.

moor previews destroy NAME
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor previews pin#

Keep a preview from expiring

moor previews pin NAME
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor previews unpin#

Let a preview expire again

moor previews unpin NAME
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)

moor projects#

Apps belong to projects, whose members have roles: viewers see an app and its logs, deployers also deploy, restart, roll back and scale it, and maintainers also change its variables, its members and its fate. Administrators of the server can do everything everywhere.

Every app starts in the default project, which everyone is a maintainer of until that is changed.

moor projects
FlagDefaultWhat it does
--jsonprint as JSON

moor projects add-member#

Give someone a role in a project

moor projects add-member NAME EMAIL
FlagDefaultWhat it does
--role stringdeployerviewer, deployer or maintainer

moor projects create#

Create a project

moor projects create NAME

moor projects delete#

Delete a project that has no apps

moor projects delete NAME

moor projects remove-member#

Take someone out of a project

moor projects remove-member NAME EMAIL

moor projects set#

Change who may do what in a project without being a member

moor projects set NAME
FlagDefaultWhat it does
--everyone stringthe role of those who are not members: viewer, deployer, maintainer or none
--viewers-see-logstruewhether viewers may read logs

moor projects show#

Show a project, its apps and its members

moor projects show NAME

moor promote#

Release the build one environment runs to another, without building it again, with the variables of the environment it goes to. What was tried is what runs.

moor promote --from ENVIRONMENT
moor promote --from staging
moor promote --from feature-new-pricing --to staging --app shop
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--from stringthe environment whose build to release
--to stringproductionthe environment to release it to

moor ps#

List an app's running instances

moor ps
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor redeploy#

Build what the current release was built from again, and roll it out: the same commit, the same upload or the same image name. Use it when a toolchain has moved, an image's tag points elsewhere, or a build variable has changed.

A release that was uploaded ready to run has nothing to build.

moor redeploy
moor redeploy --app docs
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--detachqueue the deployment and return
--env stringproductionenvironment

moor registry#

List the container registries the server has credentials for. It uses them to pull images and to build from private base images. Managing them takes an admin.

moor registry
FlagDefaultWhat it does
--jsonprint as JSON

moor registry login#

Store a container registry's credentials on the server, encrypted with its master key. The password is asked for, or read from standard input. Nothing checks it now: the next pull does.

moor registry login HOST
moor registry login ghcr.io --username acme-deploy
moor registry login registry.example.com:5000 --username ci < password.txt
FlagDefaultWhat it does
--username stringthe user to sign in as

moor registry logout#

Remove a container registry's credentials from the server

moor registry logout HOST

moor releases#

List an app's releases

moor releases
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor releases diff#

Show what changed from one release to another: whether the build did, the lines of the resolved manifest, and which variables. Of variables it shows the names only.

moor releases diff vN vM
moor releases diff v3 v4 --app docs
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor releases show#

Show a release and its resolved manifest

moor releases show vN
moor releases show v3 --app docs
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor restart#

Start new instances of the current release, move traffic to them once they are healthy, and stop the old ones after their requests finish. With a process, only its instances are replaced.

moor restart [PROCESS]
moor restart
moor restart worker
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor rollback#

Publish an earlier release again, as a new release. Without a version, the release before the current one. No rebuild is needed: it takes seconds.

The new release runs with the current variables; --with-config restores the variables the earlier release ran with.

moor rollback [vN]
moor rollback --app docs
moor rollback v3 --app docs
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--with-configrestore the variables the earlier release ran with

moor run#

Run a command as a one-off instance of an environment's current release, with its variables and data directory, and show what it says. moor ends with the command's own exit status, and interrupting moor stops it. It takes an hour at the most, unless --timeout says otherwise, up to a day.

With -it, it has a terminal of its own that you are at, for a shell or anything else that asks you things. All the keys go to it, Ctrl-C too, and leaving stops it. What is said in one is not kept, since a password can be typed into it, and what it says is not kept from you either: its secrets are there to be seen. With -i and no -t, it has standard input, without a terminal.

moor run [flags] -- COMMAND [ARG...]
moor run -- python manage.py migrate
moor run --env staging --timeout 10m -- ./seed.sh
moor run --detach -- ./rebuild-index
moor run -it -- /bin/sh
moor run -i -- ./import.sh < data.csv
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--detachstart it and return
--env stringproductionenvironment
-i, --interactivesend what is typed, or standard input, to it
--timeout stringhow long it may take, such as 10m (default 1h)
-t, --ttygive it a terminal

moor scale#

Set how many instances of each named process run. New ones start beside those running; those beyond the number finish their requests and stop. If a new instance cannot start, the app goes back to how it was.

The setting stays, over the manifest's instances, for the releases to come. Without arguments, it shows how many run.

moor scale [PROCESS=N ...]
moor scale --app shop
moor scale web=3 worker=1 --app shop
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor server#

Set up and run a Moorage server

moor server backup#

Make a backup of this server, which can go on running: its database, repositories, builds, apps' data and certificates. It goes where --to says, or where the server has been told: a path, or s3://bucket/prefix, with the service's details in AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY, AWS_REGION and AWS_ENDPOINT_URL.

It leaves out the master key, without which its secrets cannot be read, so that a backup that goes astray gives them away to nobody. Keep that key safe, and apart. --include-keys puts it and the server's other keys in the backup, which then has to be kept as safe as they are: only to a path.

moor server backup
moor server backup
moor server backup --to /mnt/backups
moor server backup --to s3://acme-backups/moorage
FlagDefaultWhat it does
--config stringthe server's configuration file
--include-keysinclude the master key and the server's other keys
--to stringwhere it goes: a path, or s3://bucket/prefix

moor server backup list#

List the backups that are there

moor server backup list
FlagDefaultWhat it does
--config stringthe server's configuration file
--to stringwhere to look: a path, or s3://bucket/prefix

moor server backup verify#

Read a backup through, and say whether it could be restored: the path of its file, or s3://bucket/prefix/name. Nothing changes.

moor server backup verify SOURCE
moor server backup verify /mnt/backups/moorage-20261104T120000Z.tar.gz

moor server config#

The server's settings, as a file to keep, to review, or to bring to another server: people, projects, registries, notifications, backups and sign-in. It has no secrets in it: where one belongs, it names a variable of the environment. server.toml is apart from this, and apps come from their manifests.

moor server config export#

Write out the server's settings

moor server config export
moor server config export > moorage-config.toml
moor server config export --output moorage-config.toml
FlagDefaultWhat it does
-o, --output stringwrite to this file, and not to the standard output

moor server config import#

Import makes the server match a file from moor server config export, in what the file mentions. It adds and changes, and removes nothing. A secret written as ${NAME} is read from this command's environment, and if that is not set, the server keeps the secret it has.

moor server config import FILE
moor server config import moorage-config.toml --dry-run
MOORAGE_SSO_CLIENT_SECRET=... moor server config import moorage-config.toml
FlagDefaultWhat it does
--dry-runonly say what this would do
--jsonprint as JSON

moor server doctor#

Check a server on this machine, whether it is running or not, and say how to fix what is wrong: its listeners, DNS, certificates, the container engine, disk space, the data directory, the clock, kernel features, and apps that can be reached without the router.

--public-url also checks the whole path from outside to the server, through any TLS proxy in front of it: the headers that arrive, an app's hostname, WebSockets, streaming and large uploads. --timeouts adds a request that stays silent for over a minute. The exit status is 1 if anything failed.

moor server doctor
moor server doctor
moor server doctor --public-url https://moorage.apps.example.com --timeouts
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)
--jsonprint as JSON
--public-url stringthe server's address from outside, such as https://moorage.apps.example.com
--timeoutswith --public-url, also check that a request may stay silent for over a minute

moor server init#

Write server.toml, the bootstrap configuration of a Moorage server.

Presets:
  lan     a server on your network: apps at https://<app>.<domain> with
          certificates from Moorage's own CA (ports 80, 443 and 2222), or plain
          HTTP on 127.0.0.1:8080 behind your TLS proxy with --behind-proxy
  local   this computer only: apps at http://<app>.localhost:8080
  public  a server on the internet: apps at https://<app>.<domain> with
          certificates from a public CA (ports 80, 443 and 2222), and everything
          but production behind a sign-in

The file is written to --config, $MOORAGE_CONFIG, or a default location: system-wide when run as root (Administrator on Windows), per-user otherwise.

moor server init
moor server init --preset local
sudo moor server init --domain apps.example.com
sudo moor server init --domain apps.example.com --behind-proxy
sudo moor server init --preset public --domain apps.example.com --email ops@example.com --agree-terms
FlagDefaultWhat it does
--acme-directory stringanother ACME server's directory than the default CA's (public)
--agree-termsyou have read and accept the CA's terms, which it asks for (public)
--behind-proxyserve plain HTTP on 127.0.0.1:8080 behind a TLS-terminating proxy such as nginx (lan)
--config stringwhere to write server.toml (default: $MOORAGE_CONFIG or a per-platform location)
--console-host stringthe console's hostname (default: moorage.<domain>)
--data-dir stringdata directory (default: $MOORAGE_DATA_DIR or a per-platform location)
--domain stringbase domain; apps are served at <app>.<domain> (required for lan)
--email stringwhom the CA tells of the account (public)
--forcereplace an existing server.toml
--preset stringlanstarting point: lan or local or public
--routing stringhosthow apps are told apart: host, as <app>.<domain>, or path, as <domain>/<app>, for where there can be no wildcard DNS record

moor server install#

Install moor server run as a service — a systemd unit on Linux, a launchd job on macOS, a Windows service — that starts at boot (as root or an administrator) or at login (otherwise, on Linux and macOS), and start it.

The service is set up so that stopping or restarting it leaves the apps running: the server adopts them when it starts again. It runs this moor binary from where it is now, with the current PATH.

moor server install
sudo moor server install
moor server install --config ~/moorage/server.toml
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)
--no-startinstall the service without starting it

moor server proxy-config#

Print an nginx configuration for this server: its hostnames, the certificate, WebSockets, streaming, long requests and large uploads. Any other proxy must do the same; see the documentation. Check the result with moor server doctor --public-url.

moor server proxy-config nginx
moor server proxy-config nginx --cert /etc/nginx/tls/wildcard.crt --key /etc/nginx/tls/wildcard.key
moor server proxy-config nginx > /etc/nginx/conf.d/moorage.conf
FlagDefaultWhat it does
--cert stringthe proxy's certificate, for the console's and the apps' hostnames
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)
--http-port int80the port nginx redirects to HTTPS from
--https-port int443the port nginx serves HTTPS on
--key stringits private key

moor server resolver#

Show whether this machine resolves <app>.localhost, the addresses of a server on your own computer. Chromium- and Firefox-based browsers manage that on their own, as does systemd-resolved on Linux, and some versions of macOS. Where macOS does not, for Safari and command-line tools, moor server resolver install adds a rule for it, pointing at a small DNS responder of the server's, which answers only on loopback and only for that domain. On Windows, it adds a block to the hosts file, which has the names of the apps that are deployed now.

moor server resolver
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)

moor server resolver install#

Make this machine resolve <app>.localhost for every program. On macOS, that adds a rule to /etc/resolver, for which it uses sudo, and turns on the server's DNS responder (listen.dns in server.toml), which the server needs restarting to take up. On Windows, it adds a block to the hosts file, for which it takes an elevated terminal, with the names of what is deployed now: a server that may write to that file keeps it up to date, and otherwise, run this again after adding an app.

moor server resolver install
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)

moor server resolver remove#

Undo moor server resolver install

moor server resolver remove
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)

moor server restart#

Restart the server's service (the apps keep running)

moor server restart
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)

moor server restore#

Restore a backup: the path of its file, or s3://bucket/prefix/name. The server has to be stopped. It reads all of the backup first, so that a damaged one changes nothing, and then stops any apps still running, and moves what the data directory held aside rather than deleting it.

A backup without keys needs the master key it was made with to be in place first.

moor server restore SOURCE
moor server restore /mnt/backups/moorage-20261104T120000Z.tar.gz
moor server restore s3://acme-backups/moorage/moorage-20261104T120000Z.tar.gz --force
FlagDefaultWhat it does
--config stringthe server's configuration file
--forcemove aside what the data directory holds, and restore over it

moor server run#

Run the Moorage server in the foreground until interrupted.

The configuration is read from --config, $MOORAGE_CONFIG, or the default location used by 'moor server init'.

moor server run
FlagDefaultWhat it does
--config stringserver.toml to read (default: $MOORAGE_CONFIG or a per-platform location)
--devread the console's templates and assets from the source tree, for working on them
--log-format stringtext or json (overrides server.toml)
--log-level stringdebug, info, warn or error (overrides server.toml)

moor server sso#

Say how people sign in through an OpenID Connect provider, which is set up in the console, in Settings → Sign-in.

moor server sso

moor server sso off#

Turn off signing in through a provider, which gives passwords back: the way in if your provider has gone away. On the server's own machine this needs no sign-in, and those who signed in only through the provider need a new link for a password, from an administrator.

moor server sso off

moor server start#

Start the server's service

moor server start
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)

moor server status#

Show whether the server's service runs and answers

moor server status
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)

moor server stop#

Stop the server: its service, or one started with moor server run. The apps and services keep running, and the server adopts them when it starts again; --all stops them too, whether or not a server is running. Services keep what they hold.

moor server stop
FlagDefaultWhat it does
--allstop the apps and services too
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)

moor server telemetry#

Send what apps say to syslog, an OpenTelemetry collector or any HTTP endpoint, and what they do to an OpenTelemetry collector. What is kept here stays, and a sink that is down costs nothing but its own place in the queue, of 20,000 lines: past that, the oldest go, and it says how many did.

moor server telemetry
moor server telemetry add central --kind syslog --address tls://logs.example.com:6514
moor server telemetry add collector --kind otlp --address https://otel.example.com:4318 --logs --metrics --header "Authorization: Bearer abc"
moor server telemetry test central
moor server telemetry rm central
FlagDefaultWhat it does
--jsonprint JSON

moor server telemetry add#

Add somewhere to send what apps say and do, or change the one of that name. Logs go unless it is given --metrics alone.

An address is udp://host:514, tcp://host:601 or tls://host:6514 for syslog. For OTLP it is what comes before /v1/logs, as in https://otel.example.com:4318. For HTTP, it is where JSON batches are sent.

--header is sent with each request, sealed here and not shown again, and is left as it is if you leave it out, unless the address changes. To be sent in the clear across the internet is not for a header, so it takes an https address, or something on the local network.

moor server telemetry add NAME
moor server telemetry add central --kind syslog --address tls://logs.example.com:6514 --app shop
moor server telemetry add collector --kind otlp --address https://otel.example.com:4318 --metrics --logs
FlagDefaultWhat it does
--address stringwhere it is
--app stringonly this app (default: all of them)
--header stringArraya header to send, as Name: value (more than one can be given)
--kind stringsyslog, otlp or http
--logssend what apps say (the default, unless --metrics is on its own)
--metricssend what they do, to an OTLP collector

moor server telemetry rm#

Stop sending to a sink

moor server telemetry rm NAME

moor server telemetry test#

Send something to a sink now, and say how that went

moor server telemetry test NAME

moor server uninstall#

Stop the server, remove its service, and stop the apps and the services they use (unless --keep-apps). The configuration, the data directory and the volumes of services are left in place: installing the service again brings the server, and its apps, back.

moor server uninstall
FlagDefaultWhat it does
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)
--keep-appsleave the apps and services running

moor server upgrade#

Upgrade downloads a release, checks it against its published checksum, keeps a copy of the database and the binary, puts the new binary in place and restarts the server. Apps keep running. If the server does not come up on the new version, everything goes back by itself.

With --rollback it goes back later on. The database only goes back if the new version changed it, since what has happened since is then lost from it.

moor server upgrade
moor server upgrade --check
sudo moor server upgrade
sudo moor server upgrade --version 0.6.1
sudo moor server upgrade --from /mnt/releases/0.6.1
sudo moor server upgrade --rollback
FlagDefaultWhat it does
--checkonly say whether there is a newer version
--config stringserver.toml (default: $MOORAGE_CONFIG or the per-platform location)
--forcewith --rollback, go back even if that loses what has happened since
--from stringa directory or address holding the release's files, for a mirror or a machine with no way out
--rollbackgo back to the version before the last upgrade
--version stringthe version to upgrade to (default: the newest)
--wait duration2m0show long the new version has to come up before going back

moor server users#

List the server's users. An admin manages users; until projects arrive, every user may do everything with apps.

moor server users
FlagDefaultWhat it does
--jsonprint as JSON

moor server users create#

Create a user, and print a link for them to choose a password

moor server users create EMAIL
moor server users create ada@example.com --name "Ada Lovelace"
moor server users create ops@example.com --admin
FlagDefaultWhat it does
--adminmake them an admin
--name stringtheir name (default: the first part of the address)

moor server users disable#

Disable a user: their sessions end, and their tokens and keys stop working

moor server users disable EMAIL

moor server users enable#

Enable a disabled user again

moor server users enable EMAIL

moor server users invite#

Print a new one-time link for a user to choose a password: for one who has forgotten theirs, or whose first link has expired. It replaces any earlier link, and using it ends their sessions.

moor server users invite EMAIL

moor server users role#

Change a user's role

moor server users role EMAIL admin|member

moor services#

A service is a database that an app declares under [services] in moorage.toml, and Moorage runs and connects for it. Each environment has its own, with a password of its own, and the app is given its address as it starts. It needs a container engine, and nothing else here does.

A service that a manifest no longer names stays, with what it holds, until you remove it. Deleting an environment removes its services.

moor services
moor services --app shop
moor services logs db --env staging
moor services update db
moor services upgrade db --to 19
moor services remove db --env my-branch --yes
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionthe environment
--jsonprint as JSON

moor services logs#

Read the newest of what a service has said

moor services logs NAME
moor services logs db --tail 500
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionthe environment
--tail int100how many lines, up to 5,000

moor services remove#

Remove a service, with what it holds, which cannot be undone. If the manifest still names it, the next deployment makes a new one, which starts empty.

moor services remove NAME
moor services remove db --env my-branch --yes
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionthe environment
--yessay that you mean it

moor services restore#

Put a service back to its latest dump, which a backup makes, losing what it has been given since. The app stops for that, and starts again however it goes. After a restore of a server to a new machine, this happens by itself. On the machine that it ran on, a service keeps what it holds, which may be newer than the backup, and this is how to go back. A dump that will not load changes nothing. PostgreSQL's old volume stays until you say what to do with it, with moor services upgrade NAME --finish --yes or --back --yes.

moor services restore NAME
moor services restore db --yes
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionthe environment
--yessay that you mean it

moor services update#

Take the newest image of a service's version, such as PostgreSQL 18.7 where it ran 18.6, and restart it. What it holds stays. This does not happen by itself: an image is recorded when a service is made, and an update is something that you ask for.

moor services update NAME
moor services update db
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionthe environment

moor services upgrade#

Move a PostgreSQL service to a newer major version: a dump with the newer version's tools, a new volume, a restore and a check that it holds what it did. The app is stopped for that, as what it wrote after the dump would be lost, and is started again however it goes. Anything going wrong leaves the old one as it was. Say the new version in the manifest too, if it names one.

The old volume stays until you say what to do with it, as it does after moor services restore: --finish lets go of it, and --back goes back to it, losing what the service has held since. After --back, the manifest has to say the older version again, if it names one, and a dump made since by the newer version cannot be loaded.

moor services upgrade NAME
moor services upgrade db --to 19
moor services upgrade db --finish --yes
moor services upgrade db --back --yes
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--backgo back to what it held before its last upgrade or restore
--env stringproductionthe environment
--finishlet go of what it held before its last upgrade or restore
--image stringthe image that holds it, for a service that does not run the official one
--to stringthe major version to move to
--yeswith --finish or --back, say that you mean it

moor share#

Make a link that lets someone reach an environment, whatever its gate, without an account or a password. It is shown only now. It lasts seven days unless you say otherwise, up to a year, and can be revoked.

A link with --max-uses asks for a click, so that what fetches addresses to preview them does not use it up.

moor share
moor share --expires 3d --env staging
moor share --max-uses 1
moor share list
moor share revoke shr_01J…
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--expires stringhow long it lasts, such as 3d or 12h (default 7d)
--max-uses inthow many times it can be used (default: no limit)

moor share list#

List an environment's share links

moor share list
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment
--jsonprint as JSON

moor share revoke#

End a share link, and within a minute everyone it let in

moor share revoke ID
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor sleep#

Stop an environment's instances, except processes with sleep = false, until a request wakes it. A preview does this by itself after 30 minutes with no requests, and any environment can with sleep_after in [environments.NAME].

moor sleep
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor tokens#

List your API tokens: for scripts and CI, and for git over HTTPS. Create one with 'moor tokens create NAME', revoke one with 'moor tokens revoke NAME'.

moor tokens
FlagDefaultWhat it does
--jsonprint as JSON

moor tokens create#

Create an API token. Its scope is what it may do, up to what you may do:

  read    see apps, deployments, releases and logs; fetch their repositories
  deploy  also deploy, restart, roll back, push, and see variables
  admin   also change variables, and manage your tokens and keys
  gate    only get through the sign-in gates of apps, as you

--app restricts it to one app, and --expires makes it stop working after a time, such as 90d.

--envs previews limits a read or deploy token to previews that take nothing of production's. It makes one by deploying to a name that starts with agent-, and can reach nothing else: not production, other previews or the repository.

moor tokens create NAME
moor tokens create ci --scope deploy --app shop --expires 90d
FlagDefaultWhat it does
--app stringrestrict it to one app
--envs stringpreviews, to limit it to previews
--expires stringstop working after this long, such as 90d
--scope strings[deploy]what it may do: read, deploy, admin, or gate to get through sign-in gates

moor tokens revoke#

Revoke an API token

moor tokens revoke NAME

moor trust#

Trust the certificate authority of a server on this machine, so that browsers and command-line tools accept the certificates it issues. The CA goes into the operating system's list and, on Linux, into the browsers' own lists.

A CA is powerful: whoever holds its key can pretend to be any site it may sign for. Moorage's own CA may sign only for the server's domain, and moor trust says what the one it finds may sign for. It comes from the server's own files on the server's machine, and otherwise from the server, over a connection nothing can vouch for yet: compare its fingerprint with what moor server status shows on the server. --fingerprint does that without asking.

On macOS and Windows, moor trust changes your own list, and asks you to confirm; as root or an Administrator, the machine's. On Linux it uses sudo.

moor trust
moor trust
moor trust --server https://moorage.apps.example.com
moor trust --server https://moorage.apps.example.com --fingerprint AB:CD:…
moor trust --file corporate-root.pem
moor trust --print > moorage-ca.crt
moor trust --remove
FlagDefaultWhat it does
--file stringtrust this PEM file, instead of asking a server
--fingerprint stringthe SHA-256 fingerprint the CA must have; asks nothing if it does
--printprint the CA certificate, and change nothing
--removestop trusting the CA

moor unlock#

Let an environment take deployments again.

moor unlock
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor version#

Print the version of moor

moor version
FlagDefaultWhat it does
--jsonprint as JSON

moor wake#

Start an environment that is asleep, and return when it is ready.

moor wake
FlagDefaultWhat it does
--app stringapp (default: $MOOR_APP or [app].name in moorage.toml)
--env stringproductionenvironment

moor whoami#

Show who you are signed in as, and on which server

moor whoami
FlagDefaultWhat it does
--jsonprint as JSON

Suggest a change to this page