diff --git a/tutorials/install-and-configure-coolify-on-linux/01.en.md b/tutorials/install-and-configure-coolify-on-linux/01.en.md new file mode 100644 index 000000000..bd779963b --- /dev/null +++ b/tutorials/install-and-configure-coolify-on-linux/01.en.md @@ -0,0 +1,165 @@ +--- +SPDX-License-Identifier: MIT +path: "/tutorials/install-and-configure-coolify-on-linux" +slug: "install-and-configure-coolify-on-linux +date: "2024-10-10" +title: "Install and Configure Coolify on Linux" +short_description: "This tutorial explains how to Install and Configure Coolify on Linux" +tags: ["Coolify", "Debian", "Linux"] +author: "ShadowArcanist" +author_link: "https://github.com/ShadowArcanist" +author_img: "https://avatars.githubusercontent.com/u/162910371" +author_description: "ShadowArcanist is a content creator who produces tutorial videos on YouTube, writes guides, and contributes to open-source projects." +language: "en" +available_languages: ["en"] +header_img: "header-5" +cta: "cloud" +--- + +## Introduction + +Coolify is a free and open-source tool that lets you easily host your own applications, databases, or services (like WordPress, Formbricks, and Grafana) without needing to manage servers yourself. + +In this tutorial, you’ll learn how to install and set up Coolify on a Linux server. + +We’ll use Debian 12 (Bookworm) in this tutorial, but these steps should also work on other Linux distributions supported by Coolify. + +**Prerequisites** + +This tutorial has been tested on a Hetzner Cloud Server but should work with any cloud server. + +* A Cloud server (A fresh new server is recommended) + * An operating system supported by Coolify. You can find the list of supported operating systems in the [Official Coolify Documentation](https://coolify.io/docs/installation#supported-operating-systems) + * Server architecture (either AMD64 or Arm64) + * Minimum specifications for Coolify: 2 vCPUs, 2GB RAM, and 30+ GB storage. These are the minimum requirements, so consider choosing a server with higher specifications based on your needs. + * Access to the root user + * An SSH key for authentication (recommended) +* If you need assistance setting up your new cloud server, you can follow the [official Hetzner Cloud Server Setup Guide](https://docs.hetzner.com/cloud/servers/getting-started/creating-a-server). Please skip any steps related to firewall configuration. + +**Example terminology** + +* **Server** + * Public IPv4: `203.0.113.1` + +* **Domains** + * Domain: `example.com` + * Subdomain: `sub.example.com` + +These examples are for tutorial purposes only, make sure to replace them with your own information. + +## Step 1 - Configure Your Server + +First, connect to your server using SSH. If you’re not logged in as the root user, use the following command to access a root shell: + +```bash +sudo -i +``` + +> Note: The Coolify installation will fail if it's not run as root. + +### Step 1.1 - Update Your Server and Install Required Packages + +Start by updating your server: + +```bash +apt update && apt dist-upgrade -y +``` + +Then, install `curl`, which is needed for the Coolify installation script: + +```bash +apt install curl -y +``` + +## Step 2 - Install Coolify + +Run the installation script to install Coolify: + +```bash +curl -fsSL https://cdn.coollabs.io/coolify/install.sh | bash +``` + +> You can view the source code for the installation script in the [Official Coolify Repository](https://github.com/coollabsio/coolify/blob/main/scripts/install.sh) + +Once the installation is complete, you’ll see the following message: + +```bash +Congratulations, Your Coolify instance is ready to use. + +Please visit http://203.0.113.1:8000 to get started. +``` + +## Step 3 - Create a New Account on Coolify + +Visit the link provided in the terminal after installing Coolify. + +You’ll be prompted to create an account. Enter your details and set up your account. + +> Make sure to write down your account email and password, as you’ll need them to log in to Coolify in the future. + +## Step 4 - Configure the Domain for Coolify + +After creating your account on Coolify, the first thing you need to do is set up a domain. Accessing Coolify via `http://203.0.113.1:8000` (your server IP and port) is insecure because it uses `HTTP`. + +Once you connect a domain, Coolify will automatically generate and set up the proxy and SSL certificates. + +Go to the DNS management page on your domain provider’s dashboard (like GoDaddy, Namecheap, etc.) and add two new A records as shown below: + +![DNS Records for Coolify](images/dns-records-for-coolify.png) + +> `@` allows Coolify to use the root of your domain. + +> `*` allows Coolify to create and use any subdomain. + +Note: If you don’t see the option for `Auto` under TTL, select the lowest value available. + +Next, go to the settings page in Coolify and add the domain you want to use for accessing Coolify in the "Instance Domain" field: + +![Coolify Instance Domain](images/coolify-instance-domain.png) + +Finally, visit your instance domain in your browser. You should be able to access Coolify with HTTPS (it may take a minute or two for the website to be accessible for the first time). + +## Step 5 - Set Up the Firewall + +On the Hetzner dashboard, navigate to the Firewalls section and create three new inbound rules as shown below: + +![Hetzner Firewall Configuration for Coolify](images/hetzner-firewall-configuration-for-coolify.png) + +> Port `22` is for SSH connections. + +> Port `80` and `443` are for the reverse proxy. + +Once you enable the Firewall, you won’t be able to access Coolify via `http://203.0.113.1:8000` (your server IP and port). You can only access Coolify through the instance domain you set up in the previous step (`Step 4`). + +All applications deployed on Coolify will use `HTTPS`, as Coolify automatically handles the reverse proxy and SSL certificates. + +## Conclusion + +We installed Coolify and set up a custom domain for it on our server. Additionally, we configured the firewall rules to restrict access to our server and Coolify from the server IP address, allowing access only via our custom domain. + +I highly recommend checking out the [Official Coolify Documentation](https://coolify.io/docs/) for more information. + +This tutorial will help you get started with Coolify, and you can learn more about setting up services, databases, and much more from their documentation. + +##### License: MIT + + \ No newline at end of file diff --git a/tutorials/install-and-configure-coolify-on-linux/images/coolify-instance-domain.png b/tutorials/install-and-configure-coolify-on-linux/images/coolify-instance-domain.png new file mode 100644 index 000000000..7b1e0e520 Binary files /dev/null and b/tutorials/install-and-configure-coolify-on-linux/images/coolify-instance-domain.png differ diff --git a/tutorials/install-and-configure-coolify-on-linux/images/dns-records-for-coolify.png b/tutorials/install-and-configure-coolify-on-linux/images/dns-records-for-coolify.png new file mode 100644 index 000000000..07fe93992 Binary files /dev/null and b/tutorials/install-and-configure-coolify-on-linux/images/dns-records-for-coolify.png differ diff --git a/tutorials/install-and-configure-coolify-on-linux/images/hetzner-firewall-configuration-for-coolify.png b/tutorials/install-and-configure-coolify-on-linux/images/hetzner-firewall-configuration-for-coolify.png new file mode 100644 index 000000000..6e614d7a4 Binary files /dev/null and b/tutorials/install-and-configure-coolify-on-linux/images/hetzner-firewall-configuration-for-coolify.png differ