Hosting Multiple Apps on One VPS with Coolify

Team 4 min read

#coolify

#vps

#webdev

#docker

#nginx

Overview

Hosting more than one app on a single VPS can save costs and simplify maintenance. Coolify is a self-hosted platform that helps you deploy, manage, and route multiple Docker-based apps from a single control plane. This guide walks you through provisioning a VPS, installing Coolify, adding apps, and configuring domains and TLS.

Prerequisites

  • A VPS with Ubuntu 22.04+ (or Debian) and root or sudo access
  • A domain or subdomains you can point to the VPS IP
  • Basic familiarity with Docker concepts
  • Ability to open ports 80 and 443 on your firewall

Install Coolify on a VPS

  • Prepare the server:
    • Update packages and install Docker and Docker Compose
      • sudo apt update
      • sudo apt install -y docker.io docker-compose
    • Start and enable Docker:
      • sudo systemctl enable —now docker
  • Install Coolify (two common approaches):
  • Access Coolify:
  • Note: Coolify will run as a set of containers. Ensure your VPS has enough CPU/RAM for your planned apps.

Prepare DNS and TLS

  • For each app, decide on a domain or subdomain (e.g., app1.example.com, app2.example.com)
  • Point DNS A records for the domains to your VPS IP
  • In Coolify, each app can be assigned a domain and TLS can be managed automatically
  • Enable TLS with Let’s Encrypt for each domain via the Coolify UI; this will provision and renew certificates

Create Projects and Apps in Coolify

  • Create a new Project for each logical group of apps, or reuse a single project for multiple apps
  • Add an App to a Project:
    • Choose the source (Git repository) or a pre-built image
    • Configure build and start commands if needed (e.g., npm install, npm run build, npm start)
    • Expose the app’s port inside the container (Coolify handles routing to the correct port)
  • Set up environment variables, secrets, and persistent volumes as needed
  • Assign a domain to the app (e.g., app1.example.com) and enable TLS
  • Repeat for additional apps (app2, app3, etc.)

Routing, Reverse Proxy, and TLS

  • Coolify uses an integrated reverse proxy to route external requests to the correct app container
  • Each app can have its own domain or subdomain
  • TLS certificates are managed automatically via Let’s Encrypt
  • If you prefer, you can also integrate with an external reverse proxy, but Coolify’s built-in routing is designed to simplify multi-app setups

Resource and Security Best Practices

  • Allocate CPU/RAM per app according to expected load; avoid overcommitting
  • Use separate databases or storage volumes per app to avoid cross-contamination
  • Regularly back up app data and database dumps
  • Keep Coolify and all app images updated to receive security patches
  • Limit access to the Coolify interface with strong credentials and, if possible, IP allowlisting

Common Scenarios and Tips

  • Static sites + API apps: host the static frontend on one app and the API on another; route both via distinct domains or subpaths as needed
  • Different stacks (Node, Python, PHP): Coolify supports multiple runtimes; provide the correct start/build commands per app
  • Scaling: For higher load, you can distribute apps across more containers or upgrade the VPS resources; Coolify remains the single control plane

Troubleshooting

  • App not reachable after deployment:
    • Check that the domain’s DNS A record points to the VPS IP
    • Verify the app’s domain configuration in Coolify and ensure the app is running
    • Review container logs: docker-compose logs or Coolify UI logs
  • TLS/Certificate issues:
    • Ensure port 80/443 are open and not blocked by a firewall
    • Check that the domain resolves to the correct server and that Let’s Encrypt rate limits aren’t exceeded
  • Port conflicts:
    • Make sure each app can bind to its internal container port and that Coolify’s router is mapping to the right public port

Conclusion

Hosting multiple applications on a single VPS with Coolify simplifies deployment, domain management, and TLS provisioning. By provisioning a capable VPS, installing Coolify, and carefully configuring domains and app settings, you can efficiently run several projects side by side with centralized control and automated certificates. As you scale, you can fine-tune resources, back up data, and maintain consistent workflows across all apps.