Deploy your websites to any VPS server in just 3 simple steps!
This script makes it super easy to get your website online. It automatically sets up everything you need - no technical knowledge required!
- 🌐 Makes your website live - Your site will be accessible on the internet
- 🔒 Adds security (HTTPS) - Makes your site secure with free SSL certificates
- 📁 Downloads your code - Automatically gets your code from GitHub/GitLab
- 🛡️ Keeps backups - Saves your old files before making changes
- ⚡ Works everywhere - Compatible with DigitalOcean, AWS, Linode, and more
- Beginners who want to deploy their first website
- Students learning web development
- Developers who want to save time on deployment
- Anyone who finds server setup confusing
- Buy a VPS from any provider (DigitalOcean, AWS, Linode, etc.)
- Make sure your domain points to your VPS IP address
- Connect to your VPS using SSH
# Download the script
wget https://raw.githubusercontent.com/shahirislam/web-deploy-script/main/deploy.sh
# Make it executable
chmod +x deploy.sh
# Run it (this will ask you some questions)
sudo ./deploy.sh
The script will ask you:
- What's your website address? (like: mywebsite.com)
- Do you have code on GitHub? (yes/no)
- Is your code public or private? (public/private)
- Do you want HTTPS security? (yes/no)
Your website is now live! Visit your domain to see it working.
- A VPS server (any Linux server works)
- A domain name (like mywebsite.com)
- Your domain pointing to your VPS (ask your domain provider for help)
- Code on GitHub/GitLab (or you can upload files manually)
- Basic terminal knowledge (just copy-paste commands)
sudo ./deploy.sh
# The script asks:
# Enter project subdomain: myawesomeapp.com
# Does the project repository exist remotely? (y/n): y
# Is the repository public or private? (public/private): public
# Enter the Git repository HTTPS URL: https://github.com/yourusername/yourapp.git
# Do you want to enable HTTPS? (y/n): y
# Enter email for Let's Encrypt: your@email.com
# Result: Your website is live at https://myawesomeapp.com
sudo ./deploy.sh
# The script asks:
# Enter project subdomain: mysecretapp.com
# Does the project repository exist remotely? (y/n): y
# Is the repository public or private? (public/private): private
# Enter the Git repository HTTPS URL: https://github.com/yourusername/privateapp.git
# Enter git username: your-github-username
# Enter Personal Access Token: ghp_xxxxxxxxxxxx
# Do you want to enable HTTPS? (y/n): y
# Result: Your private website is live at https://mysecretapp.com
sudo ./deploy.sh
# The script asks:
# Enter project subdomain: mylocalapp.com
# Does the project repository exist remotely? (y/n): n
# Do you want to enable HTTPS? (y/n): y
# Result: Upload your files to /var/www/mylocalapp.com/ manually
What's wrong: Your domain might not be pointing to your server How to fix:
- Check if your domain points to your server:
nslookup yourdomain.com
- Wait a few minutes for DNS to update
- Make sure your VPS is running
What's wrong: Your GitHub token might be wrong How to fix:
- Go to GitHub → Settings → Developer settings → Personal access tokens
- Create a new token with full repository access
- Use the new token when the script asks
What's wrong: SSL certificate setup failed How to fix:
- Make sure your domain points to your server
- Wait 5-10 minutes and try again
- Check if port 443 is open on your server
What's wrong: Missing permissions or internet How to fix:
- Make sure you're using
sudo ./deploy.sh
- Check your internet connection
- Make sure you have enough disk space
Method 1: Using GitHub (Recommended)
# Make changes to your code
git add .
git commit -m "Updated my website"
git push origin main
# Re-run the deployment script
sudo ./deploy.sh
Method 2: Direct Upload
# Edit files directly on your server
sudo nano /var/www/yourdomain.com/index.html
# See if your website is running
sudo systemctl status nginx
# Check your website logs
sudo tail -f /var/log/nginx/yourdomain.com_error.log
# Test your website
curl http://yourdomain.com
Your SSL certificates renew automatically, but you can check them:
sudo certbot certificates
After deployment, you'll find your files here:
- Your website files:
/var/www/yourdomain.com/
- Website settings:
/etc/nginx/sites-available/yourdomain.com.conf
- Website logs:
/var/log/nginx/yourdomain.com_*.log
- SSL certificates:
/etc/letsencrypt/live/yourdomain.com/
- Backups:
/var/backups/
# Check if your website is running
sudo systemctl status nginx
# Test your website configuration
sudo nginx -t
# See what's wrong (if anything)
sudo tail -f /var/log/nginx/error.log
# Restart your website
sudo systemctl restart nginx
- Check the troubleshooting section above
- Look at the error messages - they usually tell you what's wrong
- Make sure your domain points to your server
- Try with a simple HTML file first
This script handles the technical stuff so you can focus on building your website. But if you want to learn more:
- Nginx: The web server that serves your website
- SSL/HTTPS: Makes your website secure
- Git: Version control for your code
- VPS: Virtual Private Server - your website's home
Found a bug or want to add a feature? We'd love your help!
- Fork this repository
- Make your changes
- Test them
- Submit a pull request
This project is open source and free to use.
Created by Shahir Islam
This script was built to make web deployment simple and accessible for everyone. Whether you're just starting out or you're an experienced developer, this tool will save you time and frustration.
Visit shahirislam.me to see more projects and tutorials.
Made with ❤️ for the developer community
Happy coding! 🚀