Deploy on Heroku
Heroku is a well-established PaaS that makes deploying TrocOS straightforward. It handles PostgreSQL, SSL, and deployments from your Git repository.
1. Create your app
Sign up at heroku.com and create a new application from the dashboard or the CLI:
heroku create trocos2. Set buildpacks
TrocOS needs both Node.js (for CSS compilation) and Ruby buildpacks. Node.js must come first:
heroku buildpacks:add --index 1 heroku/nodejs --app trocos
heroku buildpacks:add --index 2 heroku/ruby --app trocos3. Add Heroku Postgres
heroku addons:create heroku-postgresql:essential-0 --app trocosThis provisions a PostgreSQL database and sets DATABASE_URL automatically.
4. Set config vars
heroku config:set RAILS_ENV=production --app trocos
heroku config:set SECRET_KEY_BASE=$(rails secret) --app trocosOAuth providers (optional) — only set the variables for the providers you want to enable:
heroku config:set GITHUB_CLIENT_ID=... GITHUB_CLIENT_SECRET=... --app trocos
heroku config:set DISCORD_CLIENT_ID=... DISCORD_CLIENT_SECRET=... --app trocos
heroku config:set SLACK_CLIENT_ID=... SLACK_CLIENT_SECRET=... --app trocosSee the OAuth Setup guide to create these app credentials.
5. Deploy
Connect your GitLab or GitHub repo from the Heroku dashboard (Settings → Deploy), or push directly:
heroku git:remote --app trocos
git push heroku main6. Run migrations and initial setup
heroku run bundle exec rails db:migrate --app trocos
heroku run bundle exec rails trocos:setup --app trocostrocos:setup creates your first admin account.
7. Open your app
heroku open --app trocosYour TrocOS instance is live at https://trocos.herokuapp.com.
Optional: Custom domain
heroku domains:add www.example.com --app trocos
heroku certs:auto:enable --app trocosHeroku provisions a Let's Encrypt certificate automatically when SSL ACM is enabled.