Skip to main content

Starting Fishnet

Fishnet can be run in several modes depending on your deployment needs.

Development Mode

For local development with auto-seeded test data:
fishnet start
The server starts on http://localhost:8473 by default.

Production Mode

1

Build the production binary

make build-prod
This embeds the dashboard and creates an optimized release binary.
2

Start the server

./target/release/fishnet start

Stopping Fishnet

To gracefully stop a running Fishnet process:
fishnet stop
This sends a SIGTERM signal and waits up to 10 seconds for graceful shutdown. If the process was started by the CLI, the PID file is automatically cleaned up.

Environment Variables

Fishnet supports several environment variables for configuration:
VariableDefaultDescription
FISHNET_HOST127.0.0.1Host address to bind to
FISHNET_PORT8473Port to listen on
OPENAI_BASE_URL-Agent should point to http://localhost:8473/proxy/openai
ANTHROPIC_BASE_URL-Agent should point to http://localhost:8473/proxy/anthropic
FISHNET_DEV-Set to 1 to enable development mode features
Agent environments should configure their base URLs to point through Fishnet:
export OPENAI_BASE_URL="http://localhost:8473/proxy/openai"
export ANTHROPIC_BASE_URL="http://localhost:8473/proxy/anthropic"

Service Installation

For production deployments, install Fishnet as a system service to start automatically on boot.
1

Preview the install plan

fishnet service install
This shows what will be installed without making changes.
2

Apply the installation

fishnet service install --apply
Creates ~/Library/LaunchAgents/dev.fishnet.local.plist and loads the agent.
3

Verify it's running

launchctl list | grep fishnet
fishnet status

Uninstall

fishnet service uninstall --apply

Docker Deployment

Run Fishnet in a container with persistent vault storage:
1

Build and start the container

make docker-up
This builds the image and starts the container in detached mode.
2

View logs

make docker-logs
3

Stop the container

make docker-down

Docker Compose Configuration

docker-compose.yml
services:
  fishnet:
    build: .
    ports:
      - "8473:8473"
    volumes:
      - fishnet-data:/var/lib/fishnet
    environment:
      - FISHNET_HOST=0.0.0.0
    restart: unless-stopped

volumes:
  fishnet-data:

Status Monitoring

Check the current runtime status:
fishnet status
Example output:
Status: running
PID: 12345
Uptime: 3h 24m
Active alerts: 2 (critical: 0, warning: 2)
Today's spend (USD):
  openai           $0.042500
  anthropic        $0.018300
Today's requests:
  openai           47
  anthropic        23

Process Management

Fishnet uses a PID file stored in the data directory to track running processes:
  • PID file location: ~/.local/share/fishnet/fishnet.pid (Linux) or ~/Library/Application Support/Fishnet/fishnet.pid (macOS)
  • Graceful shutdown: SIGTERM/SIGINT handlers ensure proper cleanup
  • State persistence: All databases are flushed before shutdown
If you see “already running” errors when starting Fishnet, use fishnet stop first to clean up any stale processes.

Health Checks

Use the doctor command to validate your Fishnet installation:
fishnet doctor
This checks:
  • Process running status
  • Credential vault accessibility
  • Agent environment variable configuration
  • Upstream API reachability
For JSON output:
fishnet doctor --json

Build docs developers (and LLMs) love