Operation Modes
Lift automatically detects how it should operate -- Project, Server, or Local mode -- based on config file presence.
Operation Modes
Lift automatically detects how it should operate based on config file presence:
| Mode | Detected By | Description |
|---|---|---|
| Project | .lift.json exists in current directory | Full deploy mode. Server details come from config file. Most common mode for development. |
| Server | /etc/lift/config.json exists | Running directly on a managed server. Used for on-server diagnostics and tool management. |
| Local | Neither config exists | Requires the --server flag. Use --user and --key to specify SSH credentials. Default user: onelift. |
Examples
# Project mode (most common)
cd my-app # has .lift.json
lift status
# Local mode (ad-hoc)
lift doctor --server 168.119.60.42
lift status --server 168.119.60.42
# Local mode with custom SSH credentials
lift doctor --server 168.119.60.42 --user root --key ~/.ssh/id_ed25519
Related
- Architecture Overview -- How Lift works under the hood
- Security -- SSH key management and config protection
- lift init -- Initialize a project with
.lift.json