No SSH? Run migrations and one-off commands on BrewInTH

The Commands tab runs a one-off command in your live app, such as a migration or a seed, with the site's own settings and database, for up to 30 seconds.
Your AI has built the site and it's live. Then its last message says: "Next, run php artisan migrate --force on the server," or "run npm run seed to add some sample data." If you've never used SSH and don't have a server of your own, you're left wondering where you're supposed to type that.
On BrewInTH you don't need SSH. Every app project has a Commands tab that runs a one-off command inside your live app, straight from the console. This guide covers where the command actually runs, how to use the tab, commands people run most, how to read the output, and which jobs belong somewhere else.
In short
✅ Every app project has a Commands tab; static sites don't
✅ A command runs in a temporary container built from the live version, with the same app settings, databases and /bw-data as the site
✅ From the console a command gets up to 30 seconds; your AI can run longer ones, for up to 4 hours
✅ It can't change the site's code files or answer questions mid-run, so pass flags such as--force
✅ It works on your real data, so back up first, and put recurring migrations in the Release command
What the Commands tab is, and where your command runs
When you press Run command, the platform starts a temporary container from the version of your site that's live right now and runs your command in it. That container has what the app serving your visitors has: the live version's code, every setting from the App settings tab (such as DATABASE_URL), the project's databases and Redis, and the persistent storage at /bw-data if you've switched it on.
When the command ends, the platform keeps its output for you and throws the container away. Your site keeps serving the whole time, and the only things that last are the changes the command made to your databases or to /bw-data.

It isn't a shell on the server. The command can't reach the host machine, and every run starts in a fresh container, so files an earlier run wrote outside /bw-data are gone.
What you need first
- An app project: Node, Python, PHP, Laravel, Go, Java, .NET, Ruby or Bun. A static site has no server-side program, so it has no Commands tab.
- A live version. Until a release has gone live, the button stays greyed out with the note "Publish a release before running commands."
- No release in progress. While a new version is building or deploying, the platform refuses commands ("Request failed: release_in_progress"), because the command would run in the old version, not the code you just sent. Wait until the new version shows Active on the Releases tab.
Run a command, step by step
- Open Projects and pick your project.
- Go to the Commands tab. You'll see the Sandbox commands panel.
- Type into the Command box. It shows a faint example for your project's technology; on Laravel that's
php artisan migrate --force. - Press Run command once. Under the button you'll see the job's id and its status, and the time it took once it's done.
- When the status reads Succeeded or Failed, read the output in the box below. To send it to your AI, press Copy output.
The box runs your text through a shell, so && chains two commands and | pipes one into another.
If a command takes longer than about 20 seconds, you may see the status Needs configuration with "Request failed: Waiting for sandbox command completion" while you wait. That means the platform is still waiting for your command; nothing has failed. Don't press the button again: a seed run twice can leave you with duplicate data.
The output only lives in this panel. Switch tabs or leave the page and it's gone (Recent activity on the Overview shows just the job name, its status and any error text), so copy anything you want to keep first.
Commands people run most
A command starts in your app's folder, so you can call files by the same paths they have in your project. Run one at a time.
On any technology
env | cut -d= -f1 | sortlists the names of your app settings without their values: handy when your AI wonders whetherDATABASE_URLis set.ls -la /bw-dataanddu -sh /bw-data/*show what's in persistent storage and how big each folder is.node -v,php -vorpython --versionshows the version your app runs on.
Laravel
php artisan migrate:statusshows which migrations have run.php artisan migrate --forceruns the pending ones. You need--force: on a production site Laravel asks for confirmation, and this tab can't answer.php artisan db:seed --forcefills tables from your seeders.
Django and Node.js
python manage.py showmigrationsshows migration status, andpython manage.py migrate --noinputapplies them.npm run seedruns a seed script your AI added to package.json, or call a file directly, such asnode scripts/seed.js.
Have your AI prepare a script you can just run
For jobs like adding sample data, creating starter categories or fixing a batch of wrong rows, ask your AI to write a script in the project and publish it; then you press run. Send this in the same chat and adjust the details:
Write a script that adds sample data to this site (10 menu items), then publish it to BrewInTH.
- Make it a script in the project, such as scripts/seed.js or a seeder of the framework we use.
- Use the database from the existing app settings; never put passwords in the code.
- It must be safe to run twice without creating duplicates, and must not delete or change existing data.
- It must finish within 30 seconds and never ask a question while it runs.
- Print one summary line: how many items were added and how many skipped. Never print secret values.
- If it needs to call the site itself, use APP_INTERNAL_URL instead of localhost.
When it's published, tell me the one-line command to paste into the BrewInTH Commands tab.
Reading the output, and when a command fails

- Succeeded: the command ended with code 0, and the box shows whatever it printed. If it printed nothing you'll see "(no output)".
- Failed with "Request failed: command_failed: exit 1" (or another number): the command reported an error itself. The last lines of the output usually say why, such as a missing table or a database it couldn't reach.
- Stopped by the platform: the code is usually 137 or 143, and the last line starts with
[hint]and explains the cause, such as using more memory than your package gives, filling/tmp, or running out of time. Your code isn't wrong in that case; split the work into smaller pieces, or have your AI run it with a longer time limit.
The output box shows the last 200 lines. Raw result (JSON) adds the exit code (exitCode) and the id of the version the command ran in (deploymentId). If you can't fix it yourself, send the command and its output to your AI (how to report a bug so AI fixes it).
Limits worth knowing
- 30 seconds per run from the console. For anything longer, such as importing a large batch of data, let the AI connected to your project run it (up to 4 hours a run), or split it into runs that each finish in under 30 seconds.
- The same memory and CPU as your app. At the time of writing, that's 256 MB of memory on Free and 512 MB on Starter.
- No changes to the site's files. The code in the container is read-only. A command can write only to
/tmp, which disappears when it ends (64 MB on Free, at least 2 GB on paid packages), and to/bw-data, which stays. To change code, edit it and publish a new version. - No web server inside. A script that calls
http://localhostfinds nothing. UseAPP_INTERNAL_URL, which the platform sets and which points at the app serving your visitors. - No answers mid-run. A command that asks y/n or wants a password typed in gets no answer. Pass flags such as
--forceor--noinputinstead. - A sleeping site. If the project page shows Asleep (saving resources), open the site to wake it before you run a command. Before your command starts, the platform waits until it can reach the app, and that wait counts toward the 30 seconds (why free sites sleep).
Jobs that belong somewhere else

- Migrations that should run with every release go in Release command (runs before the release goes live), under Advanced options (build / start / port) on the Releases tab. It runs from the new version before visitors are switched over, the platform backs up your databases before every run without any add-on, and if it fails, the current version keeps serving (an example with Laravel).
- Recurring work, like a morning summary email, goes on the Schedules tab, where Timeout per run (seconds) goes up to 14,400 (set up scheduled jobs).
- Looking at or fixing data with SQL: use the Database browser on the Databases tab (PostgreSQL, MySQL and MariaDB).
- Seeing what errors your site prints: use the Logs tab (let AI read the logs and fix it).
Before you press run
- It works on real data, and there's no trial mode. Back up before a command that changes data: with the Backups add-on (฿99 a month), press Back up now on the Databases tab; without it, put the change in the Release command, which takes a backup every time (restore the "before release command" copy).
- Never run commands that wipe the database on a site with real data, such as
php artisan migrate:fresh,php artisan db:wipeorpython manage.py flush. If your AI suggests one, ask first whether the existing data will be lost. - Don't print secrets, such as a plain
envorcat .env: the output is stored with the job and tends to get pasted into chats. Don't put passwords in the command either, because the command text is recorded. Keep secrets in App settings and have the script read them from there. - An app that keeps its data in an SQLite file on /bw-data: don't let a command write to that file while people are using the site. The command runs in a separate container and can't see the app's file locks, so simultaneous writes can corrupt the file. Do it at a quiet time.
Let your AI run commands
A coding agent connected to your project can run the same commands itself, as long as its token has the permission "Run app commands, including migrations" (a token from the Create the AI link and token (automatic) button on the project page already has it). Your AI can give a command up to 4 hours, the platform refuses its commands while a new version is still building too, and every result names the version it ran in. Commands your AI runs show up in Recent activity as Run a command, so you can see what it has just done.
If you'd rather your AI didn't run commands, issue its token through Custom permissions / lifetime and untick this permission under Customize permissions.
FAQ
Why doesn't my project have a Commands tab?
It's a static site: just HTML, CSS and JavaScript files, with no server-side program to run commands in. If the site needs a database or commands, it has to be an app, such as Node or PHP.
Can it replace SSH?
For one-off jobs that finish on their own, like migrations, seeds or checking files, yes. But there's no shell that stays open, and it can't change the site's files. To change files, edit them and publish again, through your AI, the Upload & go live page or SFTP.
Will a command slow down or stop my site?
Your site won't stop, because the command runs in its own container. A command that works the database hard, such as updating tens of thousands of rows at once, can slow down a site that uses the same database while it runs, so pick a quiet time.
Why can't my command see code or a table I just added?
Commands run against the live version. If you haven't published yet, or the new version isn't Active yet, the command can't see it. A new table exists only after its migration has run.
Summary
When your AI says "run this on the server", on BrewInTH you paste the command into the Commands tab and press Run command. It runs in a temporary container with your app settings, databases and /bw-data, for up to 30 seconds. Read the status and the last lines of the output, back up before anything that changes data, and keep recurring migrations in the Release command. The in-console guide shows the real screens.
Open your project and try the Commands tab →
