forked from hetzneronline/community-content
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'hetzneronline:master' into master
- Loading branch information
Showing
6 changed files
with
735 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,126 @@ | ||
--- | ||
SPDX-License-Identifier: MIT | ||
path: "/tutorials/install-caprover" | ||
slug: "install-caprover" | ||
date: "2021-10-22" | ||
title: "Installing CapRover on Hetzner Cloud" | ||
short_description: "Install your own CapRover instance on a Hetzner Cloud server to easily deploy various apps" | ||
tags: ["Docker", "Lang:YAML"] | ||
author: "Kedas" | ||
author_link: "https://github.com/K3das" | ||
author_img: "https://avatars.githubusercontent.com/u/20052500?v=4" | ||
author_description: "" | ||
language: "en" | ||
available_languages: ["en"] | ||
header_img: "header-1" | ||
cta: "cloud" | ||
--- | ||
|
||
## Introduction | ||
|
||
CapRover is a sleek new way to easily deploy your own apps or an app from their large selection to a Cloud Server. CapRover has a nice web panel to manage your installation, view metrics, and launch new apps. I wouldn't recommend this if you have multiple people who need to connect to one server, due to there being only one login. | ||
|
||
**Prerequisites** | ||
|
||
- A fresh Hetzner Cloud server running Ubuntu **18.04** *(Ubuntu 20.04 could also work, but isn't fully compatible with CapRover - so use at your own risk)* that you have shell access to | ||
- Any domain | ||
|
||
## Step 1 - Install Docker | ||
|
||
Since CapRover runs on Docker, we'll need to install it. | ||
|
||
First - Update your server and install the required packages by running these commands: (Make sure you're logged into the `root` user, as this tutorial assumes you are) | ||
|
||
```bash | ||
apt-get update | ||
apt-get upgrade -y | ||
apt-get install curl -y | ||
``` | ||
|
||
Now we can proceed to installing Docker: | ||
|
||
```bash | ||
bash <(curl -s https://get.docker.com/) | ||
``` | ||
|
||
This command will install the latest version of Docker. You could now move on to running CapRover. | ||
|
||
## Step 2 - Connect your domain | ||
|
||
CapRover can run on both a root domain (EX: `*.example.com`) and a subdomain (EX: `*.foo.example.com`). | ||
|
||
Go to your domain's DNS management panel and create a new `A` record pointing to your server's IP address: | ||
|
||
- **TYPE:** `A` record | ||
- **HOST:** `*` (If you're using a subdomain set this to `*.<subdomain_name>`) | ||
- **POINTS TO:** (IP address of your server) | ||
- **TTL:** (Use the default TTL, or set it to `3600`) | ||
|
||
To verify that you correctly configured your domain, visit <https://mxtoolbox.com/DNSLookup.aspx>, input `foobar.<your_domain.com>` (`foobar.<subdomain_name>.<your_domain.com>` if you used a subdomain) and check if the domain resolves to the IP address you configured in your DNS settings. **DNS propagation can take a few minutes, so if it doesn't work, just wait some more.** It should take under 30 minutes for DNS to fully propagate. | ||
|
||
## Step 3 - Run CapRover | ||
|
||
CapRover simply runs on top of Docker, making it very modular, and can be installed with one command: | ||
|
||
```bash | ||
docker run -p 80:80 -p 443:443 -p 3000:3000 -v /var/run/docker.sock:/var/run/docker.sock -v /captain:/captain caprover/caprover | ||
``` | ||
|
||
Do not change the port mappings, as CapRover will not be able to run on different ports. | ||
|
||
## Step 4 - Setup CapRover | ||
|
||
Once the previous command has completed, and you waited 60 seconds for CapRover to fully start, you can attempt to login to the dashboard. You can find it at `http://captain.<your_domain.com>:3000/` (`http://captain.<subdomain_name>.<your_domain.com>:3000/` if you used a subdomain). **Note:** you should only use this URL for the initial setup. | ||
|
||
 | ||
|
||
The default password is `captain42` - **you should change it later** | ||
|
||
When you login you'll be greeted by the dashboard: | ||
|
||
 | ||
|
||
Enter your domain (or subdomain) and press "Update Domain". You'll be redirected to `http://captain.<your_domain.com>` - this is where you can now access your dashboard. Press "Enable HTTPS". Enter your email address in the popup (this is required for the Let's Encrypt certificate). Once it's done you can press "Force HTTPS" to make sure every request is redirected to `https://` | ||
|
||
Lastly, **don't forget to set a new password by going to "Settings" and filling out the "Change Password" form!** | ||
|
||
## Conclusion | ||
|
||
You know have a working CapRover instance 🎉! You can use their amazing docs to learn how to deploy existing One-Click Apps, or your own: | ||
|
||
**Enabling NetData Monitoring:** <https://caprover.com/docs/resource-monitoring.html> | ||
|
||
**Deploying a OneClick App:** <https://caprover.com/docs/one-click-apps.html> | ||
|
||
**Deployment Methods:** <https://caprover.com/docs/deployment-methods.html> | ||
|
||
##### License: MIT | ||
|
||
<!-- | ||
Contributor's Certificate of Origin | ||
By making a contribution to this project, I certify that: | ||
(a) The contribution was created in whole or in part by me and I have | ||
the right to submit it under the license indicated in the file; or | ||
(b) The contribution is based upon previous work that, to the best of my | ||
knowledge, is covered under an appropriate license and I have the | ||
right under that license to submit that work with modifications, | ||
whether created in whole or in part by me, under the same license | ||
(unless I am permitted to submit under a different license), as | ||
indicated in the file; or | ||
(c) The contribution was provided directly to me by some other person | ||
who certified (a), (b) or (c) and I have not modified it. | ||
(d) 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 license(s) involved. | ||
Signed-off-by: Michael Pigal <kedas@uncrftd.xyz> | ||
--> |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.