---
title: "Deploy Codex Auto Reset"
description: "Automatically redeem eligible Codex full resets before they expire."
category: "Automation"
url: https://railway.com/deploy/codex-auto-reset
---

# Deploy Codex Auto Reset

Automatically redeem eligible Codex full resets before they expire.

**[Deploy Codex Auto Reset on Railway](https://railway.com/template/codex-auto-reset)**

- **Creator:** Marc Krenn's Projects
- **Category:** Automation

## Template content

### codex-auto-reset

- **Image:** ghcr.io/marckrenn/codex-auto-reset-docker:0.2.2
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Codex Auto Reset on Railway

Codex Auto Reset is a self-hosted, always-on service that automatically redeems eligible Codex full resets before they expire. This template deploys one protected Bun service with one persistent Railway volume.

> [!WARNING]
> Codex Auto Reset uses private APIs and an unofficial device-login flow. OpenAI can change or disable them at any time. Use it at your own risk.

## About Hosting Codex Auto Reset

Railway runs the public Docker image as a single always-on service. The template generates a unique `MASTER_KEY`, creates a public HTTPS domain, and mounts persistent storage at `/data`. OAuth credentials are encrypted before they are written to the volume.

Run only one active Codex Auto Reset deployment per OpenAI account to avoid competing redeemers.

## Common Use Cases

- Redeem eligible full resets before they expire
- Keep the redeemer running while your computer sleeps
- Host the service without managing a virtual machine

## Dependencies for Codex Auto Reset Hosting

- A ChatGPT account with Codex access
- **Enable device code authorization for Codex** enabled in [ChatGPT Security settings](https://chatgpt.com/#settings/Security)
- A Railway account with enough usage allowance for an always-on service and persistent volume

### Deployment Dependencies

The template uses the public multi-architecture image at `ghcr.io/marckrenn/codex-auto-reset-docker:0.2.2` and creates a 500 MB persistent volume at `/data`.

## After Deployment

1. Open the generated Railway domain.
2. Sign in with username `admin`.
3. Copy `MASTER_KEY` from the service's Railway Variables tab and use it as the password.
4. Confirm that **Enable device code authorization for Codex** is enabled in ChatGPT Security settings.
5. Select **Start Codex login** and approve the device code on OpenAI's website.

Authentication happens directly on OpenAI's website. Codex Auto Reset never receives your OpenAI password.

## Why Deploy Codex Auto Reset on Railway?

Railway provides the HTTPS domain, persistent volume, health checks, and container lifecycle management required by Codex Auto Reset. The result remains user-owned while avoiding server and reverse-proxy administration.

[Project website](https://codex-auto-reset.marckrenn.dev) · [Source code](https://github.com/marckrenn/codex-auto-reset-docker)


## Similar templates

- [N8N Main + Worker](https://railway.com/deploy/n8n-main-worker) — Deploy and Host N8N with Inactive worker.
- [Evolution API with n8n](https://railway.com/deploy/evolution-api-with-n8n) — [Jul'26] WhatsApp automation platform using Evolution API, n8n & PostgreSQL
- [Postgres Backup](https://railway.com/deploy/postgres-s3-backups) — Cron-based PostgreSQL backup to bucket storage

Open this page in a browser: https://railway.com/deploy/codex-auto-reset
