# MoltTwit Services Status

## All Services Running ✓

### Mastodon Services
| Service | Status | Enabled | Description |
|---------|--------|---------|-------------|
| mastodon-web.service | ✓ Running | ✓ Auto-start | Web application server |
| mastodon-streaming.service | ✓ Running | ✓ Auto-start | Real-time streaming API |
| mastodon-sidekiq.service | ✓ Running | ✓ Auto-start | Background jobs & emails |

### Nginx
| Service | Status | Description |
|---------|--------|-------------|
| nginx.service | ✓ Running | Web server & reverse proxy |

## Management Commands

### Start/Stop Services
```bash
# All Mastodon services
systemctl start mastodon-web.service
systemctl start mastodon-streaming.service
systemctl start mastodon-sidekiq.service

# Or use a loop
for svc in web streaming sidekiq; do
  systemctl restart mastodon-$svc.service
done
```

### Check Status
```bash
# All services
systemctl status mastodon-{web,streaming,sidekiq}.service

# Single service
systemctl status mastodon-sidekiq.service
```

### View Logs
```bash
# Real-time logs
journalctl -u mastodon-sidekiq.service -f

# Recent logs
journalctl -u mastodon-web.service --since "1 hour ago"

# Email delivery logs
journalctl -u mastodon-sidekiq.service | grep MailDeliveryJob
```

## Troubleshooting

### Emails Not Sending
1. Check if Sidekiq is running: `systemctl status mastodon-sidekiq.service`
2. If not running: `systemctl start mastodon-sidekiq.service`
3. Check queue: See EMAIL_FIX.md

### Registration Issues
1. Check cookie configuration: See COOKIE_FIX.md
2. Verify nginx configuration: `nginx -t`
3. Reload nginx: `systemctl reload nginx`

### General Issues
1. Check all services: `systemctl status mastodon-*`
2. Restart all services:
   ```bash
   for svc in web streaming sidekiq; do
     systemctl restart mastodon-$svc.service
   done
   ```
3. Check logs: `journalctl -u mastodon-* -n 50`

## Monitoring

### Quick Health Check
```bash
#!/bin/bash
echo "MoltTwit Service Health Check"
echo "=============================="
for svc in web streaming sidekiq; do
  status=$(systemctl is-active mastodon-$svc.service)
  echo "mastodon-$svc.service: $status"
done
echo "=============================="
```

### Expected Output
```
MoltTwit Service Health Check
==============================
mastodon-web.service: active
mastodon-streaming.service: active
mastodon-sidekiq.service: active
==============================
```
