How to Host Multiple Apps on One Account with Git Deployment
Manage Node.js, Python, PHP, Ruby, and WordPress apps from one account with isolated containers per app.
In This Guide
How to Host Multiple Apps on One Account with Git Deployment
If you're a developer managing more than one project — side projects, client work, internal tools, staging environments — you need a hosting setup that handles multiple apps without turning into a management nightmare.
The old approach: one VPS, multiple apps, Nginx reverse proxy, manual SSL certificates, pm2 process list, and the constant fear that one misbehaving app will crash the whole server.
The better approach: each app in its own isolated container, independent deployments, independent SSL, independent process management. Git push to deploy any of them from the same account.
The Problem With Shared VPS Multi-App Hosting
Running multiple Node.js, Python, or PHP apps on a single VPS is the traditional approach. Here's what it actually involves:
Initial setup per app:
1. Create a new directory: /var/www/app-name/
2. Install runtime (Node.js version, Python virtualenv, PHP-FPM pool)
3. Configure Nginx server block with proxy_pass to your app's port
4. Get SSL certificate via Certbot
5. Set up systemd service or pm2 config
6. Configure log rotation
Ongoing management:
- Multiple pm2 processes with different ports: pm2 list shows 8 apps, you've forgotten which port does what
- One app with a memory leak takes down RAM for all others
- Node.js version conflicts between apps (Node 18 for App A, Node 22 for App B)
- SSL certificate renewals sometimes fail silently
- "which Nginx config is for which domain?" archaeology
The VPS approach works. It just accumulates complexity and a constant low-level maintenance tax.
Container-Per-App: What Changes
When each app runs in its own container:
- Independent runtimes: App A on Node.js 18, App B on Python 3.12, App C on PHP 8.3, App D on Ruby 3.3 — no version conflicts, no virtualenv management
- Independent resource allocation: App A's memory leak doesn't affect App B's response time
- Independent SSL: Each domain has its own certificate, auto-renewed
- Independent deployment:
git pushfor App A doesn't touch App B or C - Independent logs:
apexweave logs app-a.apexweaveapp.comshows only that app's logs - Centralised management: All apps visible in one dashboard, one CLI
How to Manage Multiple Apps on ApexWeave
Step 1: Provision an app for each project
Each app you create on ApexWeave gets:
- Its own container
- Its own private git repository
- Its own subdomain: your-app.apexweaveapp.com
- Its own SSL certificate
- Its own environment variable namespace
Step 2: Set up git remotes for each app
# App 1: Node.js API
cd ~/projects/api-service
git remote add apexweave https://git.apexweaveapp.com/username/api-service.git
# App 2: Next.js frontend
cd ~/projects/frontend
git remote add apexweave https://git.apexweaveapp.com/username/frontend.git
# App 3: Python worker service
cd ~/projects/worker
git remote add apexweave https://git.apexweaveapp.com/username/worker.git
# App 4: Laravel client site
cd ~/projects/client-site
git remote add apexweave https://git.apexweaveapp.com/username/client-site.git
Step 3: Deploy independently
# Deploy only the API
cd ~/projects/api-service
git push apexweave main
# Deploy only the frontend (API is unaffected)
cd ~/projects/frontend
git push apexweave main
# Deploy a hotfix to client site (other apps untouched)
cd ~/projects/client-site
git push apexweave main
Step 4: Manage all apps from one CLI
# View all your apps
apexweave apps
# Output:
# api-service.apexweaveapp.com Running Node.js 22
# frontend.apexweaveapp.com Running Node.js 22
# worker.apexweaveapp.com Running Python 3.12
# client-site.apexweaveapp.com Running PHP 8.3
# View logs for a specific app
apexweave logs api-service.apexweaveapp.com
# Check CPU/RAM usage
# Available in dashboard → each app's Overview tab
# Shell access to any app
apexweave bash api-service.apexweaveapp.com
apexweave bash client-site.apexweaveapp.com
Environment Variables: Isolated Per App
Each app's environment variables are completely independent. There's no risk of an API key from one project leaking into another:
# App 1 variables
apexweave env:set api-service.apexweaveapp.com DATABASE_URL=postgres://api-db...
apexweave env:set api-service.apexweaveapp.com STRIPE_SECRET_KEY=sk_live_api...
# App 2 variables (completely separate)
apexweave env:set frontend.apexweaveapp.com NEXT_PUBLIC_API_URL=https://api.yourdomain.com
apexweave env:set frontend.apexweaveapp.com NEXTAUTH_SECRET=frontend-secret...
# View only this app's vars
apexweave env:list api-service.apexweaveapp.com
# Shows ONLY api-service variables, not frontend or worker
Connecting Multiple Apps Together
When you have an API + frontend + worker, they need to communicate. Here's how to wire them up:
API-to-Frontend Communication
Set the API's public URL as an environment variable in the frontend:
# First, set up custom domain for the API
apexweave domain:set api-service.apexweaveapp.com api.yourdomain.com
# Then, give the frontend the API URL
apexweave env:set frontend.apexweaveapp.com NEXT_PUBLIC_API_URL=https://api.yourdomain.com
apexweave env:set frontend.apexweaveapp.com API_URL=https://api.yourdomain.com
App-to-Database Communication
Each app that needs a database connects independently:
# API connects to its own database
apexweave env:set api-service.apexweaveapp.com DATABASE_URL=postgres://user:pass@dns.apexweaveapp.com:5432/api_db
# Worker connects to the same database
apexweave env:set worker.apexweaveapp.com DATABASE_URL=postgres://user:pass@dns.apexweaveapp.com:5432/api_db
# Or connect them via the dashboard's "Connect Database" feature
Shared Redis for Session/Cache
# Both API and worker use the same Redis instance
apexweave env:set api-service.apexweaveapp.com REDIS_URL=redis://:password@dns.apexweaveapp.com:6379
apexweave env:set worker.apexweaveapp.com REDIS_URL=redis://:password@dns.apexweaveapp.com:6379
Custom Domains for Multiple Apps
Each app gets its own custom domain:
# Main app
apexweave domain:set main-app.apexweaveapp.com yourdomain.com
# API subdomain
apexweave domain:set api-service.apexweaveapp.com api.yourdomain.com
# Admin panel
apexweave domain:set admin-panel.apexweaveapp.com admin.yourdomain.com
# Staging environment
apexweave domain:set frontend-staging.apexweaveapp.com staging.yourdomain.com
DNS setup at Cloudflare or your domain registrar:
@ A record → main-app server IP
api A record → api-service server IP
admin A record → admin-panel server IP
staging A record → frontend-staging server IP
All SSL certificates provision automatically within minutes of DNS propagation.
Staging + Production for Each App
For projects with multiple environments:
Option A: Branch-based (same repo, different deploys)
# Production: main branch → production app
cd my-app
git push apexweave main
# Staging: staging branch → staging app
git push staging-remote staging
Where staging-remote is a second ApexWeave app for staging:
git remote add staging-remote https://git.apexweaveapp.com/username/my-app-staging.git
Option B: GitHub Actions multi-environment
on:
push:
branches: [main, staging]
jobs:
deploy-staging:
if: github.ref == 'refs/heads/staging'
steps:
- run: curl -X POST "${{ secrets.STAGING_WEBHOOK }}"
deploy-production:
if: github.ref == 'refs/heads/main'
steps:
- run: curl -X POST "${{ secrets.PRODUCTION_WEBHOOK }}"
Deployment Schedule by App Type
Here's a typical schedule for a developer managing 4–6 apps:
Daily development apps (side projects, active client projects):
- Deploy on every merge to main
- Auto-deploy via webhook
Client sites (production, less frequent changes):
- Deploy weekly or on specific change requests
- Manual git push when changes are ready
- Rollback available if client reports issues
Internal tools:
- Deploy as needed
- Lower confidence required (internal users can tolerate occasional issues)
Staging environments:
- Deploy continuously (every push to staging branch)
- Never roll back (it's staging — just push a fix)
Monitoring Multiple Apps at Once
With multiple apps, you need visibility across all of them:
Dashboard: ApexWeave dashboard shows all apps with status badges — at a glance you can see which are Running, Stopped, or Deploying.
CLI multi-app monitoring:
# Quick health check across all apps
for app in api-service frontend worker client-site; do
echo "$app: $(curl -s -o /dev/null -w '%{http_code}' https://$app.apexweaveapp.com/health)"
done
Uptime monitoring: Set up UptimeRobot (free) with HTTP checks on each app's /health endpoint. You'll get an email or Slack notification if any app goes down.
External monitoring cron:
# Add to your monitoring setup
0 * * * * curl -sf https://api.yourdomain.com/health || curl -X POST https://hooks.slack.com/services/YOUR/SLACK/WEBHOOK -d '{"text":"API health check failed"}'
Real Example: Developer Managing 5 Apps
A freelance developer manages:
1. Personal portfolio (Next.js) — portfolio.devname.com
2. SaaS side project API (Node.js + PostgreSQL) — api.saasapp.com
3. SaaS side project frontend (React) — app.saasapp.com
4. Client A: Business site (WordPress) — clienta.com
5. Client B: E-commerce store (Laravel + MySQL) — clientb.com
Monthly workflow:
# Update portfolio (rare, maybe monthly)
cd portfolio && git push apexweave main
# SaaS API: deploy a new endpoint
cd saas-api
git commit -m "Add subscription billing endpoint"
git push apexweave main
# WordPress: client content update (they do this in WP admin, no git)
# Check logs if they report an issue:
apexweave wp-logs clienta.com
# Client B: deploy Laravel update
cd clientb
git push apexweave main
apexweave logs clientb.apexweaveapp.com
Total management overhead: Under 5 minutes per app per week for active projects. Zero maintenance for stable apps (the platform handles SSL renewal, security patches, container health).
The Advantages Over One Big VPS
| Factor | Single VPS, multiple apps | Container per app (ApexWeave) |
|---|---|---|
| Isolation | Process-level (pm2) | OS container-level |
| One app crashing | Can affect all apps | Only affects that container |
| Resource contention | Shared CPU/RAM | Reserved per container |
| Different runtimes | Complex (nvm, virtualenv, etc.) | Independent per container |
| SSL management | Manual Certbot | Auto per domain |
| Deployment | SSH + custom script | git push |
| Logs per app | journalctl -u app-name |
apexweave logs app.com |
| Rollback | Manual git reset + restart | Dashboard one-click |
| Maintenance | Your responsibility | Platform managed |
Manage all your apps with one CLI and git push deployment at apexweave.com/git-deployment.php.
Deploy Your App with Git Push
Automatic builds, environment variables, live logs, rollback, and custom domains. No server management required.
Deploy Free — No Card RequiredPowered by WHMCompleteSolution