Files
nuc/commands.md
Alejandro Gutiérrez 390eda1595 Initial commit - NUC server configuration and docs
- CLAUDE.md: Server instructions and service reference
- docs/: Persistent documentation (architecture, guides)
- .artifacts/: Session-generated notes
- playwriter-browser/: Remote browser container config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-01 20:49:20 +00:00

3.5 KiB

Quick Reference Commands

SSH Connection

ssh nuc

Docker Commands

List Running Containers

ssh nuc "docker ps --format 'table {{.Names}}\t{{.Status}}\t{{.Ports}}'"

View Logs

# Last 100 lines
ssh nuc "docker logs <container> --tail 100"

# Follow logs
ssh nuc "docker logs <container> -f"

# With timestamps
ssh nuc "docker logs <container> --tail 50 -t"

Container Management

# Restart
ssh nuc "docker restart <container>"

# Stop
ssh nuc "docker stop <container>"

# Start
ssh nuc "docker start <container>"

# Remove
ssh nuc "docker rm <container>"

Execute Commands in Container

ssh nuc "docker exec <container> <command>"

# Interactive shell
ssh nuc -t "docker exec -it <container> /bin/sh"

Network Inspection

# Find container's network
ssh nuc "docker inspect <container> --format '{{range .NetworkSettings.Networks}}{{.NetworkID}}{{end}}'"

# List networks
ssh nuc "docker network ls"

Coolify Management

Restart a Service

ssh nuc "docker exec coolify php artisan tinker --execute=\"
use App\\Actions\\Service\\StartService;
use App\\Models\\Service;
\\\$service = Service::find(<SERVICE_ID>);
StartService::run(\\\$service);
\""

List Services

ssh nuc "docker exec coolify php artisan tinker --execute=\"
use App\\Models\\Service;
Service::all(['id','name','uuid'])->toJson();
\""

Update Environment Variable

ssh nuc "docker exec coolify php artisan tinker --execute=\"
use App\\Models\\EnvironmentVariable;
\\\$var = EnvironmentVariable::where('key', 'VAR_NAME')
    ->where('resourceable_id', <SERVICE_ID>)
    ->where('resourceable_type', 'App\\\\\\\\Models\\\\\\\\Service')
    ->first();
\\\$var->value = encrypt('new_value');
\\\$var->save();
echo 'Updated';
\""

Port Forwarding

Create socat forwarder

ssh nuc "docker run -d \
  --name port-fwd-<name> \
  --network <network_id> \
  -p <external_port>:<internal_port> \
  alpine/socat \
  tcp-listen:<internal_port>,fork,reuseaddr \
  tcp-connect:<container>:<container_port>"

Create nginx forwarder (with HSTS stripping)

ssh nuc "docker run -d \
  --name port-fwd-<name> \
  --network <network_id> \
  -p <external_port>:<proxy_port> \
  nginx:alpine \
  sh -c 'echo \"server { listen <proxy_port>; location / { proxy_pass http://<container>:<port>; proxy_set_header Host \\\$host; proxy_hide_header Strict-Transport-Security; } }\" > /etc/nginx/conf.d/default.conf && nginx -g \"daemon off;\"'"

Service URLs

Service URL
Homepage http://192.168.1.3:3000
Coolify http://192.168.1.3:8000
Gitea http://192.168.1.3:3030
Outline http://192.168.1.3:3080
n8n http://192.168.1.3:5678
Vaultwarden http://192.168.1.3:8222
Ntfy http://192.168.1.3:8333
MinIO http://192.168.1.3:9001
Uptime Kuma http://192.168.1.3:3001
Dozzle http://192.168.1.3:9999
Adminer http://192.168.1.3:8088
Kopia http://192.168.1.3:51515
FileBrowser http://192.168.1.3:8085

Backup & Recovery

Kopia Web UI

http://192.168.1.3:51515

Manual Backup Check

ssh nuc "docker exec kopia kopia snapshot list"

Troubleshooting

Check disk space

ssh nuc "df -h"

Check memory

ssh nuc "free -h"

Check Docker disk usage

ssh nuc "docker system df"

Clean up Docker

# Remove unused images
ssh nuc "docker image prune -a"

# Remove unused volumes
ssh nuc "docker volume prune"

# Full cleanup
ssh nuc "docker system prune -a"