Skip to content

nkapp init

Initialize and configure a new Nanokit project. Two commands cover different levels of interactivity.


nkapp init

Quick non-interactive initialization that generates a boilerplate project.

bash
nkapp init [-n <name>]
FlagTypeDefaultDescription
-n, --name <name>stringCurrent directory nameProject name

Generated Files

FileDescription
nanokit.ymlDefault configuration with a single web service (nginx)
index.htmlWelcome page served by the default service
.nanokit/Project state directory (logs, cache)

nkapp configure

Interactive wizard for first-time project setup. Guides you through project naming and service definition.

bash
nkapp configure

The wizard prompts for:

  1. Project name — defaults to the current directory name
  2. Service names — comma-separated list (e.g., web, api, worker)

After completion, it suggests next steps:

--- Next Steps ---
1. nkapp up -e local      - Start your project locally
2. nkapp service add      - Add/update detailed service settings
3. nkapp host add         - Configure custom domains
4. nkapp deploy --ssh...  - Deploy to a remote server

Note.nkapp configure only runs if no nanokit.yml exists. If one is already present, use nkapp service add to modify your configuration.


nkapp hub

(Optional) Start the Nanokit Hub bridge manually.

Note. Running nkapp hub manually is not strictly necessary. When you run nkapp up, Nanokit automatically starts and manages the Bridge server inside a system container (nk-<project>-<env>-bridge) on port 3006.

bash
nkapp hub [-p <port>]
FlagTypeDefaultDescription
-p, --port <port>number3006Port for the WebSocket bridge

The Hub provides:

  • Real-time metrics: CPU, RAM, uptime per service
  • Log streaming: Live container output
  • Service management: Start/stop/restart from the UI
  • Infrastructure overview: Node status and environment configuration