ICN Quick Deploy Reference Card

Last Updated: December 12, 2025
Status: Historical quick-reference snapshot

Historical quick-deploy snapshot from 2025-12-12. Confirm current operational status via live checks and docs/ci/CI_CURRENT_STATUS.md.


๐Ÿš€ Deploy in 5 Minutes

Step 1: Clone Repository

git clone https://github.com/InterCooperative-Network/icn.git
cd icn/deploy

Step 2: Quick Start

./quickstart.sh "My Cooperative"

Step 3: Access Services

Step 4: Test Health

curl http://localhost:8080/v1/health

Expected Response:

{"status":"healthy","version":"0.1.0","uptime_secs":...}

๐Ÿ“ฑ Configure Mobile App

Edit sdk/react-native/examples/CoopWallet/src/client.ts:

const client = createMobileClient({
  baseUrl: 'http://YOUR_SERVER_IP:8080',  // Change from localhost
  wallet,
  storage,
});

๐Ÿ”’ Production Setup

1. Generate JWT Secret

openssl rand -hex 32
# Copy output and set in .env

2. Configure Domain

# Point DNS to your server
api.your-coop.org โ†’ YOUR_SERVER_IP

3. Install SSL Certificate

sudo apt-get install certbot python3-certbot-nginx
sudo certbot --nginx -d api.your-coop.org

4. Update Mobile App

baseUrl: 'https://api.your-coop.org'  // Use HTTPS

๐Ÿงช Quick Test

Backend Health

curl http://localhost:8080/v1/health

WebSocket Connection

# Install websocat: cargo install websocat
websocat ws://localhost:8080/v1/ws

Mobile App

  1. Update API endpoint
  2. Build: npx react-native run-ios
  3. Register new user
  4. Send payment
  5. Check notifications

๐Ÿ“Š Monitoring

Grafana Dashboard

Key Metrics

  • gateway_requests_total - API requests
  • gateway_websocket_connections - Active connections
  • gateway_payments_created - Payment volume
  • gateway_notifications_sent - Notification delivery

๐Ÿ”ง Common Commands

Docker Management

# View logs
docker logs -f icn-daemon

# Restart service
docker restart icn-daemon

# Stop all
cd deploy && docker compose down

# Remove all data (DESTRUCTIVE!)
docker compose down -v

Native Service (if installed)

# Status
sudo systemctl status icnd

# Logs
journalctl -u icnd -f

# Restart
sudo systemctl restart icnd

๐Ÿ†˜ Troubleshooting

Problem: Can't connect from mobile app

# Check firewall
sudo ufw status

# Allow port (if needed)
sudo ufw allow 8080

Problem: WebSocket disconnects

# Check logs
docker logs icn-daemon | grep -i websocket

# Increase nginx timeout if using reverse proxy
proxy_read_timeout 3600s;

Problem: Gateway won't start

# Check logs
docker logs icn-daemon

# Common: Port already in use
sudo lsof -i :8080

# Common: JWT_SECRET not set
cat deploy/.env | grep JWT_SECRET

๐Ÿ“š Full Documentation


โœ… Production Checklist

  • JWT_SECRET is random (not default)
  • HTTPS configured with valid SSL
  • Grafana password changed
  • Firewall enabled (80/443 only)
  • Backups configured
  • DNS pointing to server
  • Mobile app using production URL
  • Test from mobile network
  • Monitor Grafana dashboards
  • Health checks passing

๐ŸŽฏ Success Criteria

After deployment, verify:

โœ… curl http://localhost:8080/v1/health returns 200
โœ… Grafana shows metrics flowing
โœ… Mobile app can register user
โœ… Mobile app can send payment
โœ… WebSocket real-time updates work
โœ… Offline mode syncs correctly
โœ… No errors in docker logs icn-daemon


๐Ÿ“ž Support


Ready? Run this now:

git clone https://github.com/InterCooperative-Network/icn.git
cd icn/deploy
./quickstart.sh "My Cooperative"

๐Ÿš€ You're live in 5 minutes!