fix: Periphery installer - SSL disabled + proper config handling

- Config filename: periphery.config.toml (Komodo convention)
- SSL disabled by default (ssl_enabled=false) for reverse proxy setups
- docker-compose.yml: proper volume mount for config file
- Add --config-path argument to periphery container
- Update Next Steps with correct registration instructions
- Config path in output messages updated

Fixes periphery installation behind Caddy/Nginx reverse proxy.
This commit is contained in:
nocci 2026-03-11 15:46:05 +00:00
parent 4b778d3218
commit cab7bdbfa0

View file

@ -112,7 +112,7 @@ create_directories() {
create_config() { create_config() {
print_header "Creating Configuration" print_header "Creating Configuration"
cat > "$INSTALL_DIR/config/config.toml" << EOF cat > "$INSTALL_DIR/config/periphery.config.toml" << EOF
# Komodo Periphery Configuration # Komodo Periphery Configuration
# Generated: $(date -Iseconds) # Generated: $(date -Iseconds)
@ -122,6 +122,9 @@ passkey = "$PASSKEY"
listen_port = 8120 listen_port = 8120
bind_address = "0.0.0.0" bind_address = "0.0.0.0"
# SSL Configuration - disabled for reverse proxy setups (Caddy, Nginx)
ssl_enabled = false
# Logging # Logging
log_level = "info" log_level = "info"
log_file = "/opt/komodo-periphery/logs/periphery.log" log_file = "/opt/komodo-periphery/logs/periphery.log"
@ -137,10 +140,10 @@ enable_terminal = true
# websocket_ping_interval = 10 # websocket_ping_interval = 10
EOF EOF
print_success "Configuration created at $INSTALL_DIR/config/config.toml" print_success "Configuration created at $INSTALL_DIR/config/periphery.config.toml"
# Set secure permissions # Set secure permissions
chmod 600 "$INSTALL_DIR/config/config.toml" chmod 600 "$INSTALL_DIR/config/periphery.config.toml"
print_success "Configuration file permissions set (600)" print_success "Configuration file permissions set (600)"
} }
@ -157,8 +160,9 @@ services:
container_name: komodo-periphery container_name: komodo-periphery
restart: unless-stopped restart: unless-stopped
network_mode: host network_mode: host
command: periphery --config-path /etc/komodo/periphery.config.toml
volumes: volumes:
- ./config:/config:ro - ./config/periphery.config.toml:/etc/komodo/periphery.config.toml:ro
- ./data:/data - ./data:/data
- ./logs:/logs - ./logs:/logs
- /var/run/docker.sock:/var/run/docker.sock:ro - /var/run/docker.sock:/var/run/docker.sock:ro
@ -264,31 +268,24 @@ show_status() {
echo " Restart: systemctl restart komodo-periphery" echo " Restart: systemctl restart komodo-periphery"
echo " Stop: systemctl stop komodo-periphery" echo " Stop: systemctl stop komodo-periphery"
echo " Status: systemctl status komodo-periphery" echo " Status: systemctl status komodo-periphery"
echo " Config location: $INSTALL_DIR/config/config.toml" echo " Config location: $INSTALL_DIR/config/periphery.config.toml"
echo "" echo ""
echo "Next Steps:" echo "Next Steps:"
echo " The Periphery will attempt to connect to the Core automatically." echo " Register this Periphery in your Komodo Core UI:"
echo "" echo ""
echo " OPTION A - Automatic Connection:" echo " 1. Go to your Komodo Core UI: $CORE_DOMAIN"
echo " 1. Go to your Komodo Core UI"
echo " 2. Navigate to 'Peripheries' or 'Servers'"
echo " 3. This Periphery should appear automatically"
echo " 4. If not, check the logs for connection errors"
echo ""
echo " OPTION B - Manual Server Creation (if auto-discovery fails):"
echo " 1. Go to your Komodo Core UI"
echo " 2. Navigate to 'Servers' and click 'Add Server'" echo " 2. Navigate to 'Servers' and click 'Add Server'"
echo " 3. Enter the Server Name: $SERVER_NAME" echo " 3. Enter the Server Name: $SERVER_NAME"
echo " 4. Save the Server configuration" echo " 4. Enter the Periphery URL: https://your-periphery-domain.example.com"
echo " 5. The Periphery should connect immediately" echo " (or your reverse proxy domain, e.g., https://komodo-ffm.kernelkunst.de)"
echo " 5. Save the Server configuration"
echo " 6. The Periphery should connect immediately"
echo "" echo ""
echo " Troubleshooting:" echo " Troubleshooting:"
echo " - Ensure the Core Domain is reachable from this server" echo " - Ensure the Core can reach the Periphery URL"
echo " - Verify the Passkey matches the Core configuration" echo " - Verify the Passkey matches in both Core and Periphery configs"
echo " - Check firewall rules:" echo " - Check firewall rules: Port 8120/tcp must be reachable by Core"
echo " * Outbound connection (default): No inbound ports needed"
echo " * Inbound connection (if Core initiates): Open Port 8120/tcp"
echo " - View logs: docker logs komodo-periphery -f" echo " - View logs: docker logs komodo-periphery -f"
echo "" echo ""
} }