Skip to content

Nexus Server - Deployment Quick Start

Choose your deployment method based on your needs:

Best for: Local development, testing, small production deployments

# 1. Copy environment file
cp .env.docker.example .env

# 2. Generate secure API key
echo "NEXUS_API_KEY=$(openssl rand -hex 32)" >> .env

# 3. Start server
docker-compose up -d

# 4. Test
curl http://localhost:2026/health

Docs: Docker Deployment Guide


Best for: Production deployments, automatic scaling, managed infrastructure

# One command deployment!
../../scripts/deploy-gcp-docker.sh \
  --project-id your-gcp-project \
  --api-key $(openssl rand -hex 32) \
  --machine-type e2-standard-2 \
  --build-local

# With GCS backend
../../scripts/deploy-gcp-docker.sh \
  --project-id your-gcp-project \
  --api-key $(openssl rand -hex 32) \
  --gcs-bucket your-nexus-bucket \
  --machine-type e2-standard-2 \
  --build-local

Docs: Docker Deployment Guide


3. GCP with Direct Install

Best for: Custom VM setups, full control over environment

# Initial deployment
../../scripts/deploy-gcp.sh \
  --project-id your-gcp-project \
  --instance-name nexus-server \
  --api-key $(openssl rand -hex 32) \
  --machine-type e2-standard-2

# Redeploy code to existing instance (recommended for updates)
../../scripts/deploy-gcp.sh \
  --project-id your-gcp-project \
  --instance-name nexus-server \
  --deploy-only

Docs: GCP Deployment Guide


4. Local Direct Install

Best for: Development on your local machine

# 1. Activate virtual environment
source .venv/bin/activate

# 2. Start server
./start-server.sh --api-key mysecret

# Or manually
python -m nexus.cli serve --host localhost --port 2026

Docs: README - Remote Nexus Server


Feature Comparison

Method Setup Time Cost Scalability Best For
Docker Compose 2 minutes Free Manual Local dev, testing
GCP + Docker 5 minutes ~$27/month Easy Production (recommended)
GCP Direct 5 minutes ~$27/month Easy Production, custom setup
Local Install 1 minute Free N/A Development

Quick Commands Reference

Testing

# Health check
curl http://localhost:2026/health

# Status check
curl http://localhost:2026/api/nfs/status

# List files (with API key)
curl -X POST http://localhost:2026/api/nfs/list \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR-API-KEY" \
  -d '{"jsonrpc": "2.0", "method": "list", "params": {"path": "/"}, "id": 1}'

Management

# Docker Compose
docker-compose logs -f          # View logs
docker-compose restart          # Restart
docker-compose down             # Stop
docker-compose pull && docker-compose up -d  # Update

# GCP + Docker
gcloud compute ssh instance-name --zone=us-central1-a \
  --command='sudo docker logs -f $(sudo docker ps -q)'  # View logs

# GCP Direct Install
gcloud compute ssh nexus-server --zone=us-west1-a \
  --command='sudo journalctl -u nexus-server -f'  # View logs
gcloud compute ssh nexus-server --zone=us-west1-a \
  --command='sudo systemctl restart nexus-server'  # Restart
../../scripts/deploy-gcp.sh --project-id PROJECT_ID --instance-name nexus-server --deploy-only  # Redeploy code

# Local
./start-server.sh               # Start
lsof -ti:2026 | xargs kill -9  # Stop

Need Help?