Skip to content

Commit

Permalink
recommend to use Ubuntu 24.04 LTS, update docker installation to repo…
Browse files Browse the repository at this point in the history
…sitory method instead of snap.

remove sudo from docker compose execution

remove copied content from docker's website and place only links
  • Loading branch information
agalitsyn committed Feb 4, 2025
1 parent f86156a commit 1cbea1e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 22 deletions.
33 changes: 16 additions & 17 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Huly Self-Hosted

Please use this README if you want to deploy Huly on your server with `docker compose`. I'm using a Basic Droplet on
Digital Ocean with Ubuntu 23.10, but these instructions can be easily adapted for any Linux distribution.
Please use this README if you want to deploy Huly on your server with `docker compose`. I'm using a Basic Droplet on Digital Ocean with Ubuntu 24.04, but these instructions can be easily adapted for any Linux distribution.

> [!NOTE]
> Huly is quite resource-heavy, so I recommend using a Droplet with 2 vCPUs and 4GB of RAM. Droplets with less RAM may
Expand All @@ -11,15 +10,21 @@ If you prefer Kubernetes deployment, there is a sample Kubernetes configuration

## Installing `nginx` and `docker`

First, let's install `nginx` and `docker` using the commands below if you have not already installed them on your
machine.
First, update repositories cache:

```bash
sudo apt update
```

Now, install `nginx`:

```bash
sudo apt install nginx
sudo snap install docker
```

Install docker using the [recommended method](https://docs.docker.com/engine/install/ubuntu/) from docker website.
Afterwards perform [post-installation steps](https://docs.docker.com/engine/install/linux-postinstall/). Pay attention to 3rd step with `newgrp docker` command, it needed for correct execution in setup script.

## Clone the `huly-selfhost` repository and configure `nginx`

Next, let's clone the `huly-selfhost` repository and configure Huly.
Expand Down Expand Up @@ -72,8 +77,8 @@ sudo npm install -g web-push

Generate VAPID Keys. Run the following command to generate a VAPID key pair:

```bash
web-push generate-vapid-keys
```
web-push generate-vapid-keys
```

It will generate both keys that looks like this:
Expand Down Expand Up @@ -206,14 +211,11 @@ self-hosted Huly, perform the following steps:
You can configure a Huly instance to authorize users (sign-in/sign-up) using an OpenID Connect identity provider (IdP).

### On the IdP side

1. Create a new OpenID application.
* Use `{huly_account_svc}/auth/openid/callback` as the sign-in redirect URI. The `huly_account_svc` is the hostname
for the account service of the deployment, which should be accessible externally from the client/browser side. In
the provided example setup, the account service runs on port 3000.
* Use `{huly_account_svc}/auth/openid/callback` as the sign-in redirect URI. The `huly_account_svc` is the hostname for the account service of the deployment, which should be accessible externally from the client/browser side. In the provided example setup, the account service runs on port 3000.

**URI Example:**
- `http://huly.mydomain.com:3000/auth/openid/callback`
- `http://huly.mydomain.com:3000/auth/openid/callback`

2. Configure user access to the application as needed.

Expand All @@ -239,14 +241,11 @@ sign-in/sign-up pages.
You can also configure a Huly instance to use GitHub OAuth for user authorization (sign-in/sign-up).

### On the GitHub side

1. Create a new GitHub OAuth application.
* Use `{huly_account_svc}/auth/github/callback` as the sign-in redirect URI. The `huly_account_svc` is the hostname
for the account service of the deployment, which should be accessible externally from the client/browser side. In
the provided example setup, the account service runs on port 3000.
* Use `{huly_account_svc}/auth/github/callback` as the sign-in redirect URI. The `huly_account_svc` is the hostname for the account service of the deployment, which should be accessible externally from the client/browser side. In the provided example setup, the account service runs on port 3000.

**URI Example:**
- `http://huly.mydomain.com:3000/auth/github/callback`
- `http://huly.mydomain.com:3000/auth/github/callback`

### On the Huly side

Expand Down
10 changes: 5 additions & 5 deletions setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ done
while true; do
if [[ -n "$HTTP_PORT" ]]; then
prompt_type="current"
prompt_value="${HTTP_PORT}"
prompt_value="${HTTP_PORT}"
else
prompt_type="default"
prompt_value="80"
Expand All @@ -50,7 +50,7 @@ else
prompt_value="Yes"
else
prompt_type="default"
prompt_value="No"
prompt_value="No"
fi
read -p "Will you serve Huly over SSL? (y/n) [${prompt_type}: ${prompt_value}]: " input
case "${input}" in
Expand Down Expand Up @@ -100,10 +100,10 @@ else
fi

read -p "Do you want to run 'docker compose up -d' now to start Huly? (Y/n): " RUN_DOCKER
case "${RUN_DOCKER:-Y}" in
[Yy]* )
case "${RUN_DOCKER:-Y}" in
[Yy]* )
echo -e "\033[1;32mRunning 'docker compose up -d' now...\033[0m"
sudo docker compose up -d
docker compose up -d
;;
[Nn]* )
echo "You can run 'docker compose up -d' later to start Huly."
Expand Down

0 comments on commit 1cbea1e

Please sign in to comment.