Skip to content

[Bug-report] NGINX fails with "could not build server_names_hash" for long domain names #124

@OstaninKI

Description

@OstaninKI

⚠️ Preconditions

💿 Operating System

Ubuntu 24.04

📦 Installation Method

Panel only

❔ Problem Description

Problem

After installation with domains like panel.somelongdomain.com, sub.somelongdomain.com, node.somelongdomain.com,
NGINX container fails to start with error:

could not build server_names_hash, you should increase server_names_hash_bucket_size: 32

This causes PR_END_OF_FILE_ERROR in browser when accessing the panel.

Root Cause

Default server_names_hash_bucket_size is 32 bytes, which is too small for longer domain names.

Solution

Add server_names_hash_bucket_size 64; to the beginning of generated nginx.conf.

Workaround

sed -i '1i server_names_hash_bucket_size 64;' /opt/remnawave/nginx.conf
cd /opt/remnawave && docker compose restart remnawave-nginx

⚙️ Steps to Reproduce

Use any long domain name or a deep subdomain structure.

📎 Logs or Screenshots

remnawave-nginx | 2025/12/12 07:25:24 [emerg] 7#7: could not build server_names_hash, you should increase server_names_hash_bucket_size: 32
remnawave-nginx | nginx: [emerg] could not build server_names_hash, you should increase server_names_hash_bucket_size: 32

ℹ️ Additional Information

Script version: 2.2.3a

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions