How fix 500 Internal Server Error?

Hi Community,

I am attempting to install Corteza for the first time, but I’m encountering a 500 Internal Server Error. I diligently followed the instructions, even resorting to copying and pasting directly from the documentation. However, the issue persists. I suspect I may have overlooked a crucial step. Here’s a detailed account of the process I followed.

  1. Installed, started/enabled docker.

  2. Created a new network by running command “docker network create -d bridge proxy”.

  3. Created nginx directory in /opt/

  4. Created docker-compose. yaml and copied content from the documentation and pasted it into the file.

  5. Created a custom.conf file copied content from the documentation and pasted it into it.

  6. started the container by running the command “docker-compose up -d.”

  7. Created the “corteza” directory in /opt.

  8. I created a .env file in the corteza directory, pasted content from the documentation into the file, and changed the domain name.

  9. Created docker-compose. yaml file and added content copied from the documentation.

  10. Started by running “docker-compose up -d.”

  11. Verified containers are running by running the ps command.

  12. I added http and https services to the firewall and later added ports as well when Corteza didn’t come up.

I restarted containers multiple times but still got the 500 Internal server error. What else needs to be done, and what did I miss to include or exclude from the files? I appreciate your help.

Here is the error message screenshot.

Might help out if you share your .env and docker-compose.yml files.
PS you don’t need to make the networks via docker command; docker-compose does all that shabang.

I got the below error when run the docker compose command in first time so I created the network I thought it might required.

Error response from daemon: network proxy not found

Here is .env file contents:

# docker-compose supports environment variable interpolation/substitution in compose configuration file
# (more info: https://docs.docker.com/compose/environment-variables)
# General settings
DOMAIN="desk.homelab.local"
VERSION=2023.3
# Database connection
DB_DSN=postgres://corteza:corteza@db:5432/corteza?sslmode=disable
# Server settings
# Serve Corteza webapps alongside API
HTTP_WEBAPP_ENABLED=true
# Send action log to container logs as well
# ACTIONLOG_DEBUG=true
# Uncomment for extra debug info if something goes wrong
# LOG_LEVEL=debug
# Use nicer and colorful log instead of JSON
# LOG_DEBUG=true
# Authentication
# Secret to use for JWT token
# Make sure you change it (>30 random characters) if
# you expose your deployment to outside traffic
AUTH_JWT_SECRET=h8fj94njsG4kLm27zYxQr8VbU5w2JkD1TmP3XsOp
# SMTP (mail sending) settings
# Point this to your local or external SMTP server if you want to send emails.
# In most cases, Corteza can detect that SMTP is disabled and skips over sending emails without an error
#SMTP_HOST=smtp.gmail.com:587
#SMTP_USER=email@gmail.com
#SMTP_PASS="password"
#SMTP_FROM='"desk" <info@homelab.local>'

And here is docker-compose.yaml file contents

#version: '3.5'
services:
  server:
    image: cortezaproject/corteza:${VERSION}
    networks: [ proxy, internal ]
    restart: always
    env_file: [ .env ]
    depends_on: [ db ]
    volumes: [ "./data/server:/data" ]
    environment:
      # VIRTUAL_HOST helps NginX proxy route traffic for specific virtual host to
      # this container
      # This value is also picked up by initial boot auto-configuration procedure
      # If this is changed, make sure you change settings accordingly
      VIRTUAL_HOST: ${DOMAIN}
      # This is needed only if you are using NginX Lets-Encrypt companion
      # (see docs.cortezaproject.org for details)
      LETSENCRYPT_HOST: ${DOMAIN}
  db:
    # PostgreSQL Database
    # See https://hub.docker.com/_/postgres for details
    # Support for postgres 13, 14 and 15 is available in the latest version of Corteza
    image: postgres:15
    networks: [ internal ]
    restart: always
    healthcheck: { test: ["CMD-SHELL", "pg_isready -U corteza"], interval: 10s, timeout: 5s, retries: 5 }
    environment:
      # Warning: these are values that are only used on 1st start
      #          if you want to change it later, you need to do that
      #          manually inside db container
      POSTGRES_USER:     corteza
      POSTGRES_PASSWORD: corteza
networks:
  internal: {}
  proxy: { external: true }

Thanks