Skip to main content

Athina Self Hosting Guide

The example below is for Azure, but similar steps can be followed for other cloud providers.

Prerequisites

  • Create a VM with at least 64GB of free disk space, 16GB of RAM, and 4 CPUs. Assign a public DNS to the instance as well.
  • SSH into the instance and set up the following:
  • Obtain Athina GitHub access credentials.
  • Obtain Athina ECR access credentials (AWS CLI is required).

Core Services Setup

  • Clone the athina-deploy repository (ensure all Athina project folders are at the same directory level):
  • Copy .example.env to .env.
  • Populate the respective values. Some default values and keys are provided. You can change them if needed. The DB Name can remain as it is.
  • Create a Google OAuth client for Google login (Google Sign-In Documentation). Ensure you set the correct redirect URI and authorized domain (:9000/auth/google/redirect).

Transactional Emails (Optional)

  • We use Loops for transactional emails like user invitations, OTP sending, and downloading exported data.
  • Create a free account and obtain the API key from the Loops dashboard.
  • Create three transactional email templates:
    • User invitation email:
      • Data variables: inviterName and invitedEmail
    • OTP email:
      • Data variable: otp
    • Data export email:
      • Data variable: s3_link

Services Creation

  • Log in to ECR using credentials:
  • Pull the required images:
  • Ensure that the .env file in athina-deploy is updated with the right values.
  • For worker services, ensure the following environment variables are set correctly:
  • Run the following command to start services:
  • Wait for all services to start.

Dashboard

  • There are two ways of running the dashboard. One is using a prebuilt image with docker-compose and docker, the other is using node and npm directly.

Using docker compose and docker

  • Ensure the right env variables are set
  • Build the dashboard image:
  • If you are running into memory issues, you can build the dashboard image with increased memory limit:
  • Run the dashboard:

Using node and npm directly

  • Clone the athina-dashboard repository and switch to the main branch:
  • Ensure you are on the main branch of the athina-dashboard repository.
  • Copy the following to .env:
  • Set them to the correct values.
  • You can build either by installing yarn or by using a pre-built nodejs docker image (Recommended):
Using node and npm directly
or
Using pre-built nodejs docker image
  • Navigate to http://<IP/DOMAIN>:3000/login.

Updates

You can use the athina.sh for starting, stopping, updating and restarting the services in docker-deploy.

Post Installation

You can edit few configurations in the database to customize the platform. Particularly, you can set the domain in the org table. If you populate the domain column all subsequent users signing up using the same domain will be automatically be added to the same org, instead of creating a new org.