Skip to content

[FAQ] #109

@KarloVlahek

Description

@KarloVlahek

Course

machine-learning-zoomcamp

Question

GitHub Codespaces: Running pgadmin in Docker

Answer

With the default instructions, running pgAdmin in Docker may result in a blank screen after logging into the pgAdmin console. This is typically due to session or proxy issues when running behind Codespaces’ reverse proxy. You can resolve this in two ways:

PGADMIN_CONFIG_PROXY_X_HOST_COUNT: 1

PGADMIN_CONFIG_PROXY_X_PREFIX_COUNT: 1

This allows pgAdmin to work properly with Codespaces’ reverse proxy.

If the gray screen persists, you can try disabling enhanced cookie protection and CSRF checks, and adjusting cookie settings:

PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION: "False"
PGADMIN_CONFIG_WTF_CSRF_CHECK_DEFAULT: "False"
PGADMIN_CONFIG_WTF_CSRF_ENABLED: "False"
PGADMIN_CONFIG_SESSION_COOKIE_SAMESITE: "'None'"
PGADMIN_CONFIG_SESSION_COOKIE_SECURE: "True"

This configuration relaxes session and CSRF settings and is known to resolve rendering issues when using pgAdmin in Docker inside Codespaces.

  • Option 1 is safer as it preserves CSRF protection.

  • Option 2 should be used only if the blank screen persists after Option 1.

Always restart the pgAdmin container after changing environment variables.

Checklist

  • I have searched existing FAQs and this question is not already answered
  • The answer provides accurate, helpful information
  • I have included any relevant code examples or links

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions