All options and environment variables of install.sh. For install.ps1 on Windows, see Install on macOS or Windows. To see the short list on the server, run:
bash install.sh --help
Usage
sudo bash install.sh [domain] [options]
domain is the public address, for example zerodot.example.com. If you do not give it, the script asks. Give the name without https:// and without a port. If you give an IP address, the script asks if it must use sslip.io or plain HTTP.
Options
| Option | What it does |
|---|---|
--no-domain |
No domain: use <server-ip>.sslip.io, with HTTPS. Needs ports 80 and 443. |
--ip |
No domain: use the server IP over plain HTTP. For tests or a private network only. |
--local |
Only this computer: http://localhost:PORT. No proxy. Nothing open to the network. Docker mode only. The default on macOS. Also available on Linux. |
--docker |
Run with Docker Compose. This is the default. |
--native |
Run without Docker: systemd services, Postgres and Valkey on the server. Linux only. |
--proxy caddy |
Caddy serves HTTPS. The default when ports 80 and 443 are free, or when Caddy has them. |
--proxy nginx |
nginx serves HTTPS. certbot gets the certificate. Linux only. |
--proxy cloudflared |
A Cloudflare Tunnel serves HTTPS. No port is opened. |
--proxy none |
The script changes no proxy. It prints the upstream address. |
--no-proxy |
Same as --proxy none. |
--postgres docker |
Docker mode: use an own Postgres 17 container. This is the default. |
--postgres host |
Docker mode: use Postgres on this server (13 or newer). The script makes a new database and user. |
--valkey docker |
Docker mode: use an own Valkey 8 container. This is the default. |
--valkey host |
Docker mode: use Valkey or Redis on this server, on port 6379. The script uses a free database number. |
--update |
Update an install that exists. Skips the question. |
--new |
Set up another instance. Skips the question. |
--name NAME |
Name of the instance. Default: zerodot. Used for the folder, the services and the database. |
--dir PATH |
Folder for the code. Default: /var/www/NAME (macOS: ~/NAME). The folder must be empty or not exist. |
--swap, --no-swap |
Add 3 GB of swap when RAM is low and there is no swap. Default: yes. |
--firewall, --no-firewall |
Open ports 80 and 443 in ufw or firewalld (Caddy and nginx only). Default: yes. |
--certbot, --no-certbot |
nginx: get a certificate from Let's Encrypt. Default: yes. |
--check |
Look at the server and show what would happen. Changes nothing. Does not need root. |
--recommended |
New install: ask only the address. The script picks the rest. Skips the setup question. |
--advanced |
New install: ask about each choice: mode, proxy, database, port, admins and more. Skips the setup question. |
-y, --yes |
Ask nothing. Use Recommended and the default answers. |
--allow-host-changes |
With --yes: let the script change shared settings. See What the installer does not change. |
--no-tui |
Ask plain questions, not dialog screens. |
-h, --help |
Show the help text. |
--postgres and --valkey take docker or host. docker is for Docker mode only: with --native, the script stops. For another server, set DATABASE_URL or VALKEY_URL, or pick "Another Postgres" in the menu.
Customize the install
Each option below has a default. Give only the ones that you need. On an update, the options that you do not give again keep their value.
A new install starts with one question: Recommended (the default) or Advanced. With Recommended, you give the address, and the script picks the rest. It shows the plan before it changes anything. With Advanced, the script asks about each choice, then for the port, the admin emails, signup, the version, backups and automatic updates. See Recommended or Advanced.
In both setups, the options that you give on the command line win.
Port and network
sudo bash install.sh zerodot.example.com --port 8080
| Option | What it does |
|---|---|
--port N |
The port of the app on the server. Docker mode: the proxy container. Native mode: the web service. Default: the first free port from 3000. ZERODOT_PORT does the same. |
--api-port N, --worker-port N, --sandbox-port N |
Native mode only: the ports of the other services. Default: the first free port. |
--bind ADDR |
The IPv4 address that the port listens on. Default 127.0.0.1: only a proxy on the server can reach it. 0.0.0.0 opens it to all networks, for example a LAN without a proxy. That is plain HTTP. |
When an update changes the port, the script also changes the upstream in the Caddy or nginx site that it made. With a Cloudflare Tunnel on the server or your own proxy, the script tells you the new upstream.
Version
| Option | What it does |
|---|---|
--version V |
Install this release, for example 0.2.25. The script uses the git tag and the image tag of that release. Updates stay on it until you give another version. --version latest follows the newest release again. This is the default. |
--image REPO |
The Docker image without the tag, for a mirror. Default: ghcr.io/zerodot-io/zerodot. Sets ZERODOT_IMAGE. |
Users and signup
sudo bash install.sh zerodot.example.com --admin-email me@example.com --disable-signup
| Option | What it does |
|---|---|
--admin-email LIST |
The instance admins, comma separated. Sets ZERODOT_ADMIN_EMAILS. These emails can sign up when signup is off. |
--disable-signup |
No public signup. Sets ZERODOT_SIGNUP_DISABLED=true. The admin emails and invited people can still sign up, so the server is never open to strangers. A new install needs --admin-email with it. |
--enable-signup |
Public signup on again. This is the default. |
--trusted-origins LIST |
More origins that can sign in, comma separated. Sets ZERODOT_TRUSTED_ORIGINS. |
Resources and data
| Option | Setting | Default |
|---|---|---|
--concurrency N |
ZERODOT_WORKER_CONCURRENCY: runs at the same time in each worker |
20 |
--workers N (Docker mode) |
WORKER_REPLICAS |
1 |
--sandboxes N (Docker mode) |
SANDBOX_REPLICAS |
1 |
--run-retention DAYS |
ZERODOT_RUN_RETENTION_DAYS |
30 |
--stats-retention DAYS |
ZERODOT_STATS_RETENTION_DAYS |
365 |
--data-dir PATH keeps the files and the installed node packages in PATH/blobs and PATH/nodes, for example on a mounted disk. Docker mode uses these folders in place of the volumes. Native mode default: /var/lib/NAME. Use it for a new install only: the script does not move data. Native mode cannot use a folder in /home or /root.
Features
| Option | What it does |
|---|---|
--no-update-check |
Do not look for new releases. |
--no-feedback-widget |
No feedback button in the app. |
--no-admin-ui |
No System page. |
--community-nodes |
Allow node packages from community registries. See Add a community registry. |
--npm-registry URL |
An npm registry for node packages, for example a mirror. |
--enable-execute-command |
Workflows can run shell commands. Dangerous. Use it only when you trust every user. |
Any other setting
sudo bash install.sh zerodot.example.com --set ZERODOT_TABLE_MAX_ROWS=500000 --env-file my-settings.env
--set KEY=VALUEwrites one key to.env. Give it again for more keys.--env-file FILEwrites eachKEY=VALUEline of a file to.env.
For the keys, see Configuration or .env.example in the code. The script manages some keys itself: the secrets, ZERODOT_BASE_URL, DATABASE_URL and the passwords. You cannot set these keys with --set or --env-file.
Backups and automatic updates
sudo bash install.sh zerodot.example.com --backup daily --auto-update weekly
| Option | What it does |
|---|---|
--backup daily|weekly|off |
Back up the database (pg_dump, gzip) and a copy of .env at about 03:00. Default: off. |
--backup-dir PATH |
The folder for the backups. Default: /var/backups/NAME (macOS: ~/NAME-backups). |
--backup-keep N |
Keep the newest N backups. Default: 14. |
--auto-update daily|weekly|off |
Run zerodot update (--yes --no-tui) at about 04:00. A fixed --version stays. Default: off. |
--acme-email EMAIL |
Email for Let's Encrypt (--proxy nginx). Same as CERTBOT_EMAIL. |
Linux uses systemd timers. To see them, run systemctl list-timers 'NAME-*'. macOS uses launchd, with the logs in ~/Library/Logs.
To make a backup now, run zerodot backup (see zerodot CLI), or run the backup script:
- Linux:
sudo /usr/local/sbin/NAME-backup - macOS:
~/.zerodot/NAME-backup.sh
Uninstall
| Option | What it does |
|---|---|
--uninstall |
Remove the services (or the containers) and the timers of one install. Keeps the folder, .env, the database, the files and the proxy site. Prints the commands that remove them. |
--purge |
With --uninstall: also remove the data, the database and user that the script made, the files and the folder. You cannot undo this. A copy of .env stays in the home folder. |
sudo bash install.sh zerodot.example.com --uninstall --purge
For what stays and what goes, see Uninstall.
Environment variables
Set them before the command. Example:
sudo CERTBOT_EMAIL=admin@example.com bash install.sh zerodot.example.com --proxy nginx
| Variable | What it does |
|---|---|
DATABASE_URL |
Use this Postgres. The script does not make a database. Both modes. See Databases. |
VALKEY_URL |
Use this Valkey or Redis. The script does not install one. Both modes. |
ZERODOT_TUNNEL_TOKEN |
The token of a Cloudflare Tunnel (--proxy cloudflared). Without it, the script asks for it. |
CERTBOT_EMAIL |
Email for Let's Encrypt (--proxy nginx). Let's Encrypt sends expiry warnings to it. Optional. |
ZERODOT_REPO |
Git address of the code. Default: https://github.com/zerodot-io/zerodot.git. |
ZERODOT_BRANCH |
Branch to install. Default: the default branch of the repository. |
ZERODOT_DIR |
Same as --dir. |
ZERODOT_PORT |
Same as --port. |
Settings in .env
These values are in the .env file of the install. To change them, use the options above, or --set KEY=VALUE, then run the script with --update. You can also edit .env, then run docker compose up -d (Docker mode) or restart the services (native mode).
| Variable | What it does |
|---|---|
ZERODOT_VERSION |
Docker mode: the image tag. Default latest. Example: 0.2.25. Set it with --version. |
ZERODOT_IMAGE |
Docker mode: the image without the tag. Default ghcr.io/zerodot-io/zerodot. Set it with --image. |
ZERODOT_DB_PASSWORD |
Docker mode: the password of the Postgres container. Set at the first start only. |
ZERODOT_VALKEY_PASSWORD |
Docker mode: the password of the Valkey container. |
ZERODOT_DB_MAX_CONNECTIONS |
Docker mode: max_connections of the Postgres container. Default 200. |
WORKER_REPLICAS |
Docker mode: the number of worker containers. Set it with --workers. |
SANDBOX_REPLICAS |
Docker mode: the number of sandbox containers. Set it with --sandboxes. |
ZERODOT_WORKER_CONCURRENCY |
The number of runs that one worker runs at the same time. Default 20. Set it with --concurrency. |
ZERODOT_SIGNUP_DISABLED |
true locks public signup off. Set it with --disable-signup. |
ZERODOT_ADMIN_EMAILS |
The instance admins. They can sign up when signup is off. Set it with --admin-email. |
The file .env.example in the code lists all settings, with a comment for each.
Files that the script writes
| File | What it holds |
|---|---|
<install folder>/.env |
Settings and secrets. Mode 600 (Docker) or 640, owner root:NAME (native). |
<install folder>/.zerodot-install |
The choices of the runs: mode, name, domain, scheme (https or http), proxy, database place, ports, version, backups, automatic updates. |
/etc/zerodot/NAME.state |
Linux: root-only copy of .zerodot-install. |
/usr/local/bin/zerodot |
The zerodot CLI command. macOS: /opt/homebrew/bin/zerodot, /usr/local/bin/zerodot, or ~/.local/bin/zerodot. |
/etc/systemd/system/NAME-backup.*, NAME-update.* |
Linux: the timers of --backup and --auto-update. macOS: ~/Library/LaunchAgents/io.zerodot.NAME-*.plist. |
<install folder>/docker-compose.override.yml |
Docker mode: port, database place, tunnel. The script writes it again at each run. Your edits are lost. |
/etc/systemd/system/NAME-*.service |
Native mode: the four services. |
/var/log/zerodot-install.log |
Each change, with the time. macOS: ~/Library/Logs/zerodot-install.log. |
/run/zerodot-install.lock |
Lock: one run at a time. |
Examples
Docker mode, Caddy, no questions:
sudo bash install.sh zerodot.example.com --docker --proxy caddy --yes
Native mode with nginx:
sudo CERTBOT_EMAIL=admin@example.com bash install.sh zerodot.example.com --native --proxy nginx
Docker mode with Postgres and Valkey on the server:
sudo bash install.sh zerodot.example.com --docker --postgres host --valkey host
Cloudflare Tunnel:
sudo ZERODOT_TUNNEL_TOKEN='<token>' bash install.sh zerodot.example.com --proxy cloudflared
A managed database:
sudo DATABASE_URL='postgres://user:pass@db.example.com:5432/zerodot?sslmode=require' \
VALKEY_URL='redis://:pass@cache.example.com:6379/0' \
bash install.sh zerodot.example.com --docker
A second instance:
sudo bash install.sh staging.example.com --new --name zerodot-staging
No domain, HTTPS on sslip.io:
sudo bash install.sh --no-domain --yes
No domain, plain HTTP, for a test:
sudo bash install.sh --ip --proxy caddy --yes
nginx without certbot (you add the certificate):
sudo bash install.sh zerodot.example.com --proxy nginx --no-certbot
Only this computer (macOS, no sudo):
bash install.sh --local --yes
Pin a release, signup off, daily backups:
sudo bash install.sh zerodot.example.com --version 0.2.25 \
--admin-email me@example.com --disable-signup --backup daily
Install a branch:
sudo ZERODOT_BRANCH=next bash install.sh zerodot.example.com