A powerful and user-friendly content management system built with Strapi, designed to help you manage your digital content efficiently.
This is a content management system (CMS) that allows you to:
- Create and manage blog articles
- Organize content with categories
- Manage authors and their profiles
- Handle media files (images, videos, documents)
- Control who can access what (user permissions)
- Support multiple languages
The application uses a modular configuration structure:
config/
├── admin.js # Admin panel configuration
├── api.js # API configuration
├── database.js # Database connection settings
├── middlewares.js# Middleware configurations
└── server.js # Server settings
Before you start, you'll need these programs installed on your computer:
- Git (for version control) - Download Git
- Node.js (to run the application) - Download Node.js
- A text editor (to edit files) - We recommend Visual Studio Code
- Database system (SQLite, PostgreSQL)
-
First Steps
# Get the code from GitHub git clone <your-repository-url> cd your-project-name # Install all necessary programs npm install #Default Database SQLite on dev to mirror postgres npm install better-sqlite3
-
Environment Variables Setup Create a file named
.env
in your main folder with these settings:# Server Configuration HOST=0.0.0.0 PORT=1337 APP_KEYS=kqD2qHn2ZoYU8bz7e+Z7uw==,rw0RO68gv3/RJefGZfMMIw==,Ao/LrBy/Yd1Pdi8n5lIQuQ==,+ZfuHU7pzhdGEzpOyQzLEQ== API_TOKEN_SALT=viIy/ifky8ih/hGJd4Dzlg== ADMIN_JWT_SECRET=XyebhwUYuoRnT7S1D2YUVw== TRANSFER_TOKEN_SALT=MGJrkEsdlEq3mFFszaSuaA== # Database Configuration # (using SQLite) DATABASE_CLIENT=sqlite DATABASE_FILENAME=.tmp/data.db # (PostgreSQL/MySQL) DATABASE_CLIENT=postgres DATABASE_HOST=localhost DATABASE_PORT=5439 DATABASE_NAME=2077_research DATABASE_USERNAME=postgres DATABASE_PASSWORD=password DATABASE_SSL=false DATABASE_FILENAME= JWT_SECRET=pGCc3C3O5F19nIxzylp7dw==
-
Environment Switching Script Use this script to switch between development and production environments:
# Make the script usable chmod +x switch-env.sh # Switch to development ./switch-env.sh local # Switch to production ./switch-env.sh production
-
SQLite (Perfect for Beginners)
- Lightweight, file-based database
- No additional setup required
- Great for development and small applications
-
PostgreSQL (Recommended for Production)
- Robust and scalable
- Supports SSL connections
- Advanced features for large applications
-
MySQL
- Popular alternative to PostgreSQL
- Similar features to PostgreSQL
- Wide community support
-
For Development:
npm run develop
-
For Production:
npm run build npm run start
-
Articles
- Title and content
- Author information
- Categories
- Media attachments
- SEO settings
- View tracking
- Reading time calculation
-
Authors
- Full name and username
- Biography
- Social media links
- Article associations
-
Categories
- Hierarchical structure
- Article associations
- SEO optimization
-
Global Settings
- Site configuration
- SEO defaults
- Media settings
The system supports large file uploads with these limits:
- Form payload: 50MB
- JSON payload: 50MB
- Text payload: 50MB
- Maximum file size: 200MB
Default API settings:
- 25 items per page (default)
- 100 items maximum per page
- Automatic count enabled
- RESTful endpoints
- Authentication support
-
Content Creators
- Rich text editor
- Media library
- Draft & publish workflow
- Content scheduling
- SEO tools
-
Administrators
- User management
- Permission settings
- Content type builder
- Media library management
- System monitoring
-
Developers
- API access
- Custom code integration
- Database configuration
- Plugin system
- Webhook support
-
Database Connection Issues
- Verify credentials in .env file
- Check database server status
- Confirm port availability
- Test network connectivity
-
File Upload Problems
- Check file size limits
- Verify storage permissions
- Confirm available disk space
- Check media configuration
-
Performance Issues
- Monitor database connections
- Check server resources
- Optimize queries
- Review caching settings
-
SSL Certificate Problems
- Verify certificate paths
- Check SSL configuration
- Confirm key permissions
- Validate certificate dates
- Regular Updates
# Update dependencies npm update # Check for security updates npm audit # Update Strapi core npm upgrade @strapi/strapi
This guide will walk you through the process of migrating your local Strapi application to Strapi Cloud.
- Prerequisites
- Preparing Your Local Project
- Database Migration
- Media Files Migration
- Configuration Steps
- Deployment Process
- Post-Migration Tasks
- Troubleshooting
-
Strapi Cloud Account
- Create an account at Strapi Cloud
- Set up a new project in Strapi Cloud dashboard
- Note down your project ID and API key
-
Required Tools
# Install Strapi CLI globally npm install -g @strapi/cli # Install database migration tools npm install -g postgres-migrations
-
Environment Check
# Verify Strapi version strapi version # Check Node.js version node --version # Should be >=18.0.0 <=22.x.x
-
Update Your Dependencies
# Update Strapi and dependencies npm upgrade @strapi/strapi@latest npm install @strapi/plugin-cloud
-
Version Control
# Ensure your project is using Git git init git add . git commit -m "Prepare for Strapi Cloud migration"
-
Configure Project Settings
// config/server.js module.exports = ({ env }) => ({ host: env('HOST', '0.0.0.0'), port: env.int('PORT', 1337), url: env('PUBLIC_URL', 'https://your-app.strapi.cloud'), app: { keys: env.array('APP_KEYS'), }, webhooks: { populateRelations: env.bool('WEBHOOKS_POPULATE_RELATIONS', false), }, });
-
Export Local Database
# PostgreSQL pg_dump -U your_username -d your_database > backup.sql
-
Import to Cloud Database
# Get connection details from Strapi Cloud dashboard psql -h your_cloud_host -U your_cloud_user -d your_cloud_db < backup.sql
-
Verify Data
# Connect to cloud database psql -h your_cloud_host -U your_cloud_user -d your_cloud_db # Check tables \dt
-
Prepare Media Files
# Create a backup of your uploads zip -r uploads_backup.zip ./public/uploads
-
Configure Cloud Storage
// config/plugins.js module.exports = ({ env }) => ({ upload: { config: { provider: '@strapi/provider-upload-aws-s3', providerOptions: { accessKeyId: env('AWS_ACCESS_KEY_ID'), secretAccessKey: env('AWS_ACCESS_SECRET'), region: env('AWS_REGION'), params: { Bucket: env('AWS_BUCKET'), }, }, }, }, });
-
Upload Media Files
# Using Strapi CLI strapi transfer --to cloud
-
Environment Variables
# Production Environment Variables HOST=0.0.0.0 PORT=1337 PUBLIC_URL=https://your-app.strapi.cloud # Database DATABASE_CLIENT=postgres DATABASE_HOST=your-cloud-host DATABASE_PORT=5432 DATABASE_NAME=your-db-name DATABASE_USERNAME=your-username DATABASE_PASSWORD=your-password DATABASE_SSL=true # Admin ADMIN_JWT_SECRET=your-jwt-secret API_TOKEN_SALT=your-token-salt APP_KEYS=your-app-keys # Media Storage AWS_ACCESS_KEY_ID=your-access-key AWS_ACCESS_SECRET=your-secret-key AWS_REGION=your-region AWS_BUCKET=your-bucket
-
Security Settings
// config/middleware.js module.exports = [ 'strapi::errors', { name: 'strapi::security', config: { contentSecurityPolicy: { useDefaults: true, directives: { 'connect-src': ["'self'", 'https:'], 'img-src': ["'self'", 'data:', 'blob:', 'https:'], 'media-src': ["'self'", 'data:', 'blob:', 'https:'], upgradeInsecureRequests: null, }, }, }, }, // ... other middleware ];
-
Connect to Strapi Cloud
# Login to Strapi Cloud strapi login # Link your project strapi link
-
Deploy Your Application
# Build your application npm run build # Deploy to Strapi Cloud strapi deploy
-
Monitor Deployment
# Check deployment status strapi deployment:info # View logs strapi logs
-
Verify Functionality
- Check admin panel access
- Verify API endpoints
- Test media uploads
- Check user authentication
- Test custom plugins
-
Update DNS Settings
# Example DNS records CNAME your-domain.com your-app.strapi.cloud
-
Set Up Monitoring
// config/middlewares.js module.exports = [ 'strapi::logger', // ... other middleware ];
-
Database Connection Issues
# Check connection psql -h your-cloud-host -U your-cloud-user -d your-cloud-db # Common fixes: # - Check IP whitelist # - Verify SSL settings # - Check credentials
-
Media Upload Problems
# Verify S3 permissions aws s3 ls s3://your-bucket # Check bucket policy aws s3api get-bucket-policy --bucket your-bucket
-
Deployment Failures
# Check build logs npm run build -- --debug # Verify dependencies npm audit # Clear cache npm cache clean --force
-
Backup Strategy
- Keep regular database backups
- Back up media files
- Document configuration changes
- Store secrets securely
-
Performance Optimization
// config/server.js module.exports = ({ env }) => ({ // ... other config middlewares: { timeout: env.int('REQUEST_TIMEOUT', 100000), load: { before: ['responseTime', 'logger'], after: ['parser', 'router'], }, }, });
Need help? Contact Strapi Cloud support or check the official documentation.