Add a Puma start command, set your master key, push, then run migrations. Want a working repo first? Deploy the rails, rails-api, rails-sidekiq or rails-tailwind starter from Templates.
Start command
web: bin/rails server -b 0.0.0.0 -p $PORT
Nixpacks detects Rails from your Gemfile and installs your gems.
Rails 7.1+ apps ship a Dockerfile, and Wokku builds it when present. On Rails 8 its default command runs Thruster on port 80, which doesn’t receive traffic. Keep the Procfile line above (it replaces the image’s command), or delete the Dockerfile to build with Nixpacks.
Config and database
wokku apps:create my-app --shared postgres
wokku config:set my-app \
RAILS_MASTER_KEY="$(cat config/master.key)" \
RAILS_ENV=production RAILS_LOG_TO_STDOUT=true RAILS_SERVE_STATIC_FILES=true
Never commit config/master.key. The Postgres add-on sets DATABASE_URL, which Rails reads in production. See Create & Link a Database.
Deploy and migrate
git remote add wokku git@git.wokku.cloud:my-app
git push wokku main
wokku run my-app -- bin/rails db:migrate
Run the migrate command after every deploy that adds migrations. Live at https://my-app.wokku.app. First deploy? See the Quickstart.
Background jobs
Add worker: bundle exec sidekiq (or bin/jobs for Solid Queue) to the Procfile and scale it. Sidekiq also needs Redis (wokku addons:shared:enable my-app redis, which sets REDIS_URL). See Background Workers.
Troubleshooting
ActiveSupport::MessageEncryptor::InvalidMessage—RAILS_MASTER_KEYis wrong or missing.- Assets 404 — set
RAILS_SERVE_STATIC_FILES=trueand check the build logs forassets:precompile. If it didn’t run, build with a Dockerfile. - Blocked host errors — add your domain to
config.hosts, or leaveconfig.hostsempty in production.