Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
justserdar committed Mar 5, 2025
2 parents 879fc7c + f45ec1f commit e77b108
Show file tree
Hide file tree
Showing 9 changed files with 111 additions and 44 deletions.
7 changes: 7 additions & 0 deletions docs/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -525,6 +525,13 @@ export default defineConfig({
{ text: 'Dashboard Very Slow ', link: '/troubleshoot/dashboard/dashboard-slow-performance' },
]
},
{
text: 'Server',
collapsed: true,
items: [
{ text: 'Crash During Build ', link: '/troubleshoot/server/crash-during-build' },
]
},
],
},
{
Expand Down
4 changes: 2 additions & 2 deletions docs/get-started/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Coolify is a software that makes self-hosting simple and powerful. It lets you r

With Coolify, you get full control over your projects, your data, and your costs. It’s completely free to use, open-source, and has no features locked behind a paywall.

Think of Coolify as your personal alternative to cloud platforms like [Vercel↗](https://vercel.com), [Railway↗](https://railway.com/), or [Heroku↗](https://www.heroku.com/), but without the huge bills or privacy trade-offs.
Think of Coolify as your personal alternative to cloud platforms like [Vercel↗](https://vercel.com?utm_source=coolify.io), [Railway↗](https://railway.com/?utm_source=coolify.io), or [Heroku↗](https://www.heroku.com/?utm_source=coolify.io), but without the huge bills or privacy trade-offs.


## What Coolify Is Not
Expand Down Expand Up @@ -62,7 +62,7 @@ Coolify delivers unbeatable advantages for developers who want to self-host. Her
## Getting Started with Coolify
Before you jump into using Coolify, it’s worth understanding a few key concepts to make your journey smoother.

Learn about servers, SSH access, and how Coolify manages your projects by checking out our [concepts guide↗](https://coolify.io/docs/get-started/concepts).
Learn about servers, SSH access, and how Coolify manages your projects by checking out our [concepts guide↗](/get-started/concepts).

You have two ways to use Coolify:
- [Self-Host Coolify](#self-host-coolify)
Expand Down
4 changes: 2 additions & 2 deletions docs/knowledge-base/proxy/traefik/basic-auth.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ Then you need to add the middleware to the router label, and since one or more m

For example you would update the current line

`traefik.http.routers.http-0-wc04wo4ow4scokgsw8wow4s8.middlewares=redirect-to-https`
`traefik.http.routers.https-0-wc04wo4ow4scokgsw8wow4s8.middlewares=gzip`

to:

Expand Down Expand Up @@ -126,4 +126,4 @@ This will generate a password hash for the user `test` with the password `test`.
You can then replace `test` with the desired username and password. Then substitute the generated hash in the `basicauth.users` label above.

Note: the `htpasswd` command is available on most Linux distributions. It is part of the `apache2-utils` package on Debian/Ubuntu and
can be found [here](https://httpd.apache.org/docs/current/programs/htpasswd.html).
can be found [here](https://httpd.apache.org/docs/current/programs/htpasswd.html).
61 changes: 22 additions & 39 deletions docs/knowledge-base/server/introduction.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,97 +2,80 @@
title: "Introduction"
description: "A guide to help you understand what kind of servers you can connect to Coolify."
---

# Introduction

No matter what type of server you have (localhost or remote), you need the following requirements.

- Connectivity

- SSH connectivity between Coolify and the server with SSH key authentication.
::: success Tip
Your public key should be added to **root** user's `~/.ssh/authorized_keys`.
If you do not have an SSH Key, you can generate on through Coolify with a simple button or you can generate one manually.
If you do not have an SSH Key, you can generate one through Coolify with a simple button or you can generate one manually.
:::


- Docker Engine (24+)

## Types

- **Localhost**: the server where Coolify is installed.
- **Remote Server**: could be any remote linux server.

## Localhost

To be able to manage the server where Coolify is running on, the docker container of Coolify should reach the host server through SSH.

You can use localhost as a server where all your resources are running, but it is not recommended as high server usage could prevent to use Coolify.

::: success Tip
You can use our [Cloud](https://app.coolify.io) version, so you only need a server for your resources.

You will get a few other things included with the cloud version, like free email notifications, s3 storage, etc based on your subscription plan.
:::

## Remote Server

You can connect any type of servers to Coolify. It could be a VPS, a Raspberry PI or a laptop running Linux.

::: success Tip
If you don't have a server or server provider yet, we prefer to use Hetzner.

You can use our [referral link](https://coolify.io/hetzner). It will help us to keep the project alive.

:::

### Cloudflare Tunnels

You can also set to use Cloudflare Tunnels for your servers.

::: success Tip
Coolify does not install cloudflared on your server, it needs to be done prior.

All it does is to add the right ProxyCommand (`ProxyCommand <ip / hostname> access ssh --hostname %h`) to all ssh connections.

:::

## Features
## Multiple Server Configuration
When setting up multiple servers in Coolify, it's important to understand how traffic routing works:

### Disk Cleanup threshold
- **Independent Proxy Handling**: Each server runs its own proxy that handles incoming requests for applications deployed on that server.
- **Direct Traffic Flow**: Traffic for applications deployed on secondary servers goes directly to those servers, not through the main Coolify server.
- **DNS Configuration**: You must point your domain DNS to the IP address of the server where the application is deployed, not to the main Coolify server.

You can read more about Automated Cleanup and the disk cleanup threshold in the [Automated Cleanup](/knowledge-base/server/automated-cleanup) section.
### Role of the Main Server
The main Coolify server:
- Provides the management UI to control applications on all connected servers
- Performs SSH connections to secondary servers for deployment and management
- Conducts health checks and monitoring
- Does NOT route or proxy traffic to applications on secondary servers

### Wildcard Domain
This architecture reduces latency and improves application performance by eliminating additional network hops.

## Features
### Disk Cleanup threshold
You can read more about Automated Cleanup and the disk cleanup threshold in the [Automated Cleanup](/knowledge-base/server/automated-cleanup) section.
### Wildcard Domain
You can set a wildcard domain (`example: http://example.com`) to your server, so you can easily assign generated domains to all the resources connected to this server.

Example: Your application UUID is `vgsco4o`.

If you have the example set, you will get the following FQDN: `http://vgsco4o.example.com`

If you do not have any wildcard domain set, Coolify will generate a [sslip.io](https://sslip.io) domain, which is free & magical domain that you can use anywhere.

In this case, it will be: `http://vgsco4o.127.0.0.1.sslip.io`, where `127.0.0.1` is your server's IP.

## Proxy
::: success Tip
When using multiple servers, remember that each application's domain must point to the specific server where that application is deployed.
:::

## Proxy
- **Traefik**: Automatically configure Traefik(v2) based on your deployed resources.
- **Custom/None**: You will configure a proxy manually (only for advanced users).

::: success Tip
Soon we will support Nginx & Caddy with fully automated configuration.
:::

### Traefik

Coolify uses Traefik proxy by default to create a reverse proxy for your resources.

::: success Tip
Traefik only starts when you did not select any proxy for your server and you
have a domain configured for a resource or your Coolify instance itself.
:::

#### Dynamic Configuration

You can always add your own configuration to the proxy settings from Coolify's UI (`/server/<server_uuid>/proxy`).
You can always add your own configuration to the proxy settings from Coolify's UI (`/server/<server_uuid>/proxy`).
Binary file added docs/public/images/sponsors/comp.webp
Binary file not shown.
Binary file added docs/public/images/sponsors/yaak.webp
Binary file not shown.
18 changes: 17 additions & 1 deletion docs/resource/sponsors.md
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const sponsors = [
name: 'CodeRabbit',
title: 'Cut Code Review Time & Bugs in Half',
links: [
{ icon: 'expedia', link: 'https://www.coderabbit.io/?ref=coolify.io&utm_source=coolify.io' }
{ icon: 'expedia', link: 'https://coderabbit.ai/?ref=coolify.io' }
]
},
{
Expand Down Expand Up @@ -244,6 +244,22 @@ const sponsors = [
{ icon: 'expedia', link: 'https://liquidweb.com/?utm_source=coolify.io' }
]
},
{
avatar: '../images/sponsors/yaak.webp',
name: 'Yaak',
title: 'The API client for modern developers',
links: [
{ icon: 'expedia', link: 'https://yaak.app/?ref=coolify.io' }
]
},
{
avatar: '../images/sponsors/comp.webp',
name: 'Comp AI',
title: 'The open-source platform that automates compliance.',
links: [
{ icon: 'expedia', link: 'https://www.trycomp.ai/?ref=coolify.io' }
]
},
{
avatar: '../images/team/coollabs.webp',
name: 'You Company?',
Expand Down
4 changes: 4 additions & 0 deletions docs/services/supabase.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,10 @@ The open source Firebase alternative.

<ZoomableImage src="/docs/images/services/supabase-selfhost.webp" />

## Notes

You can find your anonymous key in the **Environment Variables** area under **SERVICE_SUPABASEANON_KEY**.

## Links

- [Official Website ›](https://supabase.io)
Expand Down
57 changes: 57 additions & 0 deletions docs/troubleshoot/server/crash-during-build.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
---
title: Server Crash During Build
---


# Server Unresponsive or crashes during Build
Coolify supports two deployment methods: deploying with a **pre-built** Docker image and building from **source**. Knowing which method you're using can help you fix performance problems better.

## 1. Understanding Your Deployment Method
### A. Pre-built Docker Image Deployment
- Coolify starts a new container from an existing Docker image that you or someone else have already built.

### B. Building from Source Deployment
- Coolify builds a Docker image on your server using your application’s source code, and then starts a container from this newly created docker image.


## 2. Troubleshooting Performance Issues
If your server becomes very slow or crashes during deployment, consider the following steps based on your deployment method:

- **For Pre-built Image Deployments:**
- Since the container is started directly from the docker image, high resource usage is most likely due to the running application.
- **Solution:** Consider upgrading your server to better accommodate the application’s resource needs.

- **For Building from Source Deployments:**
- The docker image build process can overload your server.
- **Solution:** Offload the build process to an external [Build Server](/knowledge-base/server/build-server), or use an alternative method such as [GitHub Actions](https://docs.github.com/en/actions) to handle the build externally. Alternatively, consider upgrading your server’s capacity.

- **General Tip:**
SSH into your server and run `htop` to monitor processes. Identify any process consuming excessive resources, and kill it if necessary.


## 3. Offloading Builds with GitHub Actions
To reduce the load on your server during deployments, follow this process:
- **Process:**
- Use [GitHub Actions](https://docs.github.com/en/actions) to build your Docker image externally.
- Push the built image to a container registry (e.g., [GitHub Container Registry](https://docs.github.com/en/packages/working-with-a-github-packages-registry/working-with-the-container-registry)).
- Once the build is complete, configure coolify to deploy the new version automatically.

- **Benefit:** This method minimizes the workload on your server, resulting in smoother deployments.

- **Learn More:** [View our GitHub Actions workflow file](https://github.com/coollabsio/documentation-coolify/blob/main/.github/workflows/production-build.yml).


## Summary
- **Deployment Methods:**
- **Pre-built Image:** Directly starts a container from an existing image.
- **Building from Source:** Builds an image on your server before starting a container.
- **Troubleshooting:**
- Identify if the issue is due to the application’s resource needs or the image build process.
- Upgrade your server or offload builds as needed.
- **Optimization:**
- Using GitHub Actions to build Docker images externally can significantly reduce local resource usage.

## Support
If none of the above steps work, then follow this:
- **Community Help:** Join our [Discord community ↗](https://coolify.io/discord) and create a post in the support forum channel.
- **What to Share:** The issue you are facing, your server specifications (e.g., operating system, CPU, RAM), and a description of the steps you’ve already tried.

0 comments on commit e77b108

Please sign in to comment.