### Configure Domain and Email via Setup Script Source: https://github.com/hcengineering/huly-selfhost/blob/main/traefik/README.md Interact with the setup script to provide your domain name and administrator email address. After configuration, the script indicates how to start the services. ```bash $ ./setup.sh Enter the domain name: example.com Enter the email address: admin@example.com Setup is complete. Run 'docker compose up -d' to start the services. ``` -------------------------------- ### Quick Start Local Huly Setup Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md A streamlined script for quickly setting up Huly for local testing. It bypasses configuration prompts and uses default settings for volumes and host address. ```bash git clone https://github.com/hcengineering/huly-selfhost.git cd huly-selfhost ./setup.sh --quick ``` -------------------------------- ### Clone Repository and Run Setup Script Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Clone the huly-selfhost repository and execute the setup script to begin the configuration process. ```bash git clone https://github.com/hcengineering/huly-selfhost.git cd huly-selfhost ./setup.sh ``` -------------------------------- ### Install Swaks Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Instructions for installing the 'swaks' (SMTP Swiss Army Knife) tool on Ubuntu/Debian and CentOS/RHEL systems. ```bash # Ubuntu/Debian sudo apt-get install swaks # CentOS/RHEL sudo yum install swaks ``` -------------------------------- ### Install web-push npm package Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Install the web-push package globally using npm. This is required for generating VAPID keys. ```bash sudo npm install -g web-push ``` -------------------------------- ### Install Huly Helm Chart Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Basic installation of the Huly Helm chart. Secrets are auto-generated on first install. ```bash helm install huly ./helm/huly \ --set domain=huly.mysite.com ``` -------------------------------- ### Execute Huly Setup Script Source: https://github.com/hcengineering/huly-selfhost/blob/main/traefik/README.md Make the setup script executable and run it to configure your Huly instance. This script prompts for domain and email details. ```bash chmod +x setup.sh ./setup.sh ``` -------------------------------- ### Example VAPID Keys Output Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md This is an example of the output when generating VAPID keys. The public and private keys should be kept secure. ```bash ======================================= Public Key: sdfgsdgsdfgsdfggsdf Private Key: asdfsadfasdfsfd ======================================= ``` -------------------------------- ### Install Kind for Linux Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/QUICKSTART.md Installs the Kind binary for Linux. Choose the AMD64 or ARM64 version based on your system architecture. Make the binary executable and move it to a system-wide PATH directory. ```bash # For AMD64 / x86_64 [ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-amd64 # For ARM64 [ $(uname -m) = aarch64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-linux-arm64 chmod +x ./kind sudo mv ./kind /usr/local/bin/kind ``` -------------------------------- ### Install Kind for macOS Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/QUICKSTART.md Installs the Kind binary for macOS. Use the Intel or ARM version based on your Mac's architecture. Ensure the binary is executable and moved to a directory in your PATH. ```bash # For Intel Macs [ $(uname -m) = x86_64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-amd64 # For M1 / ARM Macs [ $(uname -m) = arm64 ] && curl -Lo ./kind https://kind.sigs.k8s.io/dl/v0.26.0/kind-darwin-arm64 chmod +x ./kind mv ./kind /some-dir-in-your-PATH/kind ``` -------------------------------- ### Recreate and Start Docker Compose Stack Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md This command ensures all services are updated and restarted with the latest configurations. Use --force-recreate to ensure a clean start. ```bash docker compose up -d --force-recreate ``` -------------------------------- ### Install Nginx Web Server Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Installs the Nginx web server package using the apt package manager. Nginx is often used as a reverse proxy for Huly. ```bash sudo apt install nginx ``` -------------------------------- ### Start Huly Services with Docker Compose Source: https://github.com/hcengineering/huly-selfhost/blob/main/traefik/README.md Start all the services defined in the docker-compose.yaml file in detached mode. This command brings up the Huly application and its dependencies. ```bash docker compose up -d ``` -------------------------------- ### Install Huly Chart from OCI Registry Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Install the Huly Helm chart from the GHCR OCI registry. Specify the domain for routing. ```bash helm install huly oci://ghcr.io/hcengineering/charts/huly \ --version 0.1.0 \ --set domain=huly.mysite.com ``` -------------------------------- ### Configure OpenID Connect (OIDC) Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Install Huly with OpenID Connect authentication. Configure client ID, secret, and issuer URL for your OIDC provider. ```bash helm install huly ./helm/huly \ --set domain=huly.mysite.com \ --set auth.oidc.clientId=YOUR_CLIENT_ID \ --set auth.oidc.clientSecret=YOUR_CLIENT_SECRET \ --set auth.oidc.issuer=https://accounts.google.com ``` -------------------------------- ### Configure Google OAuth Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Install Huly with Google OAuth authentication enabled. Ensure you replace placeholders with your actual client ID and secret. ```bash helm install huly ./helm/huly \ --set domain=huly.mysite.com \ --set auth.google.clientId=YOUR_CLIENT_ID \ --set auth.google.clientSecret=YOUR_CLIENT_SECRET ``` -------------------------------- ### Reload Nginx and Start Huly with Docker Compose Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Reload the Nginx service and start Huly using Docker Compose in detached mode. ```bash sudo nginx -s reload sudo docker compose up -d ``` -------------------------------- ### Enable AI Bot Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Install Huly with the AI Bot enabled, powered by OpenAI. Requires an OpenAI API key. ```bash helm install huly ./helm/huly \ --set domain=huly.mysite.com \ --set aibot.enabled=true \ --set secrets.openaiApiKey=sk-... ``` -------------------------------- ### Configure GitHub OAuth Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Install Huly with GitHub OAuth authentication enabled. Replace placeholders with your GitHub App credentials. ```bash helm install huly ./helm/huly \ --set domain=huly.mysite.com \ --set auth.github.clientId=YOUR_CLIENT_ID \ --set auth.github.clientSecret=YOUR_CLIENT_SECRET ``` -------------------------------- ### Troubleshoot Gmail Service Logs Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/gmail-configuration.md When the Gmail service fails to start, check its logs for errors. This command retrieves the logs for the 'gmail' container. ```bash # Check service logs sudo docker logs gmail ``` -------------------------------- ### Link Nginx Configuration Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Add the generated nginx configuration to your Nginx setup by creating a symbolic link. ```bash sudo ln -s $(pwd)/nginx.conf /etc/nginx/sites-enabled/huly.conf ``` -------------------------------- ### Configure External S3 Storage Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Install Huly using external S3-compatible storage. This disables the built-in MinIO deployment. Configure endpoint, region, credentials, and bucket details. ```bash helm install huly ./helm/huly \ --set domain=huly.mysite.com \ --set storage.type=s3 \ --set storage.s3.endpoint=https://s3.amazonaws.com \ --set storage.s3.region=us-east-1 \ --set storage.s3.accessKey=YOUR_ACCESS_KEY \ --set storage.s3.secretKey=YOUR_SECRET_KEY \ --set storage.s3.rootBucket=huly-data ``` -------------------------------- ### Add Host Entries for Ingress Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/QUICKSTART.md Modifies the host machine's /etc/hosts file to map example domain names to localhost. This is necessary for accessing services deployed with ingress controllers from your host. ```bash sudo cp -p /etc/hosts /tmp/hosts echo "127.0.0.1 huly.example" | sudo tee -a /etc/hosts echo "127.0.0.1 account.huly.example" | sudo tee -a /etc/hosts echo "127.0.0.1 transactor.huly.example" | sudo tee -a /etc/hosts echo "127.0.0.1 collaborator.huly.example" | sudo tee -a /etc/hosts ``` -------------------------------- ### Start Updated Huly Docker Compose Stack Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Starts the Huly services in detached mode after updating the repository and images. Use this to bring your self-hosted instance back online. ```bash docker compose up -d ``` -------------------------------- ### Update APT Package Cache Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Refreshes the list of available packages and their versions. This is a standard first step before installing new software on Debian-based systems. ```bash sudo apt update ``` -------------------------------- ### Create Huly Namespace and Deploy Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/README.md Use these kubectl commands to create the Huly namespace and apply the deployment configuration. ```bash kubectl create namespace huly-v7 ``` ```bash kubectl apply -R -f . --namespace huly-v7 ``` -------------------------------- ### Configure Fulltext Service Source: https://github.com/hcengineering/huly-selfhost/blob/main/MIGRATION.md Set up the new 'fulltext' service by specifying its image, ports, and environment variables including database URLs and external service connections. ```yaml fulltext: image: hardcoreeng/fulltext:${HULY_VERSION} ports: - 4700:4700 environment: - SERVER_SECRET=${HULY_SECRET} - DB_URL=mongodb://mongodb:27017 - FULLTEXT_DB_URL=http://elastic:9200 - ELASTIC_INDEX_NAME=huly_storage_index - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - REKONI_URL=http://rekoni:4004 - ACCOUNTS_URL=http://account:3000 - STATS_URL=http://stats:4900 restart: unless-stopped ``` -------------------------------- ### Configure Front Service for LiveKit Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Update the 'front' service environment variables in your docker-compose.yaml to point to your LiveKit host. This enables the front-end to connect to the Love service. ```yaml front: ... environment: - LIVEKIT_WS= ... ``` -------------------------------- ### Configure GitHub Integration Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Enable and configure GitHub integration for bidirectional sync. Requires a GitHub App and specific settings for ID, client ID, secrets, and keys. ```bash helm install huly ./helm/huly \ --set domain=huly.mysite.com \ --set githubIntegration.enabled=true \ --set githubIntegration.appId=123456 \ --set githubIntegration.clientId=Iv1.abc123 \ --set githubIntegration.clientSecret=YOUR_SECRET \ --set-file githubIntegration.privateKey=path/to/private-key.pem \ --set githubIntegration.webhookSecret=YOUR_WEBHOOK_SECRET \ --set githubIntegration.botName="your-app-name[bot]" ``` -------------------------------- ### Configure compose.yaml for Front-end Service Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Add the public VAPID key to the 'services:front:environment' section in compose.yaml so the front-end can access it for web push notifications. ```yaml - PUSH_PUBLIC_KEY=your public key ``` -------------------------------- ### Verify Gmail Service Status Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/gmail-configuration.md Check if the Gmail service container is running and view its logs to ensure it has started correctly. ```bash # Check container status sudo docker ps | grep gmail # Check Gmail service logs sudo docker logs gmail ``` -------------------------------- ### Configure compose.yaml for Notification Service Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Add these environment variables to the 'services:ses:environment' section in compose.yaml to configure the notification service with VAPID keys. ```yaml - PUSH_PUBLIC_KEY=your public key - PUSH_PRIVATE_KEY=your private key ``` -------------------------------- ### Configure Admin Emails Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Set a comma-separated list of email addresses for administrators. ```bash --set appSettings.adminEmails="admin@example.com,ops@example.com" ``` -------------------------------- ### Configure Front Service for Print URL Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Sets the PRINT_URL environment variable for the front service to enable communication with the Print service. ```yaml front: ... environment: - PRINT_URL=http${SECURE:+s}://${HOST_ADDRESS}/_print ... ``` -------------------------------- ### Add Love Service Container to Docker Compose Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Integrate the 'love' service into your docker-compose.yaml file to enable audio and video call functionality. Ensure all environment variables are correctly set, especially LiveKit credentials. ```yaml love: image: hardcoreeng/love:${HULY_VERSION} container_name: love ports: - 8096:8096 environment: - PORT=8096 - SECRET=${SECRET} - ACCOUNTS_URL=http://account:3000 - DB_URL=${CR_DB_URL} - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - STORAGE_PROVIDER_NAME=minio - LIVEKIT_HOST= - LIVEKIT_API_KEY= - LIVEKIT_API_SECRET= restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Add Calendar Container to Docker Compose Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Integrates the Huly calendar service into your Docker Compose setup. Ensure HULY_VERSION and other environment variables like MONGO_URI, Credentials, and SECRET are correctly set. ```yaml calendar: image: hardcoreeng/calendar:${HULY_VERSION} ports: - 8095:8095 environment: - MONGO_URI=mongodb://mongodb:27017 - MONGO_DB=%calendar-service - Credentials= - WATCH_URL=https://${HOST_ADDRESS}/_calendar/push - ACCOUNTS_URL=http://account:3000 - STATS_URL=http://stats:4900 - SECRET=${SECRET} - KVS_URL=http://kvs:8094 restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Configure GitHub Service in compose.yml Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Add the GitHub service to your `compose.yml` file. Ensure all required environment variables are set, including API credentials and host addresses. ```yaml github: image: hardcoreeng/github:${HULY_VERSION} ports: - 3500:3500 environment: - PORT=3500 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - SERVER_SECRET=${SECRET} - ACCOUNTS_URL=http://account:3000 - STATS_URL=http://stats:4900 - APP_ID=${GITHUB_APPID} - CLIENT_ID=${GITHUB_CLIENTID} - CLIENT_SECRET=${GITHUB_CLIENT_SECRET} - PRIVATE_KEY=${GITHUB_PRIVATE_KEY} - COLLABORATOR_URL=ws${SECURE:+s}://${HOST_ADDRESS}/_collaborator - WEBHOOK_SECRET=${GITHUB_WEBHOOK_SECRET} - FRONT_URL=http${SECURE:+s}://${HOST_ADDRESS} - BOT_NAME=${GITHUB_APP_SLUG}[bot] restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Wait for Nginx Controller Ready Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/QUICKSTART.md Waits for the Nginx ingress controller pods to reach a ready state. This command is crucial to ensure the ingress controller is operational before proceeding with further deployments. ```bash kubectl wait --namespace ingress-nginx \ --for=condition=ready pod \ --selector=app.kubernetes.io/component=controller \ --timeout=90s ``` -------------------------------- ### Test SMTP from Inside Docker Network Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Run a temporary Alpine container within the same Docker network as Huly to test SMTP connectivity from inside the environment. Requires installing curl within the container. ```bash # Run a temporary container in the same network sudo docker run --rm -it --network huly-selfhost_default alpine sh # Inside the container, install curl and test apk add curl curl --url "smtps://your-smtp-server.com:587" \ --ssl-reqd \ --mail-from "your-email@domain.com" \ --mail-rcpt "test@example.com" \ --user "your-username:your-password" \ -v ``` -------------------------------- ### Switching Storage Backend to S3 Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Use this command to upgrade the Huly Helm release and switch the storage type to S3. Ensure all S3 parameters are correctly set. ```bash helm upgrade huly ./helm/huly \ --reuse-values \ --set storage.type=s3 \ --set storage.s3.endpoint=https://s3.example.com \ --set storage.s3.region=us-east-1 \ --set storage.s3.accessKey=KEY \ --set storage.s3.secretKey=SECRET \ --set storage.s3.rootBucket=huly-data ``` -------------------------------- ### Wait for Front App Deployment Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/QUICKSTART.md Polls for the 'front' deployment to become available within the cluster. This ensures the front-end application is ready before you attempt to access it. ```bash kubectl wait --for=condition=Avaiable deployment/front --timeout 3m ``` -------------------------------- ### Deploy Huly with Kubectl Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/QUICKSTART.md Creates the 'huly-v7' namespace and applies Huly's deployment manifests to the cluster. This command assumes Huly's deployment files are present in the current directory. ```bash kubectl create namespace huly-v7 kubectl apply -R -f . --namespace huly-v7 ``` -------------------------------- ### Configure Notification Service in docker-compose.yaml Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Add the 'notification' container to your docker-compose.yaml file, including environment variables for port, source, stats URL, and VAPID keys. ```yaml notification: image: hardcoreeng/notification:${HULY_VERSION} environment: - PORT=8091 - SOURCE=mail@example.com - STATS_URL=http://stats:4900 - PUSH_PUBLIC_KEY=${PUSH_PUBLIC_KEY} - PUSH_PRIVATE_KEY=${PUSH_PRIVATE_KEY} restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Update Web Push Keys Configuration Source: https://github.com/hcengineering/huly-selfhost/blob/main/MIGRATION.md Migrate web-push keys from the 'front' service to the 'ses' service by removing them from 'front' and adding them to 'ses' environment variables. ```yaml front: ... environment: ... # Remove the following lines # - PUSH_PUBLIC_KEY=your public key # - PUSH_PRIVATE_KEY=your private key ses: ... environment: ... # Add the following lines - PUSH_PUBLIC_KEY=your public key - PUSH_PRIVATE_KEY=your private key ``` -------------------------------- ### Configure Custom Docker Volume Paths Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Manually set custom host paths for persistent data storage by editing the huly_v7.conf file. Leave paths empty to use default Docker named volumes. ```bash # Docker volume paths - specify custom paths for persistent data storage # Leave empty to use default Docker named volumes VOLUME_ELASTIC_PATH=/path/to/elasticsearch VOLUME_FILES_PATH=/path/to/files VOLUME_CR_DATA_PATH=/path/to/cockroachdb/data VOLUME_CR_CERTS_PATH=/path/to/cockroachdb/certs VOLUME_REDPANDA_PATH=/path/to/redpanda/data ``` -------------------------------- ### Add Print Service to Docker Compose Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Integrates the Print service by adding its configuration to docker-compose.yaml. Requires setting storage, stats, secret, accounts, and front URLs. ```yaml print: image: hardcoreeng/print:${HULY_VERSION} container_name: print ports: - 4005:4005 environment: - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - STATS_URL=http://stats:4900 - SECRET=${SECRET} - ACCOUNTS_URL=http://account:3000 - FRONT_URL=http${SECURE:+s}://${HOST_ADDRESS} restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Configure Front Service for AI URL Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Sets the AI_URL environment variable for the front service to enable communication with the AI Bot service. ```yaml front: ... environment: # this should be available outside of the cluster - AI_URL=http${SECURE:+s}://${HOST_ADDRESS}/_aibot ... ``` -------------------------------- ### View Account Service Logs Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Monitor the logs for the 'account' service to diagnose issues with user sign-up, callbacks, or service connectivity. ```bash docker compose logs -f account ``` -------------------------------- ### Kubernetes Deployment for Backup Service Source: https://github.com/hcengineering/huly-selfhost/wiki/Backup-service Use this Kubernetes Deployment configuration to deploy the backup service. Ensure that the necessary secrets and config maps are created beforehand. ```yaml apiVersion: apps/v1 kind: Deployment metadata: name: backup spec: replicas: 1 selector: matchLabels: app: backup template: metadata: labels: app: backup spec: containers: - name: app image: hardcoreeng/backup:latest command: ["node", "--max-old-space-size=2048", "bundle.js"] resources: limits: memory: '2024M' imagePullPolicy: Always env: - name: ACCOUNTS_URL value: http://account - name: SECRET valueFrom: secretKeyRef: name: anticrm-secret key: serverSecret - name: STATS_URL value: http://stats-service - name: BUCKET_NAME value: backups - name: INTERVAL value: '43200' - name: MONGO_URL valueFrom: configMapKeyRef: name: anticrm-config key: mongoDbUrl - name: DB_URL valueFrom: configMapKeyRef: name: anticrm-config key: mongoDbUrl - name: MONGO_OPTIONS value: '{"maxPoolSize": 1, "appName": "backup"}' - name: STORAGE valueFrom: secretKeyRef: name: anticrm-secret key: backupConfig - name: WORKSPACE_STORAGE valueFrom: secretKeyRef: name: anticrm-secret key: storageConfig ``` -------------------------------- ### Clone Huly Self-Hosted Repository Source: https://github.com/hcengineering/huly-selfhost/blob/main/traefik/README.md Clone the Huly self-hosted repository and navigate to the Traefik configuration directory. This is the initial step for setting up the self-hosted environment. ```bash git clone https://github.com/hcengineering/huly-selfhost.git cd huly-selfhost/traefik ``` -------------------------------- ### Configure Gmail Environment Variables Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/gmail-configuration.md Set these environment variables in your huly.conf file for Gmail integration. Ensure placeholders are replaced with your actual Google Cloud and Huly credentials. ```bash # Gmail Configuration GMAIL_CLIENT_ID=YOUR_CLIENT_ID GMAIL_CLIENT_SECRET=YOUR_CLIENT_SECRET GMAIL_PROJECT_ID=YOUR_PROJECT_ID GMAIL_TOPIC_NAME=projects/YOUR_PROJECT_ID/topics/email ``` -------------------------------- ### Huly Gmail Service Configuration in docker-compose.yaml Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/gmail-configuration.md Configure the Gmail service in your docker-compose.yaml file. Ensure to replace placeholders like YOUR_PROJECT_ID, YOUR_CLIENT_ID, YOUR_CLIENT_SECRET, and your-huly-domain.com with your actual values. The VERSION environment variable can be set to 'v1' (default) or 'v2' (beta). ```yaml gmail: image: 'hardcoreeng/gmail' container_name: gmail depends_on: account: condition: service_started ports: - 8093:8093 environment: - PORT=8093 - ACCOUNTS_URL=http://account:3000 - SECRET=${SECRET} - WATCH_TOPIC_NAME=projects/YOUR_PROJECT_ID/topics/email - Credentials={"web":{"client_id":"YOUR_CLIENT_ID","client_secret":"YOUR_CLIENT_SECRET","redirect_uris":["http://your-huly-domain.com:8093/signin/code"]}} - KVS_URL=http://kvs:8094 - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - VERSION=v1 # Use v1 (default) or v2 (beta, requires chat/inbox modules) - QUEUE_CONFIG=${QUEUE_CONFIG} restart: unless-stopped ``` -------------------------------- ### Create Kind Cluster with Port Forwarding Source: https://github.com/hcengineering/huly-selfhost/blob/main/kube/QUICKSTART.md Sets up a Kind Kubernetes cluster with control-plane node port forwarding for ports 80 and 443. This configuration allows host access to services running on these ports within the cluster. ```bash cat < - OPENAI_API_KEY= - OPENAI_BASE_URL= # optional if you use love service - LOVE_ENDPOINT=http://love:8096 restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Test SMTP SSL Certificate with openssl Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Use this command to test if your SSL certificate is correctly configured for an SMTP server. It initiates a connection and attempts to establish a secure channel. ```bash openssl s_client -connect your-smtp-server.com:587 -starttls smtp ``` -------------------------------- ### Restarting Huly Deployments Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md If Huly services encounter connection errors with dependencies like CockroachDB or Redpanda, restart the affected deployments. Replace with your actual Kubernetes namespace. ```bash kubectl rollout restart deployment/account deployment/transactor \ deployment/workspace deployment/fulltext -n ``` -------------------------------- ### Add Export Service to Docker Compose Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Integrates the Export service by adding its configuration to compose.yml. Requires setting storage, secret, database, accounts, service ID, and port. ```yaml exports: image: hardcoreeng/export:${HULY_VERSION} ports: - 4009:4009 environment: - STORAGE_CONFIG=minio|minio?accessKey=minioadmin&secretKey=minioadmin - SECRET=${SECRET} - DB_URL=${CR_DB_URL} - ACCOUNTS_URL=http://account:3000 - SERVICE_ID=export-service - PORT=4009 restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Configure Mail Service in Docker Compose Source: https://github.com/hcengineering/huly-selfhost/blob/main/MIGRATION.md Update your docker-compose.yaml to use the mail service instead of SES. Configure the MAIL_URL environment variable for the account and transactor containers. ```yaml account: ... environment: - MAIL_URL=http://mail:8097 ... transactor: ... environment: - MAIL_URL=http://mail:8097 ... ``` -------------------------------- ### Test Basic SMTP Connectivity with Telnet Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Perform a basic connection test to an SMTP server on a specified port using telnet. This helps verify network reachability and server responsiveness. ```bash # Test basic connectivity to SMTP server telnet your-smtp-server.com 587 # Expected response should be something like: # 220 your-smtp-server.com ESMTP ready ``` -------------------------------- ### Check Mail Container Environment Variables Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Inspect the environment variables of the running mail container to verify SMTP credentials and configuration settings. Useful for diagnosing authentication failures. ```bash # Check environment variables in running container sudo docker exec mail env | grep -E "(SMTP_USERNAME|SMTP_PASSWORD|SMTP_HOST|SMTP_PORT)" ``` -------------------------------- ### GitHub Service Integration Prerequisites Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Details the secrets required for setting up Huly's GitHub integration, including GITHUB_APPID, GITHUB_APP_SLUG, GITHUB_CLIENTID, GITHUB_CLIENT_SECRET, GITHUB_PRIVATE_KEY, and GITHUB_WEBHOOK_SECRET. These are obtained from a registered GitHub App. ```text Set up a GitHub Application for your deployment. Please refer to [GitHub Apps documentation](https://docs.github.com/en/apps/creating-github-apps/registering-a-github-app/registering-a-github-app) for full instructions on how to register your app. During registration of the GitHub app, the following secrets should be obtained: - `GITHUB_APPID` - The application ID number (e.g., `123456`), found under **General → About** in the GitHub App settings. - `GITHUB_APP_SLUG` - The app slug from its public URL: `github.com/apps/`. For example, if the URL is `github.com/apps/my-huly-dev`, the slug is `my-huly-dev`. - `GITHUB_CLIENTID` - The client ID shown on the same page (e.g., `Iv1.11a1aaa11aa11111`). - `GITHUB_CLIENT_SECRET` - A client secret generated in the **Client secrets** section of the General page. - `GITHUB_PRIVATE_KEY` - A private key for authentication. GitHub will generate and download a `.pem` file. This is an RSA key containing multiple lines — copy the entire content into the environment variable as-is. - `GITHUB_WEBHOOK_SECRET` - The webhook secret you set when configuring the webhook URL (see step 5 below). ``` -------------------------------- ### Disable Public Signup Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md Set this flag to true to disable public user signups, requiring manual user creation or invitation. ```bash --set auth.disableSignup=true ``` -------------------------------- ### Configuring CockroachDB Authentication Source: https://github.com/hcengineering/huly-selfhost/blob/main/helm/huly/README.md When running CockroachDB with insecure mode, use these Helm set commands to configure the username and connection URL, especially if using the root user. ```bash --set cockroach.username=root \ --set secrets.crDbUrl='postgres://root@cockroach:26257/defaultdb?sslmode=disable' ``` -------------------------------- ### Test Secure SMTP Connections with OpenSSL Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Test secure SMTP connections using openssl. Supports STARTTLS on port 587, direct SSL on port 465, and includes an option for Server Name Indication (SNI). ```bash # Test STARTTLS connection (port 587) openssl s_client -connect your-smtp-server.com:587 -starttls smtp # Test SSL connection (port 465) openssl s_client -connect your-smtp-server.com:465 # Test with SNI (Server Name Indication) openssl s_client -connect your-smtp-server.com:587 -starttls smtp -servername your-smtp-server.com ``` -------------------------------- ### Test SMTP with Curl Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Send a test email using curl, specifying the SMTP server, port, SSL requirements, sender, recipient, authentication credentials, and email content. ```bash curl --url "smtps://your-smtp-server.com:587" \ --ssl-reqd \ --mail-from "your-email@domain.com" \ --mail-rcpt "test@example.com" \ --user "your-username:your-password" \ --upload-file - << EOF From: your-email@domain.com To: test@example.com Subject: Test Email This is a test email. EOF ``` -------------------------------- ### Configure Statistics Service Source: https://github.com/hcengineering/huly-selfhost/blob/main/MIGRATION.md Define the configuration for the new 'stats' service, including its image, port, and environment variables for server secrets and port. ```yaml stats: image: hardcoreeng/stats:${HULY_VERSION} ports: - 4900:4900 environment: - PORT=4900 - SERVER_SECRET=${HULY_SECRET} restart: unless-stopped ``` -------------------------------- ### Add Mail Container to docker-compose.yaml Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Add the 'mail' container to your docker-compose.yaml file, specifying the port and the source email address for sending notifications. ```yaml mail: image: hardcoreeng/mail:${HULY_VERSION} container_name: mail ports: - 8097:8097 environment: - PORT=8097 - SOURCE= restart: unless-stopped networks: - huly_net ``` -------------------------------- ### Configure Front Service for HulyPulse Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Update the 'front' service environment variables to include the PULSE_URL. This allows the front-end to connect to HulyPulse for real-time updates. ```yaml front: ... environment: - PULSE_URL=http${SECURE:+s}://${HOST_ADDRESS}/_pulse ... ``` -------------------------------- ### Check Mail Container Status Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Verify if the mail container is running and healthy using Docker commands. ```bash sudo docker ps | grep mail ``` ```bash sudo docker inspect mail --format='{{.State.Status}}' ``` ```bash sudo docker inspect mail ``` -------------------------------- ### Test SMTP Authentication with Swaks Source: https://github.com/hcengineering/huly-selfhost/blob/main/guides/smtp-troubleshooting.md Use swaks to test SMTP authentication with a specified server, port, authentication method, username, password, and TLS. Includes a dry-run option. ```bash # Basic SMTP test with authentication swaks --to test@example.com \ --from your-email@domain.com \ --server your-smtp-server.com:587 \ --auth LOGIN \ --auth-user your-username \ --auth-password your-password \ --tls # Dry run (don't actually send) swaks --to test@example.com \ --from your-email@domain.com \ --server your-smtp-server.com:587 \ --auth LOGIN \ --auth-user your-username \ --auth-password your-password \ --tls \ --dry-run ``` -------------------------------- ### Reset Volumes to Default Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Quickly revert all Docker volumes to their default named volume configuration without interactive prompts. ```bash ./setup.sh --reset-volumes ``` -------------------------------- ### Configure Redis Backend for HulyPulse Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Switch HulyPulse to use Redis as a backend by updating environment variables in docker-compose.yml. Supports direct mode and password-protected connections. ```yaml - HULY_BACKEND=redis - HULY_REDIS_MODE=direct - HULY_REDIS_URLS=redis://redis:6379 # or with password: # - HULY_REDIS_URLS=redis://:YOUR_PASSWORD@redis:6379 ``` -------------------------------- ### Update Huly Self-Hosted Repository Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Fetches the latest changes for the huly-selfhost deployment files. Ensure you are in the correct directory before running. ```bash git pull ``` -------------------------------- ### Configure SMTP Server in Mail Service Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Add SMTP configuration to the environment section of the 'mail' container in docker-compose.yaml to integrate with an external SMTP server. ```yaml mail: ... environment: ... - SMTP_HOST= - SMTP_PORT= - SMTP_USERNAME= - SMTP_PASSWORD= ``` -------------------------------- ### Configure Workspace to Disable Default Content Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md Modify the workspace service configuration in your docker-compose.yml to prevent new workspaces from being initialized with default content. Set INIT_REPO_DIR to a non-existent path. ```yaml workspace: image: hardcoreeng/workspace:${HULY_VERSION} environment: # ... - INIT_REPO_DIR=/no-init-scripts ``` -------------------------------- ### Add Web Push Notification URL Source: https://github.com/hcengineering/huly-selfhost/blob/main/MIGRATION.md Add the WEB_PUSH_URL environment variable to the transactor container configuration if web push notifications are to be used. ```yaml transactor: ... environment: - MAIL_URL=http://mail:8097 - WEB_PUSH_URL=http://ses:3335 ... ``` -------------------------------- ### View Mail Service Logs Source: https://github.com/hcengineering/huly-selfhost/blob/main/README.md This bash command displays the current logs for the 'mail' container. Useful for diagnosing issues. ```bash sudo docker logs mail ```