Jonathan Bennett

Kamal Quick-Fix Guide: Permissions & DB Issues

I recently did my first Rails deployment using Kamal. Fortunately, this was a staging deployment for a new app, so I could work out all the kinks worry-free. Here are a few notes for both your benefit and mine (once I inevitably forget!).

Docker Permissions

Right off the bat, I ran into a permissions issue when trying to run Docker commands. This was due to the user for my image being set to ubuntu rather than root. As noted in the Kamal documentation, you might need to adjust server settings based on your SSH configuration. To resolve this, add the user to the docker group:

sudo usermod -a -G docker $USER

Database Accessories

When adding or updating accessories, note that changes are not applied automatically, nor are accessories started by default. So, if you make configuration changes or face hostname resolution issues, make sure to boot or reboot the database accessory as needed:

kamal accessory boot db

Kamal has been fantastic to use so far. I anticipate moving more projects to Kamal soon!