Setup ChartBrew on Coolify
Problem:
I tried running ChartBrew on Coolify, but it initially didn't work, as I was getting this error: ArgError: option requires argument: -l (alias for --listen)
Solution:
Use this Docker Compose file and set the env variables mentioned at the end (using the Developer View in Environment Variables in Coolify).
New Resource → Docker Compose Empty
version: '3.8'
services:
db:
image: 'mysql:8.4'
restart: unless-stopped
environment:
MYSQL_DATABASE: '${CB_DB_NAME}'
MYSQL_USER: '${CB_DB_USERNAME}'
MYSQL_PASSWORD: '${CB_DB_PASSWORD}'
MYSQL_ROOT_PASSWORD: '${CB_DB_ROOT_PASSWORD}'
MYSQL_DEFAULT_AUTH: caching_sha2_password
volumes:
- 'chartbrew-db:/var/lib/mysql'
healthcheck:
test:
- CMD
- mysqladmin
- ping
- '-h'
- localhost
interval: 10s
timeout: 5s
retries: 5
redis:
image: 'redis:alpine'
restart: unless-stopped
command:
- redis-server
- '--requirepass'
- '${CB_REDIS_PASSWORD}'
ports:
- '6379:6379'
chartbrew:
image: razvanilin/chartbrew
restart: unless-stopped
env_file: .env
ports:
- '4018:4018'
- '4019:4019'
depends_on:
db:
condition: service_healthy
redis:
condition: service_started
volumes:
chartbrew-db: null
docker-compose.yml
Environment Variables
CB_DB_PASSWORD=SOME_RAND_PASS
CB_DB_ROOT_PASSWORD=OTHER_RAND_PASS
CB_REDIS_PASSWORD=YET_OTHER_RAND_PASS
CB_ENCRYPTION_KEY=GENERATE_THIS!!
CB_ENCRYPTION_KEY_DEV=GENERATE_THIS!!
CB_DB_NAME=chartbrew
CB_DB_USERNAME=chartbrewuser
CB_DB_HOST=db
CB_REDIS_HOST=redis
CB_API_HOST=0.0.0.0
CB_API_PORT=4019
VITE_APP_CLIENT_HOST=https://chart.domain.com:4018
VITE_APP_CLIENT_PORT=4018
VITE_APP_API_HOST=https://api.chart.domain.com:443
VITE_APP_API_PORT=443
To generate the encryption keys, run this command (assuming you have Node.js running locally):
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
Domains:
Replace chart.domain.com in the env variables with your actual domain name. Also use https:// instead of http for SSL.
In Coolify, for the Chartbrew service, add your two domains (that must point to your Coolify's server IP):
- https://chart.domain.com:4018 - This will expose the web app on yourdomain.com
- http://api.chart.domain.com:4019 - This will expose the server API on api.yourdomain.com

Do you encounter any errors? Do you have any tips? Write them in the comments.