Deployment Guide
This guide covers different deployment strategies and best practices for deploying your site using nsyte.
Basic Deployment
The simplest way to deploy your site is using the deploy command:
bash
nsyte deploy ./distThis will:
- Upload your files to configured relays
- Publish to configured blossom servers
- Update your site's metadata
Deployment Strategies
1. Manual Deployment
Suitable for:
- Small sites
- Infrequent updates
- Personal projects
Steps:
- Build your site
- Run
nsyte deploy - Verify the deployment
2. Automated Deployment
Suitable for:
- Team projects
- Frequent updates
- Production sites
Options:
- GitHub Actions
- GitLab CI
- Custom scripts
See CI/CD Guide for detailed setup instructions.
3. Staged Deployment
Suitable for:
- Large sites
- Critical applications
- Testing environments
Steps:
- Deploy to staging relays
- Test the deployment
- Deploy to production
Deployment Options
Basic Deploy
bash
nsyte deploy ./distForce Re-deploy
Bypass server preflight checks and re-upload all files:
bash
nsyte deploy ./dist --forceSync Missing Files
Check all servers and upload any missing blobs:
bash
nsyte deploy ./dist --syncSet Concurrency
bash
nsyte deploy ./dist --concurrency 8SPA Support
bash
nsyte deploy ./dist --fallback=/index.htmlDeployment Checklist
Before deploying:
Configuration
- [ ] Verify relay configuration
- [ ] Check server settings
- [ ] Review ignore patterns
Authentication
- [ ] Ensure proper authentication
- [ ] Verify bunker connection
- [ ] Check key permissions
Content
- [ ] Build site
- [ ] Test locally
- [ ] Check file sizes
- [ ] Verify links
Deployment
- [ ] Backup current site
- [ ] Run deploy
- [ ] Verify deployment
- [ ] Check site metadata
Best Practices
1. Performance
- Optimize images and assets
- Use appropriate file formats
- Enable compression
- Implement caching
2. Reliability
- Use multiple relays
- Configure fallback servers
- Monitor deployment status
- Keep backups
3. Security
- Use secure authentication
- Protect sensitive data
- Regular key rotation
- Monitor access
4. Maintenance
- Regular updates
- Monitor site health
- Clean up old files
- Update dependencies
Troubleshooting
Common Issues
Deploy Failures
- Check network connectivity
- Verify relay liveness
- Ensure you are allowed to publish to provided relays
- Ensure that provided relays are not rate-limited.
- Check authentication
Missing Files
- Review ignore patterns
- Check file paths
- Verify build output
Authentication Errors
- Verify keys
- Check bunker connection
- Review bunker permissions
- Check configuration
Getting Help
- Check the GitHub Issues
- Review the Security Guide
Next Steps
- Set up CI/CD integration
- Review security best practices
- Learn about local development