title | description | icon |
---|---|---|
Production Setup |
How to set up Onyx for an organization |
server |
Below, we discuss the simplest possible way to setup Onyx within your enterprise. We know that every company does things differently, and we'd love to help you figure out the ideal setup for your enterprise! Feel free to reach out to us via the links on our Contact Us page.
The first step is to get a machine hosted in your VPC to run Onyx on.
- For AWS, this would be an EC2 instance.
- For GCP, this would be a Google Compute Engine instance.
- For Azure, this would be an Azure Virtual Machine instance.
- For DigitalOcean, this would be a Droplet.
- ...
For resourcing, we recommend a machine with 8vCPU and 16GB memory (although 4vCPU and 8GB memory can work in a pinch). More details on this recommendation can be found in the Resourcing section. With this basic setup, all components needed to operate Onyx will run on this single machine.
Modify your internal DNS to include entries which point to the private IPv4 address for the instance created above.
- SSH into the machine setup in the
Getting a Machine
section. - If not already setup, install docker following the relevant guide here: https://docs.docker.com/engine/install/
- Clone the Onyx repo:
git clone https://github.com/onyx-dot-app/onyx.git
- Navigate to onyx/deployment/docker_compose
- Bring up your docker engine and run:
- Setup your
.env
files- Make a copy of
env.prod.template
called.env
(cp env.prod.template .env
)- Fill in any relevant env variables to your setup, and delete the rest.
- Make a copy of
env.nginx.template
called.env.nginx
(cp env.nginx.template .env.nginx
)- Fill in the
DOMAIN
variable with the domain that people will use internally to access the Onyx UI - NOTE: this domain must be publicly accessible for this flow to work. If you're hosting it internally and not exposing it to the public internet then feel free to reach out to us to figure out the best way to set this up. EMAIL
is optional
- Fill in the
- Make a copy of
- Run
./init-letsencrypt.sh
to get a SSL certificate from LetsEncrypt. More info on how this works can be found here. - To pull images from DockerHub and run Onyx:
docker compose -f docker-compose.prod.yml -p onyx-stack up -d --pull always
- Alternatively, to build the containers from source and start Onyx, run:
docker compose -f docker-compose.prod.yml -p onyx-stack up -d --build --force-recreate
- This may take 15+ minutes depending on your internet speed.
- Setup your