I even set 777 permissions to rule out access issues, but no luck. The container won’t start and doesn’t show any helpful errors. Any ideas what could be causing this? I’m totally stumped!
This issue appears to stem from a permission mismatch between your local environment and the GitHub Actions runner. One approach worth considering is modifying your Dockerfile to explicitly set the correct permissions for the /home/node/.n8n directory.
Try adding these lines to your Dockerfile:
RUN mkdir -p /home/node/.n8n && chown -R node:node /home/node/.n8n
USER node
This ensures the directory exists with the proper ownership before the container starts. Additionally, review your volume mounts in the docker-compose file. Ensure they’re not overriding permissions set in the image. If issues persist, temporarily disable volume mounts to isolate the problem source.
hey mia, sounds frustrating! have u tried running the container as root? add user: root to ur n8n service in docker-compose. also check if the config dir exists in the container. might need to create it first. good luck troubleshooting!
I’ve dealt with similar permission issues in CI environments before. One thing that often gets overlooked is the difference in user contexts between local and CI setups. In your case, it seems the container might be running as a different user in GitHub Actions compared to your local machine.
Have you tried explicitly setting the user in your docker-compose file? Add a ‘user’ field to your n8n service like this:
This ensures the container runs with a specific user ID, which can help align permissions. Also, double-check that your custom n8n image isn’t overriding any important directory permissions during the build process.
If that doesn’t work, you might want to add some debug steps in your GitHub Actions workflow to inspect the container’s file permissions and user context. Sometimes seeing the exact state inside the CI environment can reveal the root cause.