---
title: "How to Deploy Your Codex App on App Platform | Hostman Docs"
description: "Deploy your Codex-built app from code to production on Hostman App Platform. Connect GitHub, set up MCP for automated repo management, and launch your app to a live public URL in just a few steps."
---

> For the complete documentation index for AI agents, see [llms.txt](https://hostman.com/llms.txt).

You built something in Codex. Now let's get it live.

This guide covers the full path from generated code to a public URL: pushing your project to GitHub, connecting it to [Hostman App Platform](https://hostman.com/products/app-platform/), and deploying. We'll also set up the GitHub MCP so Codex can create repos and push code on your behalf—no manual git required.

## Before You Begin

You will need: 

-   A project built in [Codex](https://openai.com/codex/)
-   A [Hostman](https://hostman.com/signup/) account

## Step 1. Create a GitHub Account

You'll need a GitHub account to host your code and connect it to the platform.

1.  Go to [github.com](https://github.com) and click **Sign up**.
2.  Register with Google, Apple, or an email address.

Once you're in, you'll land on your [dashboard](https://github.com/dashboard).

![Image4](https://content.hostman.com/assets/0902d2f9-709a-41df-b496-de8fb6ff0a11.png?width=1999&height=1142)

_[GitHub](https://github.com/) Dashboard_

## Step 2. Generate a GitHub Access Token

Codex needs a token to interact with your GitHub account—creating repos, pushing files, that sort of thing.

1.  Click your profile picture (top right) → **Settings**.
2.  Scroll down in the left sidebar → **Developer settings** → **Personal access tokens** → **Tokens (classic)**.
3.  Click **Generate new token** → **Generate new token (classic)**.

GitHub may ask for your password at this point—that's expected.

![Image2](https://content.hostman.com/assets/26fb64dc-287c-4ef0-92f7-5d0a51b6e633.png?width=1999&height=1122)

_Creating a token in the [GitHub](https://github.com/) interface_

**Fill in the token details:**

| **Field** | **Value** |
| --- | --- |
| Note | Something like `codex-access` |
| Expiration | No expiration (so you don't have to redo this) |

**Select scopes:**

-   `repo`: full repository access (create, edit, push)
-   `admin:org`: only needed if you're working with org repos

That's enough for everything in this guide. Don't select all scopes—there's no need to grant more access than necessary.

4.  Click **Generate token**.
5.  Copy the token now—you won't be able to see it again.

> [!NOTE]
> Treat this token like a password. If it's ever exposed, revoke it at [github.com/settings/tokens](https://github.com/settings/tokens) and generate a new one.

## Step 3. Connect GitHub to Codex via MCP

MCP lets Codex act on your GitHub account directly from the chat interface. Here's how to wire it up.

**In Codex:**

1.  Open **Settings** → **Plugins**.
2.  Open the **MCPs** tab and click **Add** → **Add MCP server**.
3.  Fill in the connection details:

| **Field** | **Value** |
| --- | --- |
| Name | GitHubMCP |
| Type | Streamable HTTP |
| URL | `https://api.githubcopilot.com/mcp/` |
| Bearer token env var | `GITHUB_TOKEN` |

4.  Save and fully restart Codex.
    

**Set the environment variable:**

Now expose your token to the system. Pick the option that fits:

#### macOS

Open Terminal and run:

For the current session only:

```shell
launchctl setenv GITHUB_TOKEN 'your-token-here'
```

To make it permanent across restarts:

```shell
echo 'export GITHUB_TOKEN="your-token-here"' >> ~/.zshrc && source ~/.zshrc
```

Replace `your-token-here` with the token you generated in Step 2.

#### Windows

Open PowerShell and run:

For the current session only:

```shell
set GITHUB_TOKEN=your-token-here
```

To make it permanent:

```shell
setx GITHUB_TOKEN "your-token-here"
```

Replace `your-token-here` with the token you generated in Step 2.

After running the command, restart Codex so it picks up the variable.

**Verify it's working:**

In the Codex chat, ask:

```shell
What MCP tools do you have available for GitHub? List all of them.
```

If you get a list of tools back—you're good to go.

![Image1](https://content.hostman.com/assets/1c232031-f9bf-43b0-b784-ea8efe08a910.png?width=1999&height=1152)

_Chat window in the [Codex](https://openai.com/codex/) interface_

**Something not working?** Ask Codex to check your config file:

-   macOS: `~/.codex/config.toml`
-   Windows: `C:\Users\<your-username>\.codex\config.toml`

## Step 4. Push Your Project to GitHub

With MCP connected, you can create a repo and push your code straight from the chat.

**Create the repository:**

In your Codex project chat, type: 

```shell
Create a new public GitHub repository called my-app
```

Codex will ask for permission to run the action—confirm it. You can verify the repo was created at [github.com](https://github.com).

![Image6](https://content.hostman.com/assets/89098176-109b-459b-b7f7-c59840253e52.png?width=1999&height=1143)

_Chat window in the [Codex](https://openai.com/codex/) interface_

**Push your code:**

```shell
Push the project from the current directory to that repository using the GitHub MCP.
```

> [!NOTE]
> **Heads up**: Explicitly mention the GitHub MCP—otherwise Codex may try to use local git, which can fail if git isn't installed or configured on your machine.

Confirm the action when prompted. When it's done, open the repo on GitHub and confirm your files are there.

## Step 5. Deploy on Hostman App Platform

Now let's get your app running.

1.  Go to the [Hostman dashboard](https://hostman.com) → **App Platform** → **Create App**.
2.  **Choose your app type**: Select **Frontend**, **Backend**, or **Docker**—and pick the framework your app uses. Not sure? Ask Codex: _What framework is this app built with?_
3.  **Connect your repository**.

**Option A: Connect your GitHub account** _(recommended)_

Gives you access to all your repos and enables auto-deploy—your app will redeploy automatically whenever you push changes.

1.  Click the GitHub icon on the Repository step.
2.  Sign in and authorize access.
3.  Select your repo from the list.

> [!NOTE]
> If the repo doesn't appear, click **Add Account**, re-authorize, and try again.

![Image3](https://content.hostman.com/assets/8d1524b1-87b2-43dd-8e67-833e64c812d7.png?width=756&height=336)

**Option B: Connect via URL**

Good if you'd rather not grant full account access, or if your code is on a different Git host.

1.  Click **Connect the repository via URL**.
2.  Paste the repo URL.
3.  For private repos, provide a username and token.

> [!NOTE]
> Note: auto-deploy isn't available with this method. You'll need to trigger deploys manually after each push.

**Finish the setup**:

-   Select the commit to deploy
-   Enable auto-deploy if you want (Option A only)
-   Choose a deployment region
-   Configure your **App Settings**. Consult Codex if you're unsure what to enter. Platform-specific docs: [Frontend](https://hostman.com/docs/app-platform/frontend-apps/) ·[Backend](https://hostman.com/docs/app-platform/backend-apps/) ·[Dockerfile](https://hostman.com/docs/app-platform/dockerfile/) ·[Docker Compose](https://hostman.com/docs/app-platform/docker-compose/)

Click **Create** and wait for the deploy to finish.

## You're Live!

Once deployment completes, go to **Dashboard** → look for the **Domain** field. That's your app's public URL.

Want a custom domain? Head to **Settings** to [configure it](https://hostman.com/docs/app-platform/managing-apps/#custom-domain).

Once MCP is set up, pushing updates is just a chat message away. Whenever you make changes to your project, just tell Codex to push them and Hostman will pick up the new commit and redeploy automatically.
