Files
opencode-manager/docs/getting-started/first-run.md
T
Chris Scott da6cad8b3a Add comprehensive documentation and download feature (#83)
* fix: markdown files now default to rendered view and render properly

- Add .md and .mdx MIME type support in backend (files.ts, defaults.ts)
- Add key props to FilePreview components to force proper remounting when switching files
- Fix markdown file detection with case-insensitive extension check
- Reset markdownPreview state when file changes to ensure correct default view
- Add onContentLoaded callback to VirtualizedTextView for reactive content updates
- Add fullContent state to properly handle large markdown file rendering
- Add error handling for async content loading to prevent blank screens
- Reduce loading timeout from 50ms to 0ms for more responsive loading

Fixes issues where:
- Markdown files opened in raw view instead of rendered view
- Large markdown files (12k+ lines) showed blank after loading completed
- State persisted incorrectly when switching between different file types

* Add directory download feature with ZIP archive support

* Improve voice recording UX with loading states and better transcript handling

* Fix auth config for prod/dev ports and add documentation

Update AUTH_TRUSTED_ORIGINS and PASSKEY_ORIGIN to use backend port 5003 (frontend uses 5173 in dev). Add comprehensive auth documentation covering secrets, trusted origins, admin reset, and passkeys. Update README and add mkdocs config.

* Remove roadmap section from README
2026-01-26 23:09:27 -05:00

2.3 KiB

First Run Setup

On your first visit to OpenCode Manager, you'll complete a guided setup process.

Interactive Setup

When no admin account exists, you'll be automatically redirected to the setup page.

Step 1: Create Admin Account

Fill in your account details:

  • Name - Your display name
  • Email - Used for login
  • Password - Minimum 8 characters recommended

Click Create Account to continue.

Step 2: Configure Provider (Optional)

After account creation, configure an AI provider:

  1. Navigate to Settings > Provider Credentials
  2. Select a provider
  3. Enter API key or connect via OAuth
  4. Save configuration

You can skip this and configure providers later.

Pre-Configured Admin

For automated or headless deployments, skip interactive setup by setting environment variables:

# In docker-compose.yml or .env
ADMIN_EMAIL=admin@example.com
ADMIN_PASSWORD=your-secure-password

When these are set:

  • Admin user is created automatically on first startup
  • Setup wizard is skipped
  • Users must log in with configured credentials

Adding Passkeys

After initial setup, you can add passkey authentication for passwordless login:

  1. Go to Settings > Security
  2. Click Add Passkey
  3. Follow your browser/device prompts
  4. Name your passkey (e.g., "MacBook Touch ID")

Passkeys provide:

  • Passwordless login
  • Phishing-resistant authentication
  • Biometric support (Touch ID, Face ID, Windows Hello)

Password Reset

If you forget your password:

  1. Set environment variables:
ADMIN_EMAIL=your@email.com
ADMIN_PASSWORD=new-password
ADMIN_PASSWORD_RESET=true
  1. Restart the application

  2. Log in with new password

  3. Important: Remove ADMIN_PASSWORD_RESET=true after successful reset

Security Recommendations

Production Deployments

  • Set a strong AUTH_SECRET for session encryption
  • Use HTTPS with valid SSL certificate
  • Use strong, unique passwords
  • Enable passkey authentication
  • Regularly rotate API keys

Generate AUTH_SECRET

openssl rand -base64 32

Add to your environment:

AUTH_SECRET=your-generated-secret-here

Next Steps