apps

Add an app to a computer

Body: { name, command, cwd?, port?, restart?, run_as?, enabled?, env?, secret_env? }. name: 1-32 lowercase letters, digits and hyphens, unique on the computer. command runs with bash in cwd (default the user’s home), after /root/.env and the app’s variables are loaded; values are used as typed. restart: always (default), on-failure (started again after a non-zero exit; an exit in its first 3 seconds counts as a failed start and is retried) or no (once per boot). run_as: root by default. port: what the app listens on, unique on the computer; the computer’s own ports (22, 3389, 5900-5999, 6080-6099, 8080, 9000) are refused. secret_env values are stored encrypted and never returned (only their names, in secret_env_keys). Applied at once when the computer is running (apply.state "applied"); otherwise saved and applied when it next runs ("pending"). Never wakes the computer. At most 20 apps a computer.

post/api/computers/{id}/services

Request

  • Base URL
    https://www.orgo.ai
  • Auth
    HTTP bearer

Path parameters

idstring required

Computer id.

Request body

namestring required
commandstring required
cwdstring nullable

An absolute path. Default: the user’s home.

portinteger nullable
restart'always' | 'on-failure' | 'no'
run_asstring
enabledboolean
envobject
secret_envobject

Response

Added.

idstring uuid required
namestring required
kind'command' | 'deploy' required

deploy: the app of a deploy, changed from the deploy.

deploy_project_idstring uuid nullable
commandstring required
cwdstring nullable
envobject required
secret_env_keysstring[] required

Names of the secret variables. Their values are never returned.

portinteger nullable
restart'always' | 'on-failure' | 'no' required
run_asstring required
enabledboolean required
status'running' | 'starting' | 'crashing' | 'stopped' | 'exited' | 'failed' | 'pending' | 'off' | 'unknown' required

pending: saved, not on the computer yet. crashing: it keeps exiting soon after it starts. failed: it could not be started.

status_detailstring nullable

The process manager’s own words, e.g. "pid 812, uptime 2:14:09".

status_atstring date-time nullable
listeningboolean nullable

Something listens on port (null: no port, or the computer was not asked).

listening_publiclyboolean nullable

It listens beyond 127.0.0.1, so a public URL reaches it.

appliedboolean required

The computer has this version of the app.

errorstring nullable
public_urlstring nullable

The public URL on this port, where public URLs are on.

created_atstring date-time
updated_atstring date-time

Changes