Skip to content

SSL not working - Web server is disabled error #4381

Open

Description

@danieleperaz
  • Serverpod on Windows
  • Postgresql on local machine
  • serverpod create test_project
  • change database port to 5432 on /config/development.yaml
  • change database password on /config/development.yaml
  • manually create database on local Postgresql
  • dart main.dart --apply-migrations
  • runs fine, now setup SSL:
  • copy certificate.pem and private.key files to /bin folder
  • in server.dart before void run(...) add:
final securityContext = SecurityContext()
  ..useCertificateChain('certificate.pem')
  ..usePrivateKey('private.key');
  • edit void run(...) to:
  final pod = Serverpod(
    args,
    Protocol(),
    Endpoints(),
    securityContextConfig: SecurityContextConfig(
      apiServer: securityContext,
      webServer: securityContext,
      insightsServer: securityContext,
    ),
  );
  • change publicScheme to https on development.yaml

dart main.dart --apply-migrations give this error:

SERVERPOD version: 2.9.2, dart: 3.10.3 (stable) (Tue Dec 2 01:04:53 2025 -0800) on "windows_x64", time: 2025-12-08 09:34:21.235571Z
runMode: development
serverId: default
role: monolith
loggingMode: normal
applyMigrations: true
applyRepairMigration: false
SERVERPOD initialized, time: 2025-12-08 09:34:21.275788Z
Unhandled exception:
Bad state: Web server is disabled, supply a web server configuration to enable this feature.
#0      Serverpod.webServer (package:serverpod/src/server/serverpod.dart:142:7)

Activity

  1. changed the title [-]SSL not working[/-] [+]SSL not working - Web server is disabled[/+] on Dec 8, 2025
  2. changed the title [-]SSL not working - Web server is disabled[/-] [+]SSL not working - Web server is disabled error[/+] on Dec 8, 2025
  3. added
    bug
    on Dec 19, 2025
  4. moved this from Inbox 📫 to Next Up 🎯 in Serverpod Frameworkson Dec 19, 2025
  5. added
    area: web server
    on Dec 19, 2025
  6. moved this from Next Up 🎯 to Planned 🔭 in Serverpod Frameworkson Jan 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: web serverbug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions