Developers → App servers
Run your app on a NameOcean App Server and manage it from code: push to deploy, restart the apps, read their logs, keep secrets in env variables, and back up or restore the whole server.
Every App Server has a git repository in /root/app. A push writes the pushed branch there and runs .nameocean/deploy.sh if your project has one. nameocean deploy does the whole round trip:
$ nameocean deploy 3f9a1c2e Remote nameocean → ssh://root@3f9a1c2e.nameocean.org:2152/root/app (added) Pushed main to nameocean (3f9a1c2 Fix checkout) Pushed main to origin Restarted 2 apps, nginx reloaded: web running, worker running
The push uses your SSH key. If the server doesn't know it yet: nameocean servers ssh-keys add 3f9a1c2e (it reads ~/.ssh/id_ed25519.pub). A plain git push deploys the files as well; call POST /servers/{server}/deploys after it to restart the apps.
Scopes servers:read and servers:write; creating a server also needs billing:write. {server} is the id or the default domain. Everything is in the API reference.
| GET /servers/plans · POST /servers | Plans and prices; create a server (first answer is the price, then send confirm: true) |
| POST /servers/{server}/start · stop · restart | Start, stop or reboot the server |
| GET /servers/{server}/apps · POST …/reload | Supervisor programs and their state; restart them all and reload nginx |
| GET /servers/{server}/logs?app=web&lines=200 | The last lines of an app's output, or app=nginx |
| GET · PATCH /servers/{server}/env | Env variables every app gets; the apps restart after a change |
| GET · POST · DELETE /servers/{server}/ssh-keys | Keys that can log in and push |
| GET · POST /servers/{server}/backups · POST …/backups/restore | List backups, back up now, restore one over the server |
| POST /servers/{server}/git · GET · POST …/deploys | Prepare the push target; the deployed commit and the deploy history |
$ curl -X PATCH https://nameocean.net/api/v1/servers/3f9a1c2e/env \ -H "Authorization: Bearer $NAMEOCEAN_API_KEY" -H "Content-Type: application/json" \ -d '{"set": {"DATABASE_URL": "postgres://app@127.0.0.1/app"}, "unset": ["DEBUG"]}'
They are kept on the server only, in /root/conf/env, never in our database. Supervisor programs, SSH sessions and .nameocean/deploy.sh get them. Reading them needs servers:write, and the AI over MCP sees their names, not their values.
Webhooks can subscribe to server.*: server.created, server.started, server.stopped, server.restarted, server.restore.started and server.deployed (with the commit and whether the apps came up).
$ nameocean deploy 3f9a1c2e $ nameocean servers logs 3f9a1c2e --app web -n 200 $ nameocean servers env set 3f9a1c2e DATABASE_URL=postgres://app@127.0.0.1/app $ nameocean servers restart-apps 3f9a1c2e $ nameocean servers backups ls 3f9a1c2e
Over MCP an assistant can read logs, restart apps, set env variables, finish a deploy after pushing, back up a server and, after showing you the price, create one. Stopping, restarting and restoring ask for your OK first.