Getting Started
Ready to launch your rocket? 🚀 Follow this guide to set up your first deployment.
Prerequisites
Before installing Mushak, ensure you have:
- A Server: A fresh Linux VPS (Ubuntu strongly recommended).
- You need
rootorsudoaccess. - SSH key authentication should be enabled.
- You need
- A Domain: A domain name (e.g.,
myapp.com) with an A record pointing to your server's IP. - Local Machine: You need
gitinstalled.
Installation
Quick Install (macOS & Linux)
The easiest way to install Mushak is via the installation script, which downloads the latest release for your platform:
curl -sL https://raw.githubusercontent.com/hmontazeri/mushak/main/install.sh | shmacOS (Homebrew)
NOTE
Homebrew support is coming soon.
Binary Installation
Download the latest binary for your platform from the GitHub Releases page.
Move it to your path:
chmod +x mushak
sudo mv mushak /usr/local/bin/From Source
If you have Go installed:
git clone https://github.com/hmontazeri/mushak.git
cd mushak
go build -o mushak ./cmd/mushak
sudo mv mushak /usr/local/bin/First Deployment
1. Initialize
Go to your project directory (which must contain a Dockerfile or docker-compose.yml).
mushak init root@your-server-ipMushak will prompt you for:
- Domain: The domain name for your app (e.g.,
myapp.com) - App name: Defaults to your current directory name (press Enter to use default)
You can also provide these values as flags if you prefer:
mushak init root@your-server-ip --domain myapp.com --app my-app-nameThis command will:
- SSH into your server
- Install Docker, Git, and Caddy automatically
- Set up the remote git repository
- Detect and upload
.env.prodif it exists (you'll be prompted)
If you have a .env.prod file, Mushak will detect it and ask if you want to upload it to the server:
✓ Found local .env.prod with 5 variables (DATABASE_PASSWORD, API_KEY, +3 more)
→ Upload to server? [Y/n]:2. Deploy
Now, simply run:
mushak deployWatch as your deployment happens! Mushak will:
- Check for environment files (prompt to upload if missing)
- Push your code
- Build containers on the server
- Run health checks
- Switch traffic with zero downtime
3. Verify
Visit https://myapp.com. Your site should be live with a secure HTTPS certificate provisioned automatically by Caddy.
Troubleshooting
SSH Setup
If you're using a non-default SSH key (not ~/.ssh/id_rsa), add it to your SSH agent:
# Add your SSH key
ssh-add ~/.ssh/id_ed25519
# Verify it's added
ssh-add -lOr specify the key explicitly with the --key flag when running mushak init.