# Startup Settings

> How to configure your server's Docker image, install command, and startup command in the Portal's Startup tab.

The **Startup** tab in the Portal controls how your server builds and launches. It contains three key settings: the **Docker image** (runtime version), the **install command** (dependency setup), and the **startup command** (what launches your application). Getting these right is essential for your server to work correctly.

## What you'll learn

- How to select the correct Docker image (runtime version)
- The difference between the install command and the startup command
- Common examples for Node.js and Python
- How to use the Startup tab for interactive shell access

---

## Docker Image

Daki runs each server inside a Docker container. The **Docker image** determines which programming language version is available inside that container.

The Startup tab has a dropdown to select the image. Always match it to what your application requires.

| Runtime | Example images |
| :--- | :--- |
| Node.js | Node.js 18, Node.js 20, Node.js 22, Node.js 24 |
| Python | Python 3.11, Python 3.12 |
| Java | Java 17, Java 21 |
| Others | Rust, C#, Lua, and more (paid plans) |

> **Warning:** Choosing the wrong runtime version causes startup failures. If your project requires Node.js 22 features, do not select Node.js 18.

---

## Install Command

The **install command** runs once when your server is set up or reinstalled. It is designed for installing dependencies and preparing your environment.

| Runtime | Typical install command |
| :--- | :--- |
| Node.js | `npm install` |
| Python | `pip install -r requirements.txt` |

Set this field so that your dependencies are installed automatically. You can customise this command freely to match your project's needs — for example, if you use a different package manager (e.g., `yarn install` or `pnpm install`).

---

## Startup Command

The **startup command** runs every time your server starts. This is the command that actually launches your application.

| Application type | Startup command |
| :--- | :--- |
| Node.js — single entry file | `node index.js` |
| Node.js — npm start script | `npm start` |
| Python — single entry file | `python main.py` |
| Python — as a module | `python -m mypackage` |

You are free to customise the startup command to suit your project's structure, entry point, and any flags or arguments your application needs.

**Important:** Filenames are case-sensitive. Make sure the filename in your startup command matches exactly what appears in the file manager.

---

## Interactive Shell Access

If you want to interact with the container directly and run commands manually — for example, to debug, inspect files, or run one-off commands — you can temporarily set the **startup command** to `bash`.

1. Go to the **Startup** tab.
2. Change the **startup command** to `bash`.
3. Restart your server.
4. Open the **Console** tab — you can now type shell commands directly.

> **Warning:** While the startup command is set to `bash`, your application will **not** start automatically. Restore your original startup command when you are done. See [Console & Power Actions](https://daki.cc/wiki/guides/console) for more details.

---

## Changing the Egg (Programming Language)

The **egg** defines the overall programming language and framework. To switch from one language to another (e.g., Node.js → Python), use the **Settings** tab — not the Startup tab. Changing the egg triggers a reinstall; backups are strongly recommended beforehand. See [Server Settings](https://daki.cc/wiki/guides/server-settings).

---

## Tips

- Restart your server after changing any setting in the Startup tab for changes to take effect.
- If your server crashes immediately after starting, the Console tab output almost always shows why.
- Double-check filenames in your startup command against what appears in the file manager.

---

## Next Steps

- [Environment Variables](https://daki.cc/wiki/guides/environment-variables) — Set up a `.env` file for your bot token and other secrets.
- [Console & Power Actions](https://daki.cc/wiki/guides/console) — Start your server and view output.
- [Server Settings](https://daki.cc/wiki/guides/server-settings) — Reinstall your server or change the egg.

---
Source: https://daki.cc/wiki/guides/startup-settings
