troubleshooting
Common Issues
Solutions for the most common problems when deploying and running services on Runix.
Common Issues#
Here are the most common problems developers run into and how to fix them.
Build fails#
If your build fails, the first step is always to check the build logs.
Check build logs
Open your deployment in the dashboard and click the "Build Logs" tab. Or use the CLI:
runix logs my-service --buildLook for the error
Common build errors and their fixes:
- "Module not found" — A dependency is missing from your package.json or requirements.txt. Make sure all imports are listed as dependencies.
- "Node version not supported" — Your project requires a specific Node.js version. Add an "engines" field to package.json.
- "Out of memory during build" — Your build process needs more memory. Upgrade to a higher plan or optimize your build.
- "Permission denied" — A file in your repo has incorrect permissions. Check that scripts are executable (chmod +x).
If you are using a monorepo, make sure Runix is building from the correct directory. Currently one service per repository is supported.
App crashes on startup#
If your app builds successfully but crashes immediately after starting, check these common causes:
- PORT environment variable — Your app must listen on the PORT environment variable, not a hardcoded port. Runix injects this at runtime.
- Missing environment variables — Check that all required env vars are set in the dashboard or CLI.
- Health check failing — Runix checks that your service responds on the configured port. Make sure your app is ready to accept connections.
- Database not available — If your app needs a database, make sure it is deployed and the connection string is set in env vars.
Make sure your app uses the PORT env var
// Correct: use the PORT env var
const port = process.env.PORT || 3000;
app.listen(port, '0.0.0.0', () => {
console.log(`Server running on port ${port}`);
});Custom domain not working#
If your custom domain is not routing to your service:
- 1.Verify your DNS: Your CNAME record must point to runixcloud.dev (not your deployment's subdomain)
- 2.Wait for DNS propagation: DNS changes can take up to 48 hours. Most resolve within an hour.
- 3.Run domain verification: Go to your deployment's domain settings and click "Verify" to check the DNS record.
- 4.Check your plan: Custom domains require the Starter plan or above.
| Type | Name | Value |
|---|---|---|
| CNAME | api (your subdomain) | runixcloud.dev |
Deployment stuck in "building"#
If your deployment appears stuck in the building state for more than 10 minutes:
- Check build logs — The build may still be running (large dependency installs can take a while)
- Large Docker images — If your project has many dependencies, the initial build takes longer. Subsequent builds use the cache.
- Build timeout — Builds that exceed 15 minutes are automatically cancelled. Optimize your dependencies or upgrade your plan for more build resources.
- Trigger a redeploy — If the build seems stalled, try redeploying from the dashboard or CLI.
502 Bad Gateway#
A 502 error means the proxy cannot reach your container. This usually happens when:
- Your service is still starting up — Wait a few seconds and refresh.
- Your app crashed — Check the runtime logs for errors.
- Your app is not listening on the correct port — Make sure it uses the PORT environment variable.
- Your service ran out of memory — Check if you see OOM errors in the logs and consider upgrading your plan.
Debug a 502 with runtime logs
# Check runtime logs for errors
runix logs my-serviceEnvironment variables not loading#
If your app is not picking up environment variable changes:
- Redeploy after changes — Environment variables are injected when the container starts. You must redeploy for changes to take effect.
- Check the variable names — Keys are case-sensitive. DATABASE_URL is not the same as database_url.
- Verify in the dashboard — Open your deployment settings and confirm the variables are set correctly.
After updating environment variables, you must redeploy your service for the changes to take effect. Use the "Redeploy" button in the dashboard or run: runix redeploy my-service