# Server Commands Commands for running and managing the Gordon server process. ## gordon serve Start the Gordon server with registry and proxy components. ### Synopsis ```bash gordon serve [options] ``` ### Options | Option | Short | Default | Description | |--------|-------|---------|-------------| | `--config` | `-c` | Auto-detected | Path to configuration file | ### Description Starts the Gordon server, which includes: - **Container Registry** - Receives image pushes on the registry port - **Reverse Proxy** - Routes app hosts to recorded loopback backends - **Event Bus** - Coordinates runtime notifications - **Config Watcher** - Monitors configuration file for changes ### Configuration File Detection Gordon looks for configuration in this order: 1. Path specified with `--config` 2. `/etc/gordon/gordon.toml` 3. `~/.config/gordon/gordon.toml` 4. `./gordon.toml` ### First Run On first run without a config file, Gordon creates a default configuration at `~/.config/gordon/gordon.toml`. ```bash # First run - creates default config gordon serve # Edit the config, then restart ``` ### Examples ```bash # Basic start gordon serve # With custom config gordon serve --config /path/to/gordon.toml gordon serve -c ./my-config.toml # With environment override GORDON_LOGGING_LEVEL=debug gordon serve ``` ### Signals Gordon responds to these signals: | Signal | Action | |--------|--------| | `SIGTERM` | Graceful shutdown | | `SIGINT` | Graceful shutdown (Ctrl+C) | | `SIGUSR1` | Reload installation configuration | | `SIGUSR2` | Reserved; no app deployment action | ### Running with systemd ```bash # Create user service mkdir -p ~/.config/systemd/user cat > ~/.config/systemd/user/gordon.service <