Quick Start
Self-hosting

Self-hosting ClassroomIO.com

This guide will help you quickly selfhost ClassroomIO

Selfhost ClassroomIO

ClassroomIO is made up of the following applications

The quickest and easiest way to deploy both the backend and dashboard is by using our Railway Template (opens in a new tab). However there are a couple of things that you'd need first before heading over to the template, which are:

  1. SMTP values - For sending emails on the backend
  2. Supabase - For the database used on the dashboard
  3. Cloudflare R2 (optional) - Video uploads on the backend

SMTP Setup

Both for the supabase and backend setup, you'd need a custom SMTP for email sending. Most importantly you need these values:

SMTP_HOST=
SMTP_PORT=
SMTP_USER=
SMTP_PASSWORD=

Make sure you have them handy because you'd need them while we go through this selfhosting guide.

ℹ️

Learn more about setting up a custom SMTP server here (opens in a new tab)

Supabase

There are 2 options to go about setting up Supabase, you could selfhost supabase (opens in a new tab) on your own servers or you could use their cloud version. We recommend you use the cloud version because it has a very generous free tier and you get to deploy it very quickly.

We have a standalone guide to help you setup your Supabase Cloud and you can find it here (opens in a new tab)

After you go through that guide you will need the following environment variables, please also store them somewhere:

PUBLIC_SUPABASE_URL=
PUBLIC_SUPABASE_ANON_KEY=
PRIVATE_SUPABASE_SERVICE_ROLE=

Cloudflare R2

We use Cloudflare R2 for video uploading within the course builder. It is not required though and you can do without it in the app if you don't need video upload.

This section is a work in progress.

Deploy on Railway

Now you have everything you need and you are ready to deploy the backend and dashboard.

Go ahead and click this button to get started.

Deploy on Railway (opens in a new tab)

Environment Variables.

cio-backend

# Required
SMTP_HOST=""
SMTP_PORT=""
SMTP_USER=""
SMTP_PASSWORD=""
PUBLIC_SUPABASE_URL=""
PUBLIC_SUPABASE_ANON_KEY=""
 
# Optional
CLOUDFLARE_BUCKET_ID=""
CLOUDFLARE_ACCESS_KEY=""
CLOUDFLARE_ACCOUNT_ID=""
CLOUDFLARE_BUCKET_DOMAIN=""
CLOUDFLARE_SECRET_ACCESS_KEY=""
SENTRY_DNS=""
ℹ️

Learn more about the environment variables here (opens in a new tab)

cio-dashboard

# Required
PUBLIC_SUPABASE_URL=""
PUBLIC_SUPABASE_ANON_KEY=""
PRIVATE_SUPABASE_SERVICE_ROLE=""
PUBLIC_SERVER_URL=""
 
# Optional
OPENAI_API_KEY=""
PUBLIC_IP_REGISTRY_KEY=""
UNSPLASH_API_KEY=""
PRIVATE_APP_HOST=""
PRIVATE_APP_SUBDOMAINS=""
ℹ️

Learn more about the environment variables here (opens in a new tab)

Using Docker

We do have a docker-compose file (opens in a new tab) to deploy both the backend and dashboard however it still requires some more debugging and we are still trying to figure out how we can also get supabase to be included in the docker compose file.

If you'd like to help with this, please do open a PR on Github 👍🏽