Quick start
This is the shortest supported path to a public Bearicorn hub: one Linux server, Docker Compose, PostgreSQL, and Caddy for automatic HTTPS.
If you already operate a reverse proxy, use the Direct HTTP stack instead. Read the full requirements before installing a long-lived or business-critical hub.
Requirements
- a Linux server you can reach with SSH;
- Docker Engine with the Compose plugin;
- a domain name with an
Arecord pointing to the server; and - inbound TCP ports
80and443open to the internet.
For a starting size, use 2 vCPUs, 4 GB of RAM, and 30 GB of persistent disk. This is an operator recommendation, not a measured minimum; monitor the host and increase it for larger hubs.
Set up the server
Step 1 - Install Docker
Use the guide for your server:
- Debian or Ubuntu — recommended
- Fedora
- Alpine Linux — distribution packages
Cloud providers need a VM, static IP, and firewall rules first: AWS, Google Cloud, or DigitalOcean.
Step 2 - Download Bearicorn
sudo mkdir -p /opt/bearicorn
sudo chown "$USER":"$USER" /opt/bearicorn
cd /opt/bearicorn
git clone https://github.com/bybearicorn/monorepo.git
cd monorepo/deploy/composeStep 3 - Configure the Caddy stack
cp .env.caddy .env
openssl rand -hex 32
openssl rand -hex 16Edit .env and replace:
JWT_SECRETwith the first generated value;DB_PASSWORDwith the second generated value; andCADDY_SITE_ADDRESSwith your domain, such aschat.example.com.
Keep secrets out of source control
Do not use the placeholder values on a live server. Keep .env readable only by trusted administrators and do not commit it.
Step 4 - Start Bearicorn
docker compose --env-file .env -f docker-compose.caddy.yml up --build -d
docker compose --env-file .env -f docker-compose.caddy.yml psOpen https://chat.example.com, using the exact host in CADDY_SITE_ADDRESS. The first account created in a fresh workspace becomes an administrator. Database migrations run when the application starts.
Verify the installation
All three services should be running and PostgreSQL should report healthy:
docker compose --env-file .env -f docker-compose.caddy.yml ps
docker compose --env-file .env -f docker-compose.caddy.yml logs --tail=100 caddy hub-app postgresIf HTTPS is not ready, confirm that DNS resolves to this server and ports 80 and 443 are reachable. Continue with troubleshooting if a container is restarting.
Protect the installation
Before inviting users:
- create and test a PostgreSQL backup;
- record the deployed Git revision and protect the
.envfile; and - review the security model.