diff --git a/community-tutorials/setup-vercel-like-paas-with-coolify/01-en.md b/community-tutorials/setup-vercel-like-paas-with-coolify/01-en.md new file mode 100644 index 00000000..f88a7b90 --- /dev/null +++ b/community-tutorials/setup-vercel-like-paas-with-coolify/01-en.md @@ -0,0 +1,446 @@ +--- +title: Setup Vercel-like PaaS on Netcup VPS with Coolify +description: Learn how to set up Coolify, a self-hosted Vercel/Netlify/Heroku alternative, on a Netcup VPS to create your own Platform-as-a-Service for deploying applications. +level: intermediate +updated_at: 2025-01-11 +slug: setup-vercel-like-paas-netcup-coolify +author_name: Augment Agent +author_url: https://github.com/augmentcode +author_image: +author_bio: +tags: [coolify, paas, docker, deployment, self-hosted, vercel, netlify, heroku, ubuntu, vps] +netcup_product_url: https://www.netcup.de/bestellen/produkt.php?produkt=2991 +language: en +available_languages: [en, de] +--- + +# Introduction + +This tutorial describes how to set up Coolify on a Netcup VPS to create your own Platform-as-a-Service (PaaS) similar to Vercel, Netlify, or Heroku. Coolify is a free, open-source, self-hosted alternative that allows you to deploy applications, databases, and services with ease while maintaining full control over your infrastructure. + +With Coolify, you can deploy static sites, APIs, backends, databases, and more with support for all major frameworks including Next.js, React, Vue, Node.js, Python, PHP, and many others. It provides features like automatic SSL certificates, Git integration, one-click deployments, and a powerful web interface. + +The reading time of this tutorial is about 10 minutes; implementation will take approximately 30-45 minutes. + +This tutorial assumes basic knowledge of Linux command line, SSH, and Docker concepts. All examples were tested on Ubuntu 22.04 (January 2025) and can be adapted to other supported distributions. + +The tutorial uses the example hostname `v12345678.quicksrv.de` and IP `203.0.113.1`. Replace these with your actual server details when following the steps. + +# Requirements + +For this setup, you'll need: + +* A Netcup VPS with at least 2 CPU cores, 2GB RAM, and 30GB storage +* Ubuntu 22.04 or another supported Linux distribution +* SSH access to your server +* A domain name (optional but recommended for SSL certificates) +* Basic understanding of Docker and web deployments + +The recommended Netcup VPS for this tutorial is [VPS 1000 G10](https://www.netcup.de/bestellen/produkt.php?produkt=2991) or higher, which provides sufficient resources for running Coolify and multiple applications. + +# Step 1 - Initial Server Setup + +After provisioning your Netcup VPS and receiving the login credentials via email, perform the initial server configuration: + +1. Connect to your server via SSH: + ```bash + ssh root@v12345678.quicksrv.de + ``` + +2. Update the system packages: + ```bash + apt update && apt upgrade -y + ``` + +3. Change the root password for security: + ```bash + passwd + ``` + +4. Install essential packages: + ```bash + apt install curl wget git jq openssl ufw -y + ``` + +5. Configure the firewall to allow necessary ports: + ```bash + ufw allow 22/tcp # SSH + ufw allow 80/tcp # HTTP + ufw allow 443/tcp # HTTPS + ufw allow 8000/tcp # Coolify Dashboard + ufw --force enable + ``` + +# Step 2 - Install Docker + +Coolify requires Docker Engine version 24 or higher. Install Docker using the official installation script: + +1. Download and run the Docker installation script: + ```bash + curl -fsSL https://get.docker.com -o get-docker.sh + sh get-docker.sh + ``` + +2. Start and enable Docker service: + ```bash + systemctl start docker + systemctl enable docker + ``` + +3. Verify Docker installation: + ```bash + docker --version + docker run hello-world + ``` + +> **Note** +> Docker installed via snap is not supported by Coolify. Always use the official Docker installation method. + +# Step 3 - Install Coolify + +Coolify provides an automated installation script that handles all the setup: + +1. Run the Coolify installation script: + ```bash + curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash + ``` + +2. The installation script will: + - Install required dependencies + - Configure Docker settings + - Set up directories at `/data/coolify` + - Generate SSH keys for server management + - Start Coolify services + +3. Wait for the installation to complete. You'll see output similar to: + ``` + Coolify installation completed successfully! + You can access Coolify at: http://203.0.113.1:8000 + ``` + +# Step 4 - Initial Coolify Configuration + +1. Open your web browser and navigate to your Coolify instance: + ``` + http://203.0.113.1:8000 + ``` + +2. You'll be redirected to a registration page. Create your admin account immediately: + - Enter your email address + - Create a strong password + - Confirm the password + +> **Warning** +> Create your admin account immediately after installation. Anyone who accesses the registration page first will gain full control of your server. + +3. After registration, you'll be logged into the Coolify dashboard. + +# Step 5 - Configure Your First Server + +1. In the Coolify dashboard, navigate to "Servers" in the sidebar. + +2. You should see "localhost" already configured. Click on it to verify the connection. + +3. Coolify will validate the server connection. If successful, you'll see a green status indicator. + +4. (Optional) Add additional servers by clicking "Add Server" and providing SSH connection details. + +# Step 6 - Set Up Domain and SSL (Optional) + +To use custom domains with automatic SSL certificates: + +1. Configure your domain's DNS to point to your server's IP address: + - Create an A record pointing your domain to `203.0.113.1` + - For subdomains, create additional A records as needed + +2. In Coolify, when deploying applications, you can specify custom domains. + +3. Coolify will automatically obtain and renew Let's Encrypt SSL certificates for your domains. + +# Step 7 - Deploy Your First Application + +Let's deploy a simple Next.js application to test your setup: + +1. In the Coolify dashboard, click "Add Resource" → "Application". + +2. Choose "Public Repository" and enter a sample repository: + ``` + https://github.com/vercel/next.js/tree/canary/examples/hello-world + ``` + +3. Configure the application: + - **Name**: `hello-world-nextjs` + - **Build Pack**: Nixpacks (auto-detected) + - **Port**: 3000 + - **Domain**: Leave empty for now or add your custom domain + +4. Click "Save" and then "Deploy". + +5. Monitor the deployment logs in real-time. Once completed, you can access your application via the generated URL. + +## Alternative: Deploy a Static Site + +You can also deploy a static site for testing: + +1. Create a new application with a static site repository: + ``` + https://github.com/microsoft/vscode-docs + ``` + +2. Configure as a static site: + - **Build Pack**: Static + - **Build Command**: `npm run build` (if applicable) + - **Publish Directory**: `dist` or `build` + +## Git Integration Setup + +For automatic deployments from your own repositories: + +1. Go to "Sources" in the Coolify dashboard. +2. Add your Git provider (GitHub, GitLab, Bitbucket). +3. Configure webhooks for automatic deployments on push. +4. Set up branch-specific deployments for staging/production. + +# Step 8 - Explore Coolify Features + +Now that Coolify is running, explore its powerful features: + +## Applications +- Deploy from Git repositories (GitHub, GitLab, Bitbucket) +- Support for multiple frameworks and languages +- Automatic builds and deployments +- Environment variable management +- Pull request deployments + +## Databases +- One-click database deployments (PostgreSQL, MySQL, MongoDB, Redis) +- Automatic backups to S3-compatible storage +- Database management interface + +## Services +- Pre-configured services like WordPress, Ghost, Plausible Analytics +- Docker Compose support for complex applications +- Service discovery and networking + +## Monitoring and Management +- Real-time application logs +- Resource usage monitoring +- Health checks and alerts +- Team collaboration features + +# Step 9 - Security Considerations + +1. **Firewall Configuration**: Ensure only necessary ports are open: + ```bash + ufw status + ``` + +2. **Regular Updates**: Keep Coolify updated: + ```bash + cd /data/coolify/source + ./upgrade.sh + ``` + +3. **Backup Strategy**: Configure automatic backups for your databases and important data. + +4. **SSH Security**: Consider disabling password authentication and using SSH keys only: + ```bash + # Edit SSH config + nano /etc/ssh/sshd_config + + # Set these values: + # PasswordAuthentication no + # PubkeyAuthentication yes + + # Restart SSH service + systemctl restart sshd + ``` + +5. **Domain Security**: Use HTTPS for all applications and enable HSTS headers. + +6. **Resource Monitoring**: Monitor server resources to prevent overload: + ```bash + # Check system resources + htop + df -h + docker stats + ``` + +# Step 10 - Troubleshooting Common Issues + +## Coolify Dashboard Not Accessible + +If you can't access the Coolify dashboard: + +1. Check if Coolify services are running: + ```bash + cd /data/coolify/source + docker compose ps + ``` + +2. Restart Coolify if needed: + ```bash + docker compose down + docker compose up -d + ``` + +3. Check firewall settings: + ```bash + ufw status + ufw allow 8000/tcp + ``` + +## Application Deployment Failures + +Common deployment issues and solutions: + +1. **Build Failures**: Check the build logs in the Coolify dashboard for specific error messages. + +2. **Port Conflicts**: Ensure your application uses the correct port (usually 3000 for Node.js apps). + +3. **Environment Variables**: Verify all required environment variables are set in the application configuration. + +4. **Resource Limits**: Check if your server has sufficient CPU and memory: + ```bash + free -h + top + ``` + +## Docker Issues + +If Docker-related problems occur: + +1. Check Docker service status: + ```bash + systemctl status docker + ``` + +2. Clean up Docker resources: + ```bash + docker system prune -a + ``` + +3. Restart Docker service: + ```bash + systemctl restart docker + ``` + +# Step 11 - Advanced Configuration + +## Custom Docker Networks + +For advanced networking setups: + +1. Create custom Docker networks: + ```bash + docker network create --driver bridge my-custom-network + ``` + +2. Configure applications to use specific networks in Coolify's application settings. + +## Environment-Specific Deployments + +Set up different environments (staging, production): + +1. Create separate projects in Coolify for each environment. +2. Use different branches for automatic deployments. +3. Configure environment-specific variables and domains. + +## Database Backups to External Storage + +Configure automatic backups to AWS S3 or compatible storage: + +1. In Coolify, go to "S3 Storages" and add your storage provider. +2. Configure backup schedules for your databases. +3. Test backup and restore procedures regularly. + +## Load Balancing and High Availability + +For production setups requiring high availability: + +1. Set up multiple Netcup VPS instances. +2. Configure Coolify on each server. +3. Use a load balancer (like Cloudflare or HAProxy) to distribute traffic. +4. Implement database replication for data redundancy. + +## Custom SSL Certificates + +If you need custom SSL certificates instead of Let's Encrypt: + +1. Upload your certificates to Coolify. +2. Configure applications to use custom certificates. +3. Set up certificate renewal procedures. + +# Conclusion + +You now have a fully functional Vercel-like PaaS running on your Netcup VPS with Coolify. This setup provides: + +- **Cost Efficiency**: Avoid expensive cloud platform fees (save hundreds or thousands per month) +- **Full Control**: Complete ownership of your infrastructure and data +- **Flexibility**: Deploy any Docker-compatible application or service +- **Scalability**: Add more servers as your needs grow +- **Security**: Self-hosted solution with no vendor lock-in +- **Performance**: Direct control over server resources and optimization + +Your Coolify instance can now deploy static sites, web applications, APIs, databases, and services with the same ease as commercial PaaS platforms, but with complete control over your infrastructure. + +## Real-World Use Cases + +With your Coolify setup, you can now deploy: + +- **Frontend Applications**: React, Vue, Angular, Next.js, Nuxt.js apps +- **Backend APIs**: Node.js, Python (Django/Flask), PHP (Laravel), Ruby on Rails +- **Static Sites**: Documentation sites, blogs, portfolios +- **Databases**: PostgreSQL, MySQL, MongoDB, Redis with automatic backups +- **Services**: WordPress, Ghost, Plausible Analytics, Uptime Kuma, and 100+ more + +## Cost Comparison + +A typical Vercel Pro plan costs $20/month per member plus usage fees. With a Netcup VPS 1000 G10 at approximately €5.95/month, you get: +- Unlimited deployments +- No bandwidth limits +- Full server resources +- Complete data ownership +- Support for unlimited team members + +## Next Steps + +1. **Explore Services**: Browse Coolify's extensive library of one-click services +2. **Set Up Monitoring**: Deploy Uptime Kuma or Grafana for monitoring +3. **Configure Backups**: Set up automated backups to external S3-compatible storage +4. **Team Collaboration**: Configure team access and permissions for your organization +5. **CI/CD Integration**: Integrate with GitHub Actions, GitLab CI, or other CI/CD tools +6. **Scale Horizontally**: Add more Netcup VPS instances as your needs grow +7. **Custom Domains**: Configure your own domains with automatic SSL certificates + +## Getting Help + +- **Documentation**: [Coolify Official Docs](https://coolify.io/docs/) +- **Community**: [Coolify Discord](https://coollabs.io/discord) with 16,000+ members +- **GitHub**: [Coolify Repository](https://github.com/coollabsio/coolify) for issues and contributions +- **Netcup Support**: For VPS-related questions and support + +Your self-hosted PaaS is now ready to handle production workloads while giving you the freedom and cost savings that come with self-hosting. + +# Licence + +[MIT](https://github.com/netcup-community/community-tutorials/blob/main/LICENSE) + +Copyright (c) 2025 netcup + +Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + +# Contributor's Certificate of Origin +By making a contribution to this project, I certify that: + + 1) The contribution was created in whole or in part by me and I have the right to submit it under the licence indicated in the file; or + + 2) The contribution is based upon previous work that, to the best of my knowledge, is covered under an appropriate licence and I have the right under that licence to submit that work with modifications, whether created in whole or in part by me, under the same licence (unless I am permitted to submit under a different licence), as indicated in the file; or + + 3) The contribution was provided directly to me by some other person who certified (a), (b) or (c) and I have not modified it. + + 4) I understand and agree that this project and the contribution are public and that a record of the contribution (including all personal information I submit with it, including my sign-off) is maintained indefinitely and may be redistributed consistent with this project or the licence(s) involved. diff --git a/community-tutorials/setup-vercel-like-paas-with-coolify/02-de.md b/community-tutorials/setup-vercel-like-paas-with-coolify/02-de.md new file mode 100644 index 00000000..d443fcf9 --- /dev/null +++ b/community-tutorials/setup-vercel-like-paas-with-coolify/02-de.md @@ -0,0 +1,446 @@ +--- +title: Vercel-ähnliche PaaS auf Netcup VPS mit Coolify einrichten +description: Lernen Sie, wie Sie Coolify, eine selbst gehostete Vercel/Netlify/Heroku-Alternative, auf einem Netcup VPS einrichten, um Ihre eigene Platform-as-a-Service für die Bereitstellung von Anwendungen zu erstellen. +level: intermediate +updated_at: 2025-01-11 +slug: setup-vercel-like-paas-netcup-coolify +author_name: Augment Agent +author_url: https://github.com/augmentcode +author_image: +author_bio: +tags: [coolify, paas, docker, deployment, self-hosted, vercel, netlify, heroku, ubuntu, vps] +netcup_product_url: https://www.netcup.de/bestellen/produkt.php?produkt=2991 +language: de +available_languages: [en, de] +--- + +# Einführung + +Dieses Tutorial beschreibt, wie Sie Coolify auf einem Netcup VPS einrichten, um Ihre eigene Platform-as-a-Service (PaaS) ähnlich wie Vercel, Netlify oder Heroku zu erstellen. Coolify ist eine kostenlose, quelloffene, selbst gehostete Alternative, mit der Sie Anwendungen, Datenbanken und Services einfach bereitstellen können, während Sie die vollständige Kontrolle über Ihre Infrastruktur behalten. + +Mit Coolify können Sie statische Websites, APIs, Backends, Datenbanken und mehr bereitstellen, mit Unterstützung für alle wichtigen Frameworks wie Next.js, React, Vue, Node.js, Python, PHP und viele andere. Es bietet Funktionen wie automatische SSL-Zertifikate, Git-Integration, Ein-Klick-Deployments und eine leistungsstarke Web-Oberfläche. + +Die Lesezeit dieses Tutorials beträgt etwa 10 Minuten; die Implementierung dauert etwa 30-45 Minuten. + +Dieses Tutorial setzt grundlegende Kenntnisse der Linux-Kommandozeile, SSH und Docker-Konzepte voraus. Alle Beispiele wurden auf Ubuntu 22.04 (Januar 2025) getestet und können an andere unterstützte Distributionen angepasst werden. + +Das Tutorial verwendet den Beispiel-Hostnamen `v12345678.quicksrv.de` und die IP `203.0.113.1`. Ersetzen Sie diese durch Ihre tatsächlichen Serverdetails, wenn Sie den Schritten folgen. + +# Voraussetzungen + +Für diese Einrichtung benötigen Sie: + +* Einen Netcup VPS mit mindestens 2 CPU-Kernen, 2GB RAM und 30GB Speicher +* Ubuntu 22.04 oder eine andere unterstützte Linux-Distribution +* SSH-Zugang zu Ihrem Server +* Einen Domainnamen (optional, aber empfohlen für SSL-Zertifikate) +* Grundlegendes Verständnis von Docker und Web-Deployments + +Der empfohlene Netcup VPS für dieses Tutorial ist [VPS 1000 G10](https://www.netcup.de/bestellen/produkt.php?produkt=2991) oder höher, der ausreichende Ressourcen für den Betrieb von Coolify und mehreren Anwendungen bietet. + +# Schritt 1 - Erste Server-Einrichtung + +Nach der Bereitstellung Ihres Netcup VPS und dem Erhalt der Anmeldedaten per E-Mail führen Sie die erste Serverkonfiguration durch: + +1. Verbinden Sie sich per SSH mit Ihrem Server: + ```bash + ssh root@v12345678.quicksrv.de + ``` + +2. Aktualisieren Sie die Systempakete: + ```bash + apt update && apt upgrade -y + ``` + +3. Ändern Sie das Root-Passwort aus Sicherheitsgründen: + ```bash + passwd + ``` + +4. Installieren Sie wichtige Pakete: + ```bash + apt install curl wget git jq openssl ufw -y + ``` + +5. Konfigurieren Sie die Firewall für die notwendigen Ports: + ```bash + ufw allow 22/tcp # SSH + ufw allow 80/tcp # HTTP + ufw allow 443/tcp # HTTPS + ufw allow 8000/tcp # Coolify Dashboard + ufw --force enable + ``` + +# Schritt 2 - Docker installieren + +Coolify benötigt Docker Engine Version 24 oder höher. Installieren Sie Docker mit dem offiziellen Installationsskript: + +1. Laden Sie das Docker-Installationsskript herunter und führen Sie es aus: + ```bash + curl -fsSL https://get.docker.com -o get-docker.sh + sh get-docker.sh + ``` + +2. Starten und aktivieren Sie den Docker-Service: + ```bash + systemctl start docker + systemctl enable docker + ``` + +3. Überprüfen Sie die Docker-Installation: + ```bash + docker --version + docker run hello-world + ``` + +> **Hinweis** +> Docker, das über snap installiert wurde, wird von Coolify nicht unterstützt. Verwenden Sie immer die offizielle Docker-Installationsmethode. + +# Schritt 3 - Coolify installieren + +Coolify bietet ein automatisiertes Installationsskript, das die gesamte Einrichtung übernimmt: + +1. Führen Sie das Coolify-Installationsskript aus: + ```bash + curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash + ``` + +2. Das Installationsskript wird: + - Erforderliche Abhängigkeiten installieren + - Docker-Einstellungen konfigurieren + - Verzeichnisse unter `/data/coolify` einrichten + - SSH-Schlüssel für die Serververwaltung generieren + - Coolify-Services starten + +3. Warten Sie, bis die Installation abgeschlossen ist. Sie sehen eine Ausgabe ähnlich wie: + ``` + Coolify installation completed successfully! + You can access Coolify at: http://203.0.113.1:8000 + ``` + +# Schritt 4 - Erste Coolify-Konfiguration + +1. Öffnen Sie Ihren Webbrowser und navigieren Sie zu Ihrer Coolify-Instanz: + ``` + http://203.0.113.1:8000 + ``` + +2. Sie werden zu einer Registrierungsseite weitergeleitet. Erstellen Sie sofort Ihr Admin-Konto: + - Geben Sie Ihre E-Mail-Adresse ein + - Erstellen Sie ein starkes Passwort + - Bestätigen Sie das Passwort + +> **Warnung** +> Erstellen Sie Ihr Admin-Konto sofort nach der Installation. Jeder, der zuerst auf die Registrierungsseite zugreift, erhält die vollständige Kontrolle über Ihren Server. + +3. Nach der Registrierung werden Sie in das Coolify-Dashboard eingeloggt. + +# Schritt 5 - Ihren ersten Server konfigurieren + +1. Navigieren Sie im Coolify-Dashboard zu "Servers" in der Seitenleiste. + +2. Sie sollten "localhost" bereits konfiguriert sehen. Klicken Sie darauf, um die Verbindung zu überprüfen. + +3. Coolify wird die Serververbindung validieren. Bei Erfolg sehen Sie einen grünen Statusindikator. + +4. (Optional) Fügen Sie zusätzliche Server hinzu, indem Sie auf "Add Server" klicken und SSH-Verbindungsdetails angeben. + +# Schritt 6 - Domain und SSL einrichten (Optional) + +Um benutzerdefinierte Domains mit automatischen SSL-Zertifikaten zu verwenden: + +1. Konfigurieren Sie das DNS Ihrer Domain so, dass es auf die IP-Adresse Ihres Servers zeigt: + - Erstellen Sie einen A-Record, der Ihre Domain auf `203.0.113.1` zeigt + - Für Subdomains erstellen Sie zusätzliche A-Records nach Bedarf + +2. In Coolify können Sie beim Bereitstellen von Anwendungen benutzerdefinierte Domains angeben. + +3. Coolify wird automatisch Let's Encrypt SSL-Zertifikate für Ihre Domains beziehen und erneuern. + +# Schritt 7 - Ihre erste Anwendung bereitstellen + +Lassen Sie uns eine einfache Next.js-Anwendung bereitstellen, um Ihre Einrichtung zu testen: + +1. Klicken Sie im Coolify-Dashboard auf "Add Resource" → "Application". + +2. Wählen Sie "Public Repository" und geben Sie ein Beispiel-Repository ein: + ``` + https://github.com/vercel/next.js/tree/canary/examples/hello-world + ``` + +3. Konfigurieren Sie die Anwendung: + - **Name**: `hello-world-nextjs` + - **Build Pack**: Nixpacks (automatisch erkannt) + - **Port**: 3000 + - **Domain**: Lassen Sie es vorerst leer oder fügen Sie Ihre benutzerdefinierte Domain hinzu + +4. Klicken Sie auf "Save" und dann auf "Deploy". + +5. Überwachen Sie die Deployment-Logs in Echtzeit. Nach Abschluss können Sie über die generierte URL auf Ihre Anwendung zugreifen. + +## Alternative: Eine statische Website bereitstellen + +Sie können auch eine statische Website zum Testen bereitstellen: + +1. Erstellen Sie eine neue Anwendung mit einem Repository für statische Websites: + ``` + https://github.com/microsoft/vscode-docs + ``` + +2. Konfigurieren Sie als statische Website: + - **Build Pack**: Static + - **Build Command**: `npm run build` (falls zutreffend) + - **Publish Directory**: `dist` oder `build` + +## Git-Integration einrichten + +Für automatische Deployments aus Ihren eigenen Repositories: + +1. Gehen Sie zu "Sources" im Coolify-Dashboard. +2. Fügen Sie Ihren Git-Anbieter hinzu (GitHub, GitLab, Bitbucket). +3. Konfigurieren Sie Webhooks für automatische Deployments bei Push. +4. Richten Sie branch-spezifische Deployments für Staging/Produktion ein. + +# Schritt 8 - Coolify-Funktionen erkunden + +Jetzt, da Coolify läuft, erkunden Sie seine leistungsstarken Funktionen: + +## Anwendungen +- Bereitstellung aus Git-Repositories (GitHub, GitLab, Bitbucket) +- Unterstützung für mehrere Frameworks und Sprachen +- Automatische Builds und Deployments +- Verwaltung von Umgebungsvariablen +- Pull-Request-Deployments + +## Datenbanken +- Ein-Klick-Datenbankbereitstellungen (PostgreSQL, MySQL, MongoDB, Redis) +- Automatische Backups zu S3-kompatiblem Speicher +- Datenbank-Verwaltungsoberfläche + +## Services +- Vorkonfigurierte Services wie WordPress, Ghost, Plausible Analytics +- Docker Compose-Unterstützung für komplexe Anwendungen +- Service Discovery und Netzwerk + +## Überwachung und Verwaltung +- Echtzeit-Anwendungslogs +- Ressourcenverbrauchsüberwachung +- Gesundheitschecks und Benachrichtigungen +- Team-Kollaborationsfunktionen + +# Schritt 9 - Sicherheitsüberlegungen + +1. **Firewall-Konfiguration**: Stellen Sie sicher, dass nur notwendige Ports geöffnet sind: + ```bash + ufw status + ``` + +2. **Regelmäßige Updates**: Halten Sie Coolify aktuell: + ```bash + cd /data/coolify/source + ./upgrade.sh + ``` + +3. **Backup-Strategie**: Konfigurieren Sie automatische Backups für Ihre Datenbanken und wichtigen Daten. + +4. **SSH-Sicherheit**: Erwägen Sie, die Passwort-Authentifizierung zu deaktivieren und nur SSH-Schlüssel zu verwenden: + ```bash + # SSH-Konfiguration bearbeiten + nano /etc/ssh/sshd_config + + # Diese Werte setzen: + # PasswordAuthentication no + # PubkeyAuthentication yes + + # SSH-Service neu starten + systemctl restart sshd + ``` + +5. **Domain-Sicherheit**: Verwenden Sie HTTPS für alle Anwendungen und aktivieren Sie HSTS-Header. + +6. **Ressourcenüberwachung**: Überwachen Sie Serverressourcen, um Überlastung zu vermeiden: + ```bash + # Systemressourcen prüfen + htop + df -h + docker stats + ``` + +# Schritt 10 - Häufige Probleme beheben + +## Coolify-Dashboard nicht erreichbar + +Wenn Sie nicht auf das Coolify-Dashboard zugreifen können: + +1. Prüfen Sie, ob Coolify-Services laufen: + ```bash + cd /data/coolify/source + docker compose ps + ``` + +2. Starten Sie Coolify bei Bedarf neu: + ```bash + docker compose down + docker compose up -d + ``` + +3. Überprüfen Sie die Firewall-Einstellungen: + ```bash + ufw status + ufw allow 8000/tcp + ``` + +## Anwendungsbereitstellungsfehler + +Häufige Deployment-Probleme und Lösungen: + +1. **Build-Fehler**: Überprüfen Sie die Build-Logs im Coolify-Dashboard auf spezifische Fehlermeldungen. + +2. **Port-Konflikte**: Stellen Sie sicher, dass Ihre Anwendung den korrekten Port verwendet (normalerweise 3000 für Node.js-Apps). + +3. **Umgebungsvariablen**: Überprüfen Sie, ob alle erforderlichen Umgebungsvariablen in der Anwendungskonfiguration gesetzt sind. + +4. **Ressourcenlimits**: Prüfen Sie, ob Ihr Server ausreichend CPU und Speicher hat: + ```bash + free -h + top + ``` + +## Docker-Probleme + +Bei Docker-bezogenen Problemen: + +1. Docker-Service-Status prüfen: + ```bash + systemctl status docker + ``` + +2. Docker-Ressourcen bereinigen: + ```bash + docker system prune -a + ``` + +3. Docker-Service neu starten: + ```bash + systemctl restart docker + ``` + +# Schritt 11 - Erweiterte Konfiguration + +## Benutzerdefinierte Docker-Netzwerke + +Für erweiterte Netzwerk-Setups: + +1. Benutzerdefinierte Docker-Netzwerke erstellen: + ```bash + docker network create --driver bridge my-custom-network + ``` + +2. Konfigurieren Sie Anwendungen zur Verwendung spezifischer Netzwerke in Coolifys Anwendungseinstellungen. + +## Umgebungsspezifische Deployments + +Verschiedene Umgebungen einrichten (Staging, Produktion): + +1. Erstellen Sie separate Projekte in Coolify für jede Umgebung. +2. Verwenden Sie verschiedene Branches für automatische Deployments. +3. Konfigurieren Sie umgebungsspezifische Variablen und Domains. + +## Datenbank-Backups zu externem Speicher + +Automatische Backups zu AWS S3 oder kompatiblem Speicher konfigurieren: + +1. Gehen Sie in Coolify zu "S3 Storages" und fügen Sie Ihren Speicheranbieter hinzu. +2. Konfigurieren Sie Backup-Zeitpläne für Ihre Datenbanken. +3. Testen Sie regelmäßig Backup- und Wiederherstellungsverfahren. + +## Load Balancing und Hochverfügbarkeit + +Für Produktionssetups, die Hochverfügbarkeit erfordern: + +1. Richten Sie mehrere Netcup VPS-Instanzen ein. +2. Konfigurieren Sie Coolify auf jedem Server. +3. Verwenden Sie einen Load Balancer (wie Cloudflare oder HAProxy) zur Verkehrsverteilung. +4. Implementieren Sie Datenbankreplikation für Datenredundanz. + +## Benutzerdefinierte SSL-Zertifikate + +Wenn Sie benutzerdefinierte SSL-Zertifikate anstelle von Let's Encrypt benötigen: + +1. Laden Sie Ihre Zertifikate in Coolify hoch. +2. Konfigurieren Sie Anwendungen zur Verwendung benutzerdefinierter Zertifikate. +3. Richten Sie Verfahren zur Zertifikatserneuerung ein. + +# Fazit + +Sie haben jetzt eine voll funktionsfähige Vercel-ähnliche PaaS auf Ihrem Netcup VPS mit Coolify eingerichtet. Diese Einrichtung bietet: + +- **Kosteneffizienz**: Vermeiden Sie teure Cloud-Plattform-Gebühren (sparen Sie Hunderte oder Tausende pro Monat) +- **Vollständige Kontrolle**: Komplettes Eigentum an Ihrer Infrastruktur und Ihren Daten +- **Flexibilität**: Bereitstellung jeder Docker-kompatiblen Anwendung oder jeden Services +- **Skalierbarkeit**: Fügen Sie weitere Server hinzu, wenn Ihre Anforderungen wachsen +- **Sicherheit**: Selbst gehostete Lösung ohne Vendor Lock-in +- **Leistung**: Direkte Kontrolle über Serverressourcen und Optimierung + +Ihre Coolify-Instanz kann jetzt statische Websites, Webanwendungen, APIs, Datenbanken und Services mit der gleichen Einfachheit wie kommerzielle PaaS-Plattformen bereitstellen, aber mit vollständiger Kontrolle über Ihre Infrastruktur. + +## Reale Anwendungsfälle + +Mit Ihrer Coolify-Einrichtung können Sie jetzt bereitstellen: + +- **Frontend-Anwendungen**: React, Vue, Angular, Next.js, Nuxt.js Apps +- **Backend-APIs**: Node.js, Python (Django/Flask), PHP (Laravel), Ruby on Rails +- **Statische Websites**: Dokumentationsseiten, Blogs, Portfolios +- **Datenbanken**: PostgreSQL, MySQL, MongoDB, Redis mit automatischen Backups +- **Services**: WordPress, Ghost, Plausible Analytics, Uptime Kuma und 100+ weitere + +## Kostenvergleich + +Ein typischer Vercel Pro-Plan kostet $20/Monat pro Mitglied plus Nutzungsgebühren. Mit einem Netcup VPS 1000 G10 für etwa €5,95/Monat erhalten Sie: +- Unbegrenzte Deployments +- Keine Bandbreitenlimits +- Vollständige Serverressourcen +- Komplettes Dateneigentum +- Unterstützung für unbegrenzte Teammitglieder + +## Nächste Schritte + +1. **Services erkunden**: Durchsuchen Sie Coolifys umfangreiche Bibliothek von Ein-Klick-Services +2. **Überwachung einrichten**: Stellen Sie Uptime Kuma oder Grafana für die Überwachung bereit +3. **Backups konfigurieren**: Richten Sie automatische Backups zu externem S3-kompatiblem Speicher ein +4. **Team-Zusammenarbeit**: Konfigurieren Sie Teamzugang und Berechtigungen für Ihre Organisation +5. **CI/CD-Integration**: Integrieren Sie mit GitHub Actions, GitLab CI oder anderen CI/CD-Tools +6. **Horizontal skalieren**: Fügen Sie weitere Netcup VPS-Instanzen hinzu, wenn Ihre Anforderungen wachsen +7. **Benutzerdefinierte Domains**: Konfigurieren Sie Ihre eigenen Domains mit automatischen SSL-Zertifikaten + +## Hilfe erhalten + +- **Dokumentation**: [Coolify Offizielle Docs](https://coolify.io/docs/) +- **Community**: [Coolify Discord](https://coollabs.io/discord) mit 16.000+ Mitgliedern +- **GitHub**: [Coolify Repository](https://github.com/coollabsio/coolify) für Issues und Beiträge +- **Netcup Support**: Für VPS-bezogene Fragen und Support + +Ihre selbst gehostete PaaS ist jetzt bereit, Produktionsworkloads zu bewältigen und Ihnen die Freiheit und Kosteneinsparungen zu bieten, die mit Self-Hosting einhergehen. + +# Lizenz + +[MIT](https://github.com/netcup-community/community-tutorials/blob/main/LICENSE) + +Copyright (c) 2025 netcup + +Hiermit wird unentgeltlich jeder Person, die eine Kopie der Software und der zugehörigen Dokumentationsdateien (die "Software") erhält, die Erlaubnis erteilt, sie uneingeschränkt zu nutzen, einschließlich und ohne Beschränkung der Rechte zur Nutzung, zum Kopieren, Modifizieren, Zusammenführen, Veröffentlichen, Verteilen, Unterlizenzieren und/oder Verkaufen von Kopien der Software, und Personen, denen diese Software überlassen wird, dies unter den folgenden Bedingungen zu gestatten: + +Der obige Urheberrechtsvermerk und dieser Erlaubnisvermerk sind in allen Kopien oder Teilkopien der Software beizulegen. + +DIE SOFTWARE WIRD OHNE JEDE AUSDRÜCKLICHE ODER IMPLIZIERTE GARANTIE BEREITGESTELLT, EINSCHLIEßLICH DER GARANTIE ZUR BENUTZUNG FÜR DEN VORGESEHENEN ODER EINEN BESTIMMTEN ZWECK SOWIE JEGLICHER RECHTSVERLETZUNG, JEDOCH NICHT DARAUF BESCHRÄNKT. IN KEINEM FALL SIND DIE AUTOREN ODER COPYRIGHTINHABER FÜR JEGLICHEN SCHADEN ODER SONSTIGE ANSPRÜCHE HAFTBAR ZU MACHEN, OB INFOLGE DER ERFÜLLUNG EINES VERTRAGES, EINES DELIKTES ODER ANDERS IM ZUSAMMENHANG MIT DER SOFTWARE ODER SONSTIGER VERWENDUNG DER SOFTWARE ENTSTANDEN. + +# Herkunftszertifikat des Beitragenden +Durch einen Beitrag zu diesem Projekt bestätige ich, dass: + + 1) Der Beitrag ganz oder teilweise von mir erstellt wurde und ich das Recht habe, ihn unter der in der Datei angegebenen Lizenz einzureichen; oder + + 2) Der Beitrag auf früheren Arbeiten basiert, die meines Wissens unter einer angemessenen Lizenz stehen, und ich habe das Recht unter dieser Lizenz, diese Arbeit mit Änderungen, ob ganz oder teilweise von mir erstellt, unter derselben Lizenz einzureichen (es sei denn, mir ist erlaubt, unter einer anderen Lizenz einzureichen), wie in der Datei angegeben; oder + + 3) Der Beitrag wurde mir direkt von einer anderen Person zur Verfügung gestellt, die (a), (b) oder (c) bestätigt hat, und ich habe ihn nicht modifiziert. + + 4) Ich verstehe und stimme zu, dass dieses Projekt und der Beitrag öffentlich sind und dass eine Aufzeichnung des Beitrags (einschließlich aller persönlichen Informationen, die ich damit einreiche, einschließlich meiner Abmeldung) auf unbestimmte Zeit aufbewahrt und im Einklang mit diesem Projekt oder den beteiligten Lizenzen weiterverbreitet werden kann.