huly-selfhost icon indicating copy to clipboard operation
huly-selfhost copied to clipboard

Install documentation

Open insp63 opened this issue 11 months ago • 9 comments

Friends, share the configuration of how you set up the connection between HULU and Love Service. There have already been many themes, but there is no single setting. The code doesn't work in the README: in the browser, HULU is trying to log out to the server http://love:8096 naturally, there is no such address, it is an internal address, then why does specifying the LIVEKIT_HOST address not work? There is also a question about telegram, why is there no request after entering the phone? HULU is deployed on a server with an external IP of 188.190xxxx. This IP is configured via ./setup.sh

Image

Image

Image

insp63 avatar Jan 22 '25 10:01 insp63

@insp63 thanks for reporting this. Indeed, this is a bug in the README.md. The LOVE_ENDPOINT should be the URL of the love container. Current compose.yml already contains proper value: https://github.com/hcengineering/huly-selfhost/blob/main/compose.yml#L119 If you are not using nginx, then adjust the value according to your setup, i.e. for you it can be http://188.190.xxx.xxx:8096

aonnikov avatar Jan 23 '25 04:01 aonnikov

It definitely shouldn't be like this ((

Image

Image

insp63 avatar Jan 30 '25 05:01 insp63

@insp63 thanks for reporting this. Indeed, this is a bug in the README.md. The LOVE_ENDPOINT should be the URL of the love container. Current compose.yml already contains proper value: https://github.com/hcengineering/huly-selfhost/blob/main/compose.yml#L119 If you are not using nginx, then adjust the value according to your setup, i.e. for you it can be http://188.190.xxx.xxx:8096

Removed the extra lines, but other errors

insp63 avatar Jan 30 '25 05:01 insp63

So based on your screenshot I see that there are two issues:

  1. 404 error when trying to POST http://.../_love/getToken
  2. Lack of error handling on our side, as a result we put some garbage as LiveKit token

Please check that love container is accessible by this address, it should solve the problem.

aonnikov avatar Feb 05 '25 04:02 aonnikov

Итак, основываясь на вашем скриншоте, я вижу, что есть две проблемы:

  1. Ошибка 404 при попытке POSThttp://.../_love/getToken
  2. Отсутствие обработки ошибок на нашей стороне, в результате чего мы помещаем какой-то мусор в качестве токена LiveKit

Пожалуйста, проверьте, доступен ли контейнер любви по этому адресу, это должно решить проблему.

Image

insp63 avatar Feb 14 '25 09:02 insp63

Then POST - 404 error ((((

insp63 avatar Feb 14 '25 17:02 insp63

I had the same issue.

Here's the trick: in the front container, all URLs should point to the public URL, accessible from the browser.

For all other containers, the URLs can be internal, in the Docker network.

Here is an example:

The front container:

  front:
    image: hardcoreeng/front:${HULY_VERSION}
    environment:
      - SERVER_PORT=8080
      - SERVER_SECRET=${SECRET}
      - LOVE_ENDPOINT=http${SECURE:+s}://${HOST_ADDRESS}/_love
      - ACCOUNTS_URL=http${SECURE:+s}://${HOST_ADDRESS}/_accounts
      - REKONI_URL=http${SECURE:+s}://${HOST_ADDRESS}/_rekoni
      - CALENDAR_URL=http${SECURE:+s}://${HOST_ADDRESS}/_calendar
      - GMAIL_URL=http${SECURE:+s}://${HOST_ADDRESS}/_gmail
      - TELEGRAM_URL=http${SECURE:+s}://${HOST_ADDRESS}/_telegram
      - STATS_URL=http${SECURE:+s}://${HOST_ADDRESS}/_stats
      - AI_URL=http${SECURE:+s}://${HOST_ADDRESS}/_aibot
      - UPLOAD_URL=/files
      - ELASTIC_URL=http://elastic:9200
      - COLLABORATOR_URL=ws${SECURE:+s}://${HOST_ADDRESS}/_collaborator
      - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin
      - DB_URL=mongodb://mongodb:27017
      - MONGO_URL=mongodb://mongodb:27017
      - TITLE=${TITLE:-Huly Self Host}
      - DEFAULT_LANGUAGE=${DEFAULT_LANGUAGE:-en}
      - LAST_NAME_FIRST=${LAST_NAME_FIRST:-true}
      - DESKTOP_UPDATES_CHANNEL=selfhost
    restart: unless-stopped

The love container:

  love:
    image: hardcoreeng/love:${HULY_VERSION}
    container_name: love
    expose:
      - 8096
    env_file:
      - ./.env
    environment:
      - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin
      - SECRET=${SECRET}
      - ACCOUNTS_URL=http://account:3000
      - DB_URL=mongodb://mongodb:27017
      - MONGO_URL=mongodb://mongodb:27017
      - STORAGE_PROVIDER_NAME=minio
      - PORT=8096
    restart: unless-stopped

The nginx.conf file

server {
    listen 80;
    server_name _;
    location / {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_pass http://front:8080;
    }

    location /_accounts {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        rewrite ^/_accounts(/.*)$ $1 break;
        proxy_pass http://account:3000/;
    }

    location /_collaborator {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        rewrite ^/_collaborator(/.*)$ $1 break;
        proxy_pass http://collaborator:3078/;
    }

    location /_transactor {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        rewrite ^/_transactor(/.*)$ $1 break;
        proxy_pass http://transactor:3333/;
    }

    location ~ ^/eyJ {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_pass http://transactor:3333;
    }

    location /_rekoni {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        rewrite ^/_rekoni(/.*)$ $1 break;
        proxy_pass http://rekoni:4004/;
    }

    location /_stats {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        rewrite ^/_stats(/.*)$ $1 break;
        proxy_pass http://stats:4900/;
    }

    location /_love {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        rewrite ^/_love(/.*)$ $1 break;
        proxy_pass http://love:8096;
    }

    location /_aibot {
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;

        rewrite ^/_aibot(/.*)$ $1 break;
        proxy_pass http://aibot:4010;
    }
}

DenisBessa avatar Mar 23 '25 12:03 DenisBessa

How to use huly with portainer and nginx proxy?

genworkship avatar Apr 03 '25 07:04 genworkship

I got the same issue and no fix or clear explanation

Fabricem9 avatar Jul 17 '25 16:07 Fabricem9