Install Daployi Services
The Daployi Installer is the quickest way to get Daployi up and running. It runs as a container will automatically setup the required services and generate secrets.
Repository (source): Docker hub - https://hub.docker.com/r/daployi/daployi-installer
Prerequisites:
- Docker installed on your host
- A directory where the installer can write configuration (.env) and secrets (.secrets/*)
Installation Methods
The installer can be run directly as a shell script or using Docker. Choose the method that best fits your environment.
Shell Script (Recommended)
This method downloads and executes the installation script directly on your host.
Docker Run
Run the installer inside a temporary Docker container.
Command Generator
Use the following generator to pre-populate your environment variables. The commands below will update automatically.
Shell Script Installation
WEBAUTHN_RP_ID="[instance domain here e.g. daployi.yourdomain.com]" \
WEBAUTHN_RP_NAME="[Name to display in WebAuthn registration]" \
WEBAUTHN_ORIGIN="[Url to use for WebAuthn registration e.g. https://daployi.yourdomain.com]" \
WEB_PUBLIC_BASE="[Base system url e.g. https://daployi.yourdomain.com]" \
PUBLIC_API_BASE="[Base api url e.g. https://api.daployi.yourdomain.com]" \
PUBLIC_WS_BASE="[Base websocket url e.g. wss://api.daployi.yourdomain.com]" \
API_PORT=3005 \
WEB_PORT=3006 \
LOG_LEVEL=DEBUG \
bash -c "$(curl -sSL https://docs.daployi.io/install.sh)"
Docker Run Command
sudo docker run --rm \
-e WEBAUTHN_RP_ID="[instance domain here e.g. daployi.yourdomain.com]" \
-e WEBAUTHN_RP_NAME="[Name to display in WebAuthn registration]" \
-e WEBAUTHN_ORIGIN="[Url to use for WebAuthn registration e.g. https://daployi.yourdomain.com]" \
-e WEB_PUBLIC_BASE="[Base system url e.g. https://daployi.yourdomain.com]" \
-e PUBLIC_API_BASE="[Base api url e.g. https://api.daployi.yourdomain.com]" \
-e PUBLIC_WS_BASE="[Base websocket url e.g. wss://api.daployi.yourdomain.com]" \
-e API_PORT=3005 \
-e WEB_PORT=3006 \
-e LOG_LEVEL=DEBUG \
-v /var/run/docker.sock:/var/run/docker.sock \
-v "$(pwd)":"$(pwd)" \
-w "$(pwd)" \
daployi/daployi-installer:1.1.0
Docker Compose
services:
daployi-installer:
image: daployi/daployi-installer:1.1.0
environment:
WEBAUTHN_RP_ID: "[instance domain here e.g. daployi.yourdomain.com]"
WEBAUTHN_RP_NAME: "[Name to display in WebAuthn registration]"
WEBAUTHN_ORIGIN: "[Url to use for WebAuthn registration e.g. https://daployi.yourdomain.com]"
WEB_PUBLIC_BASE: "[Base system url e.g. https://daployi.yourdomain.com]"
PUBLIC_API_BASE: "[Base api url e.g. https://api.daployi.yourdomain.com]"
PUBLIC_WS_BASE: "[Base websocket url e.g. wss://api.daployi.yourdomain.com]"
API_PORT: "3005"
WEB_PORT: "3006"
LOG_LEVEL: "DEBUG"
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- ${PWD}:${PWD}
working_dir: ${PWD}
restart: "no"
If you want to run without SSL or a custom domain, you can set the following environment variables:
- WEB_PUBLIC_BASE:
[SERVER_IP]:3000(or your set port) - PUBLIC_API_BASE:
[SERVER_IP]:3001(or your set port) - PUBLIC_WS_BASE:
ws://[SERVER_IP]:3001
Environment Variables
These variables control how the installer sets up the environment and what values it populates in the .env file and Docker secrets.
| Variable | Description | Default Value |
|---|---|---|
API_PORT | The host port mapped to the API server. | 3001 |
WEB_PORT | The host port mapped to the Web frontend. | 3000 |
MONGO_USER | The root username for the MongoDB database. | daployi |
LOG_LEVEL | Logging verbosity (TRACE, DEBUG, INFO, WARN, ERROR, FATAL). | WARN |
WEB_PUBLIC_BASE | The public URL/base path for the web frontend. | (Optional) |
PUBLIC_API_BASE | The public URL for the API. If not set, it defaults to WEB_PUBLIC_BASE. | (Optional) |
PUBLIC_WS_BASE | The public WebSocket base URL. | (Optional) |
WEBAUTHN_RP_ID | Relying Party ID for WebAuthn (Passkeys) authentication. | (Optional) |
WEBAUTHN_RP_NAME | Relying Party Name for WebAuthn (Passkeys) authentication. | (Optional) |
WEBAUTHN_ORIGIN | Allowed origin for WebAuthn authentication. | (Optional) |
MTU or mtu | Sets the MTU (Maximum Transmission Unit) for the Docker bridge network. | (Optional) |
Working Directory and Volumes
The installer needs access to a directory on your host to save the generated configuration files (.env) and secrets (.secrets/).
In the generator above, we use $(pwd) (or ${PWD} in Compose) to map the current working directory:
-v "$(pwd)":"$(pwd)": Maps the current directory from the host to the same path inside the container.-w "$(pwd)": Sets the container's working directory to that same path.
This ensures that any files created by the installer are written directly to your current directory on the host.
Using a Static Directory
If you want to be consistent and not rely on the directory you are currently in, you can specify a static path. This is recommended for production environments to avoid accidental misconfiguration.
Example using /opt/daployi:
- Shell Script
- Docker Run
- Docker Compose
To set a static directory with the shell script, set the ROOT_DIR environment variable:
ROOT_DIR=/opt/daployi \
bash -c "$(curl -sSL https://docs.daployi.io/install.sh)"
sudo docker run --rm \
... \
-v /opt/daployi:/opt/daployi \
-w /opt/daployi \
daployi/daployi-installer:1.1.0
services:
daployi-installer:
image: daployi/daployi-installer:1.1.0
...
volumes:
- /var/run/docker.sock:/var/run/docker.sock
- /opt/daployi:/opt/daployi
working_dir: /opt/daployi
- Follow the prompts:
- The installer will help you generate required secret files under .secrets
- It will create a .env file with the settings you choose
- It will bring up the stack using Docker Compose
Notes:
- You can re-run the installer to update the stack. Make sure to run it from the same directory as it stores configurations.
- If your environment uses SELinux or strict permissions, ensure the working directory allows Docker to mount it.
- If using a remote Docker host, forward the Docker socket or use DOCKER_HOST env var inside the installer container.
Next: proceed to Configuration to understand environment variables and secrets.