This guide is for anyone who has deployed an app and now wants updates to be routine rather than nerve-racking. It explains what Launchpad does between a push and a live release, where to look when something goes wrong, and how to get back to a working version quickly.
By the end you will be able to tell a build failure from a runtime failure, fix the five most common causes, roll back with confidence, and write logs that make the next problem easier to find.
The deployment lifecycle
Every deployment, whether it comes from a push, a zip upload, a Redeploy or an AI tool, goes through the same stages.
- Build. Launchpad fetches your code, installs dependencies and runs the build command in an isolated container. The log streams as it happens.
- Start. The new version starts with your variables and a
PORTto listen on. - Health check. Launchpad calls the app on that port and the health check path (by default
/). It must answer with a 2xx status. - Live. Only after the health check passes does traffic move to the new version, and its status becomes Live.
If any stage fails, the previous live version keeps running. Visitors never see a half-built app, and a failed deploy is an inconvenience rather than an outage.
Health checks keep working after a release, too: if a running app stops responding, it is restarted.
Build logs and runtime logs
Launchpad keeps two kinds of logs, and knowing which one to open saves most of the time spent debugging.
| Build log | Runtime logs | |
|---|---|---|
| Where | Deployments, open a deployment | Logs tab |
| Covers | Installing, building, starting, health check | Everything your running app prints |
| Read it when | A deployment failed or is stuck | The app is live but misbehaving |
| Typical problems | Missing packages, lockfile errors, out of memory | Exceptions, failed requests, timeouts |
When a deployment fails, Launchpad summarises the reason in plain words at the top of its build log, with a hint for the fix. Read that first, then the last lines of the log above it: the real error is usually near the end, not at the top.
Runtime logs show what your app writes to standard output and standard error. If your app logs nothing, they show nothing, which is why it is worth logging deliberately (see the structured logging example below). Variable values are never written to logs by Launchpad, but anything your own code prints will appear.
Common failures and how to fix them
The app does not pass the health check
The build succeeded, the app started, but it never answered. Almost always the app is listening on a different port from the one Launchpad checks, or on localhost instead of all interfaces. Read the port from the PORT variable and listen on 0.0.0.0. If you set a custom health check path, make sure it returns a 2xx status without needing a login or a database query that might be slow on start.
There is no start command
Node apps need a start script in package.json; Python apps other than Django and Flask need a Procfile with a web: line such as web: python app.py. Without one, Launchpad cannot tell how to run the app. Add it, commit and deploy again.
A required variable is missing
The build passes, then the app crashes on start because DATABASE_URL or an API key is undefined. Add the variable under Variables, press Redeploy now, and add a startup check so the next missing value produces a clear message. Environment variables and secrets has an example.
The build runs out of memory
Large frontend builds, especially with source maps, can exceed the memory available. The summary reads that the build or app ran out of memory. Reduce memory use during the build (for example by turning off production source maps or splitting a very large bundle), or move to Pro, which gives each app more power.
package.json and the lockfile do not match
npm ci refuses to install when package-lock.json is out of step with package.json, which usually happens when someone edited package.json by hand. Run npm install locally, commit the updated lockfile and push. The same rule applies to yarn.lock and pnpm-lock.yaml.
The AI assistant
Every app has an AI assistant in its panel that can read the app's settings, recent deployments and logs. It never sees the values of your variables. Ask it "Why did my last deploy fail?" or "Is my app healthy?" and it explains the problem in plain words.
When it can fix something, such as a wrong port, it proposes the change. Nothing happens until you click Apply. Assistant requests count towards your plan's monthly allowance: 100 on Starter and 500 on Pro.
Step by step: roll back a bad release
- Open the app and go to Deployments.
- Find the last deployment that worked. You can roll back to any earlier deployment that went live.
- Choose Roll back and confirm. It replaces what is live now.
- Check the app on its address once the rolled-back version is live.
- If automatic deploys are on, fix the problem on a branch before merging to
main, otherwise the next push deploys the broken change again.
A rollback changes which version of your code runs. It does not undo changes the newer version made to your database. For data, use Backups, which has its own Restore that can itself be undone.
Safe release habits
Ship small changes
A deploy containing one change is easy to understand, easy to test and easy to roll back. A deploy containing three weeks of work is none of those. Merge to main often, in small pieces, and let each one go live.
Make database migrations backward compatible
The most dangerous releases change the database. Rolling back code is instant; rolling back a dropped column is not. Use the expand and contract pattern so old and new code can both run against the same schema:
- Expand. Add the new column or table without removing anything. Deploy.
- Migrate. Deploy code that writes to both old and new, then backfill existing rows.
- Switch. Deploy code that reads from the new column only.
- Contract. Once you are sure you will not roll back, remove the old column in a separate release.
-- Release 1 (expand): safe to roll back, old code ignores the new column
ALTER TABLE users ADD COLUMN display_name TEXT;
-- Release 2: backfill after code writes to both columns
UPDATE users SET display_name = full_name WHERE display_name IS NULL;
-- Release 4 (contract): only when no running version reads full_name
ALTER TABLE users DROP COLUMN full_name;At every point, the version before can still run, so a rollback is always safe.
Test before main
Run tests on every pull request so broken code never reaches the deployed branch. CI/CD with GitHub Actions shows how.
Structured logging in Node
Plain text logs are fine for reading; JSON logs are easier to search and filter, and they make it obvious which request a line belongs to. You do not need a library to start:
// logger.js
const LEVELS = { debug: 10, info: 20, warn: 30, error: 40 };
const minLevel = LEVELS[process.env.LOG_LEVEL] ?? LEVELS.info;
function log(level, message, fields = {}) {
if (LEVELS[level] < minLevel) return;
const line = JSON.stringify({
time: new Date().toISOString(),
level,
message,
...fields,
});
(level === 'error' ? console.error : console.log)(line);
}
module.exports = {
debug: (msg, fields) => log('debug', msg, fields),
info: (msg, fields) => log('info', msg, fields),
warn: (msg, fields) => log('warn', msg, fields),
error: (msg, fields) => log('error', msg, fields),
};const crypto = require('node:crypto');
const express = require('express');
const logger = require('./logger');
const app = express();
app.use((req, res, next) => {
const started = Date.now();
const requestId = crypto.randomUUID();
res.on('finish', () => {
logger.info('request', {
requestId,
method: req.method,
path: req.path,
status: res.statusCode,
durationMs: Date.now() - started,
});
});
next();
});
app.get('/', (req, res) => res.send('ok'));
const port = process.env.PORT || 3000;
app.listen(port, '0.0.0.0', () => logger.info('server started', { port }));Log events and identifiers, never passwords, tokens or full request bodies. For larger apps, established libraries such as pino produce JSON logs with less effort and better performance.
Common mistakes
- Reading the top of the build log. The error is usually near the end. Start with the summary, then the last lines.
- Rolling back and then pushing the same commit. With automatic deploys on, the broken change goes live again. Fix or revert it first.
- Destructive migrations in the same release as the code change. A rollback then meets a schema it cannot use. Expand first, contract later.
- Logging secrets while debugging. Remove debug output that prints variables or request bodies before merging.
- A slow health check path. An endpoint that queries a large table can time out during start. Keep the health check light.
Security notes
Treat logs as sensitive. They often contain email addresses, IP addresses and identifiers even when they contain no secrets, so log only what you need to debug. Never log authorisation headers, cookies or tokens.
Rollback and deploy permissions matter. Give AI tools tokens with only the permissions they need, and remember that Claude and the assistant ask before replacing what is live. The app's Activity tab records who deployed, rolled back or changed settings, including actions by AI tools, which is your audit trail when something changes unexpectedly.
Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| "Didn't pass the health check" | Wrong port, or listening on localhost | Listen on 0.0.0.0 and read PORT; check the health check path returns 2xx |
| "The package is not installed" | Dependency missing from package.json | Install it, commit package.json and the lockfile, push |
| "Ran out of memory" | Build or app exceeds available memory | Reduce build memory use, or move to Pro |
| "Couldn't download your repository" | GitHub connection lost access | Re-add the repository to the GitHub connection |
| App is live but returns errors | Runtime problem, not a build one | Open the Logs tab and ask the assistant |
Frequently asked questions
Does a failed deployment take my site down?
No. The version that was live before keeps running until a new deployment passes its health check.
How far back can I roll back?
To any earlier deployment that went live, listed under Deployments.
Does rolling back undo database changes?
No. Rolling back changes the code that runs. For data, restore from Backups, and plan migrations so older code can still run against the newer schema.
Can I be alerted when my app goes down?
Launchpad restarts apps that stop responding, but does not send uptime alerts. Use an external uptime monitor; Monitoring and uptime explains how to set one up.
Next steps
Releases are safest when they are small, tested and easy to undo. With the lifecycle, the two kinds of logs and rollbacks understood, you can ship more often with less risk.
- Monitoring and uptime: find out about problems before your users do.
- CI/CD with GitHub Actions: test every change before it deploys.
- Backups and disaster recovery: protect the data rollbacks cannot.
- Back up and restore: how Launchpad backups work.
- Want deployments that never replace a working version with a broken one? Try Launchpad.




