Skip to content

Installer options

This page is the full reference for install.sh. For a guided walkthrough, see One-click install.

  • Every option can be given as a command-line flag, and most also as an environment variable. Flags override environment variables.
  • The two Cloudflare tokens are the exception: they are accepted only as environment variables (or the hidden interactive prompt). Passing them as flags is refused with E_CLI.
  • Unknown options fail with E_CLI (unknown option). Positional arguments are rejected.
  • Boolean environment variables must be exactly 0 or 1; anything else fails with E_BOOL.
  • Because the installer runs as root, use sudo -E so your exported variables survive.

Usage:

install.sh --release-tag vX.Y.Z --base-domain example.com --acme-email admin@example.com [options]

In non-interactive mode all of these must be supplied. In interactive mode, missing values are prompted for. A missing required input in non-interactive mode fails with E_INPUT_REQUIRED (exit 66).

Flag Environment variable Type Default Description
--release-tag TAG (alias --openflare-version) OPENFLARE_VERSION string none The release to install, vMAJOR.MINOR.PATCH with an optional pre-release suffix, at most 128 characters. It must equal the tag the install.sh asset was built for.
--base-domain DOMAIN OPENFLARE_BASE_DOMAIN hostname none Your base domain, for example example.com. Must be a fully qualified, lowercase name (not localhost).
--acme-email EMAIL OPENFLARE_ACME_EMAIL email none Contact address for certificate registration. The interactive prompt suggests admin@<base-domain>.
none OPENFLARE_CLOUDFLARE_ZONE_API_TOKEN secret none Cloudflare token with Zone Read. Environment or hidden prompt only.
none OPENFLARE_CLOUDFLARE_DNS_API_TOKEN secret none Cloudflare token with DNS Edit. Environment or hidden prompt only.

Both Cloudflare tokens must be 20 to 160 characters from A-Z a-z 0-9 _ -. They are stored as 0600 files under <config-root>/secrets/. See DNS and Cloudflare for how to create them.

Flag Environment variable Type Default Description
--worker-base-domain DOMAIN OPENFLARE_WORKER_BASE_DOMAIN hostname the base domain Zone under which worker hostnames live. Workers get <name>.<worker-base-domain>, covered by one wildcard certificate.
--console-host HOST OPENFLARE_CONSOLE_HOST hostname console.<base-domain> Public hostname of the console. Must not equal the base domain apex or the worker base domain.
--api-host HOST OPENFLARE_API_HOST hostname none (no API route) Public hostname for the plane’s /api/internal/ path, used by remote cells. When unset, no API route exists at all.
--no-api-host none flag n/a Explicitly clears the API host, including one loaded from an existing env file.
--public-ipv4 IP OPENFLARE_PUBLIC_IPV4 IPv4 address auto-detected Overrides public IP detection. Must still be a public address that the host owns locally.

Hostname rules enforced by validation:

  • Console, API and webhook hostnames must all be different from one another and must not be the apex or the worker base domain.
  • A console, API or webhook name that sits one label under the worker base domain (for example console.example.com under example.com) is automatically added to the reserved worker labels so that no worker can take it.
  • Names two or more labels deep under the worker base domain are rejected with E_HOST_CONFLICT.
Flag Environment variable Type Default Description
--install-dir PATH OPENFLARE_INSTALL_DIR absolute path /opt/openflare Where the release checkout is placed.
--config-root PATH OPENFLARE_CONFIG_ROOT absolute path /var/lib/openflare Root of generated configuration and secrets. Must be outside the checkout.
--env-file PATH OPENFLARE_ENV_FILE absolute path <config-root>/.env The Compose env file. Must be inside the config root.
--traefik-static-config PATH OPENFLARE_TRAEFIK_STATIC_CONFIG absolute path <config-root>/config/traefik.yml Where the rendered Traefik static configuration is written.
--traefik-dynamic-dir PATH OPENFLARE_TRAEFIK_DYNAMIC_DIR absolute path <config-root>/config/traefik-dynamic Where the rendered Traefik routes are written.

The install directory, config root and env file must not be / and must not be symbolic links.

Flag Environment variable Type Default Description
--create-dns, --create-dns-records OPENFLARE_CREATE_DNS_RECORDS=1 boolean 0 Let the installer create the wildcard A record in Cloudflare when it is missing or wrong. It asks you to type yes first. It does not modify the exact console, API or webhook records.
--no-create-dns-records OPENFLARE_CREATE_DNS_RECORDS=0 boolean n/a Turn record creation off.
--skip-dns-check OPENFLARE_SKIP_DNS_CHECK boolean 0 Skip the DNS record check. The final summary then contains DNS_CHECK_SKIPPED.
--yes, --assume-yes OPENFLARE_INSTALLER_ASSUME_YES boolean 0 Answer confirmation prompts with yes. In non-interactive mode, --create-dns requires --yes, otherwise the run fails with E_DNS_CONFIRMATION.

DNS requirements and the meaning of the record checks are in DNS and Cloudflare.

Flag Environment variable Type Default Description
--enable-updater OPENFLARE_ENABLE_UPDATER=1 boolean 0 Enables the update Compose profile (the in-console updater). Mounts the Docker socket into the updater container.
--disable-updater OPENFLARE_ENABLE_UPDATER=0 boolean n/a Turns the updater off.
--enable-git-deploy OPENFLARE_ENABLE_GIT_DEPLOY=1 boolean 0 Enables the gitdeploy profile (GitHub push deploy). Requires the three GitHub inputs below.
--disable-git-deploy OPENFLARE_ENABLE_GIT_DEPLOY=0 boolean n/a Turns push deploy off.

The installer translates these into the COMPOSE_PROFILES value in the env file: always tls, plus update and gitdeploy when enabled.

These apply only with --enable-git-deploy. The GitHub App setup is described in Git push deploy.

Flag Environment variable Type Default Description
--github-webhook-host HOST OPENFLARE_GITHUB_WEBHOOK_HOST hostname hooks.<base-domain> Public hostname that receives GitHub webhooks.
--github-app-id ID OPENFLARE_GITHUB_APP_ID number none Numeric GitHub App ID. Required with push deploy.
--github-app-private-key-path PATH OPENFLARE_GITHUB_APP_PRIVATE_KEY_PATH file path none Host path to the App’s private key PEM. Required with push deploy. Copied into the secrets directory.
--github-webhook-secret-path PATH OPENFLARE_GITHUB_WEBHOOK_SECRET_PATH file path none Host path to a file holding the webhook secret. Required with push deploy. Copied into the secrets directory.
none OPENFLARE_GIT_RUNNER_WORKSPACE_SOURCE absolute path /var/lib/openflare-gitrunner/workspace Host directory for build checkouts. Must be outside /opt/openflare and /var/lib/openflare and contain no commas. If it already exists it must be owned by root with mode 0700. Environment only.
--git-builder-egress MODE OPENFLARE_GIT_BUILDER_EGRESS internal or bridge internal Network access for build containers. internal has no outbound access; bridge allows it.
--git-builder-cpus N OPENFLARE_GIT_BUILDER_CPUS positive decimal, at most 16 1 CPU limit for a build container.
--git-builder-memory SIZE OPENFLARE_GIT_BUILDER_MEMORY integer plus b, k, m or g 512m Memory limit for a build container.
--git-builder-pids-limit N OPENFLARE_GIT_BUILDER_PIDS_LIMIT integer 32 to 4096 128 Process limit for a build container.
--git-builder-timeout-ms N OPENFLARE_GIT_BUILDER_TIMEOUT_MS integer 1000 to 3600000 600000 Maximum build time in milliseconds.
--git-verify-probe MODE OPENFLARE_GIT_VERIFY_PROBE public or off public Whether the runner verifies a deployment by requesting the worker’s public URL.

These are saved to the env file as GIT_BUILDER_*, GIT_RUNNER_VERIFY_PROBE and related keys. See Configuration.

Flag Environment variable Type Default Description
--acme-ca-server URL OPENFLARE_ACME_CA_SERVER HTTPS URL https://acme-v02.api.letsencrypt.org/directory ACME directory to use. Point it at a staging or private CA for testing.
--acme-ca-certificates LIST OPENFLARE_ACME_CA_CERTIFICATES comma-separated host file paths none PEM files of CA certificates to trust for a private ACME server. Copied to <config-root>/acme-ca/ and mounted read-only into Traefik.
--acme-ca-server-name NAME OPENFLARE_ACME_CA_SERVER_NAME string none TLS server name to use when contacting the ACME server.
--traefik-log-level LEVEL TRAEFIK_LOG_LEVEL DEBUG, INFO, WARN, ERROR WARN Traefik log verbosity.
--reserved-worker-labels LIST PLANE_RESERVED_WORKER_LABELS comma-separated labels console,api,www,mail,smtp,imap,pop,auth,admin,status,traefik,dashboard,hooks One-label names that workers may not claim under the worker base domain.

See TLS certificates for how certificates are issued and renewed.

Flag Environment variable Type Default Description
--repo-url URL OPENFLARE_REPO_URL URL or path https://github.com/becoolme/openflare-control.git Git repository to clone the release from. HTTPS, SSH, file:// or an absolute path. Embedded credentials are rejected. An existing checkout’s origin must match it.
--install-docker OPENFLARE_INSTALL_DOCKER=1 boolean 0 Install Docker from Docker’s apt repository when it is missing. Debian and Ubuntu only.
--no-install-docker OPENFLARE_INSTALL_DOCKER=0 boolean n/a Never install Docker.
Flag Environment variable Type Default Description
--stage STAGE OPENFLARE_INSTALLER_STAGE preflight, checkout, configure, install install Stop successfully after the named stage. See stages.
--preflight-only none flag n/a Same as --stage preflight.
--configure-only none flag n/a Same as --stage configure.
--dry-run OPENFLARE_INSTALLER_DRY_RUN boolean 0 Validate and report without changing the host.
--reconfigure OPENFLARE_RECONFIGURE boolean 0 Load existing non-secret settings from the env file, so you only pass changes. Cannot change the release version.
--non-interactive OPENFLARE_INSTALLER_NON_INTERACTIVE boolean 0 Never prompt. Interactive mode otherwise requires a terminal at /dev/tty.
--verbose, -v OPENFLARE_INSTALLER_VERBOSE boolean 0 Print extra debug: lines.
--installer-version none flag n/a Print the installer’s build identifier and exit.
--help, -h none flag n/a Print usage and exit.

These have no flags.

Environment variable Type Default Description
COMPOSE_WAIT_TIMEOUT_SECONDS integer 300 How long to wait for the stack to become healthy after up.
INSTALLER_EDGE_POST_CHECK_ATTEMPTS integer 1 to 120 18 Attempts of the public HTTPS console check.
INSTALLER_EDGE_POST_CHECK_INTERVAL_SECONDS integer 0 to 30 5 Seconds between those attempts.

After a run, <config-root>/.env contains the resolved options under these names, so a later --reconfigure can read them back:

Installer option Key in the env file
--release-tag OPENFLARE_IMAGE_TAG (the key the updater changes on upgrade)
--worker-base-domain OPENFLARE_WORKER_BASE_DOMAIN and WORKERS_DOMAIN
--console-host OPENFLARE_CONSOLE_HOST and CONSOLE_HOST
--api-host OPENFLARE_API_HOST and PLANE_API_HOST
--acme-email OPENFLARE_ACME_EMAIL and VRT_TLS_EMAIL
--enable-updater, --enable-git-deploy OPENFLARE_ENABLE_UPDATER, OPENFLARE_ENABLE_GIT_DEPLOY and COMPOSE_PROFILES
--git-builder-* GIT_BUILDER_*
--git-verify-probe GIT_RUNNER_VERIFY_PROBE

The installer also detects whether your DNS records are proxied by Cloudflare and records the result as OPENFLARE_CLOUDFLARE_EDGE_MODE (dns-only, proxied or mixed), with OPENFLARE_TRAEFIK_TRUSTED_IPS holding the Cloudflare address ranges Traefik should trust in the proxied modes. These two have no flags. The full list of keys is in Configuration.

Code Meaning
0 Success, or an early --stage or --dry-run finished cleanly.
64 Usage error (bad flag or value).
65 Invalid data or configuration found in your inputs or existing files.
66 A required input is missing.
69 A service or resource was unavailable (network, Docker, Cloudflare API, a timed-out wait).
78 Configuration error.

Errors are printed to standard error as error[E_CODE]: message. Informational lines start with info:, warnings with warn:, and --verbose adds debug: lines.

Code Meaning
E_CLI Unknown option, unexpected argument, or a Cloudflare token passed as a flag.
E_BOOL A boolean environment variable was not 0 or 1.
E_INPUT_REQUIRED A required input is missing in non-interactive mode.
E_HOST_CONFLICT Console, API or webhook hostnames collide with each other, with the apex, or sit too deep under the worker base domain.
E_PREFLIGHT_OS, E_PREFLIGHT_ARCH, E_PREFLIGHT_ROOT Not Linux, not amd64, or not root.
E_PREFLIGHT_RESOURCE Not enough memory or disk.
E_PREFLIGHT_NETWORK, E_PREFLIGHT_CLOCK, E_PREFLIGHT_FIREWALL A required HTTPS destination is unreachable, the clock is off by more than 300 seconds, or the firewall blocks ports 80 or 443.
E_DOCKER, E_DOCKER_COMPOSE, E_DOCKER_INSTALL Docker missing or inaccessible, Compose too old, or automatic Docker installation failed or is unsupported.
E_PORT_BUSY Port 80 or 443 is in use.
E_PUBLIC_IP, E_IPV4 Public IP detection failed, or the address is not a usable public IPv4.
E_IPV6_UNSUPPORTED An IPv6 record exists where only IPv4 is supported.
E_CLOUDFLARE_TOKEN, E_CLOUDFLARE_PERMISSION, E_CLOUDFLARE_ZONE, E_CLOUDFLARE_DNS, E_CLOUDFLARE_CAA, E_CLOUDFLARE_SSL, E_CLOUDFLARE_API Cloudflare validation failures. See DNS and Cloudflare.
E_DNS_CONFIRMATION A DNS change was not confirmed, or --create-dns was used non-interactively without --yes.
E_CHECKOUT_DIRTY Tracked files in the install directory were modified.
E_ENV_FILE, E_LEGACY_ENV, E_ENV_RENDER Problems reading, migrating or rendering the env file.
E_CONFIG_PATH, E_CONFIG_WRITE Unsafe path (root, symlink, wrong location) or a write failure.
E_SECRET_FILE, E_SECRET_ROTATION, E_SECRET A secret file is unreadable, or exists with different content and would have to be rotated.
E_GITDEPLOY_INPUT A push deploy input is missing or invalid.
E_INSTALL_LOCK Another installer run holds the lock.
E_COMPOSE_CONFIG, E_COMPOSE_PULL, E_COMPOSE_UP, E_IMAGE_DIGEST Compose validation, image pull, start-up or digest recording failed.
E_CELL_INIT, E_SERVICE_HEALTH The cell init job failed, or a core service is not healthy.
E_EDGE_POST_CHECK The public edge check failed.
E_INTEGRATION_GAP The plan cannot be completed as requested, for example a release version mismatch or a request to change version with --reconfigure.