Skip to main content

User Management

Create and manage user accounts in Codex.

Creating the Admin User

The first user is created during initial setup:

# Via CLI
codex seed --config codex.yaml

Or via the setup API:

curl -X POST http://localhost:8080/api/v1/setup/initialize \
-H "Content-Type: application/json" \
-d '{
"username": "admin",
"email": "admin@example.com",
"password": "secure-password"
}'

Creating Additional Users

Admin users can create new accounts.

Via Web Interface

  1. Go to Settings > Users
  2. Click Add User
  3. Fill in username, email, password
  4. Select permissions
  5. Save

Via API

curl -X POST http://localhost:8080/api/v1/users \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"username": "reader",
"email": "reader@example.com",
"password": "user-password",
"is_admin": false,
"permissions": ["LibrariesRead", "SeriesRead", "BooksRead", "PagesRead"]
}'

User Properties

PropertyDescription
usernameUnique login name
emailEmail address (optional verification)
passwordHashed with Argon2
is_adminFull system access
permissionsGranular permission list
email_verifiedEmail verification status
created_atAccount creation date
updated_atLast modification date

Updating Users

curl -X PUT http://localhost:8080/api/v1/users/{id} \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{
"email": "newemail@example.com",
"permissions": ["LibrariesRead", "BooksRead"]
}'

Deleting Users

curl -X DELETE http://localhost:8080/api/v1/users/{id} \
-H "Authorization: Bearer $TOKEN"
warning

Deleting a user also deletes their reading progress and API keys.

User Preferences

Codex supports per-user preferences for customizing the user experience.

Available Preferences

KeyTypeDefaultDescription
ui.themestring"system"Theme: "light", "dark", "system"
ui.languagestring"en"UI language (BCP47 code)
ui.sidebar_collapsedbooleanfalseSidebar state
reader.default_zoominteger100Default zoom percentage
reader.reading_directionstring"auto"Reading direction
reader.page_fitstring"width"Page fit mode
library.default_viewstring"grid"Default view mode
library.default_page_sizeinteger24Items per page

Managing via Web Interface

  1. Go to Settings > Profile
  2. Navigate to the Preferences tab
  3. Adjust settings as needed
  4. Changes are saved automatically

Managing via API

# Get all preferences
curl http://localhost:8080/api/v1/user/preferences \
-H "Authorization: Bearer $TOKEN"

# Set a preference
curl -X PUT http://localhost:8080/api/v1/user/preferences/ui.theme \
-H "Authorization: Bearer $TOKEN" \
-H "Content-Type: application/json" \
-d '{"value": "dark"}'

# Reset to default
curl -X DELETE http://localhost:8080/api/v1/user/preferences/ui.theme \
-H "Authorization: Bearer $TOKEN"

External Integrations

Connect your Codex account to external services for reading progress sync.

Available Integrations

ProviderAuth TypeFeatures
AniListOAuth2Sync progress, ratings, import lists
MyAnimeListOAuth2Sync progress, ratings, import lists
KitsuOAuth2Sync progress, ratings
MangaDexAPI KeySync progress
KavitaAPI KeySync progress, ratings

Connecting an Integration

  1. Go to Settings > Profile
  2. Navigate to the Integrations tab
  3. Click Connect on the desired integration
  4. Follow the OAuth flow or enter your API key
  5. Configure sync settings

Sync Settings

SettingDescription
sync_reading_progressSync reading progress to external service
sync_ratingsSync ratings to external service
sync_on_completeTrigger sync when marking book as complete
sync_direction"push", "pull", or "bidirectional"

Manual Sync

curl -X POST http://localhost:8080/api/v1/user/integrations/anilist/sync \
-H "Authorization: Bearer $TOKEN"

Disconnecting

curl -X DELETE http://localhost:8080/api/v1/user/integrations/anilist \
-H "Authorization: Bearer $TOKEN"