Can't get TLS working

I have Neo4J Community Edition 2025.03 installed. It runs fine without TLS. My system is a virtual machine with Ubuntu. I installed with apt install.

I wish to enable TLS following the steps here: https://neo4j.com/docs/operations-manual/2025.03/security/ssl-framework/ .

Steps taken:

  1. Copy netty-tcnative-2.0.70.Final-linux-x86_64.jar from /usr/share/neo4j/lib/netty-tcnative to /var/lib/neo4j/plugins

  2. In neoj4.conf, set dbms.netty.ssl.provider=OPENSSL

  3. Generated certificates with Let's Encrypt (certbot)

  4. Set the following in neo4j.conf:
    server.bolt.enabled=true
    server.bolt.tls_level=OPTIONAL
    server.bolt.listen_address=:7687
    dbms.ssl.policy.bolt.enabled=true
    dbms.ssl.policy.bolt.base_directory=certificates/bolt
    dbms.ssl.policy.bolt.private_key=private.key
    dbms.ssl.policy.bolt.public_certificate=public.crt

  5. Restarted Neo4J

  6. Attempted to connect with secure Bolt: cypher-shell -u <MYUSER> -p <MYPASS> -a bolt+s://localhost:7687
    Result:
    Unable to write Bolt handshake to localhost:7687.

  7. Attempted to connect with non-secure Bolt: cypher-shell -u <MYUSER> -p <MYPASS> -a bolt://localhost:7687
    Result:
    Connection to the database terminated. Please ensure that your database is listening on the correct host and port and that you have compatible encryption settings both on Neo4j server and driver. Note that the default encryption setting has changed in Neo4j 4.0.

In debug.log, I see a (long) stack trace of errors that includes the following lines:

  • java.lang.IllegalArgumentException: Failed to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative]
  • java.io.FileNotFoundException: META-INF/native/libnetty_tcnative_x86_64.so
  • java.lang.UnsatisfiedLinkError: no netty_tcnative_x86_64 in java.library.path: /usr/java/packages/lib:/usr/lib/x86_64-linux-gnu/jni:/lib/x86_64-linux-gnu:/usr/lib/x86_64-linux-gnu:/usr/lib/jni:/lib:/usr/lib
  • java.lang.UnsatisfiedLinkError: could not load a native library: netty_tcnative

I guess the netty-tcnative plugin doesn't get loaded. I'd appreciate any help to get this working!

I remark that all runs fine when I set server.bolt.tls_level=DISABLED. Just no TLS then.

I have exactly the same issue. Did you reach to solve it ?

No I wasn’t able to solve it. I worked around the problem by deploying the client application on the same machine so my traffic could stay inside localhost.

I’ve sent a mail to the neo4j community support. I hope they will help us !

Hi - let me see if I can ask someone to assist this with.

Thanks, I can share my compose file by mail if needed.

I did test with neo4j 5.26.3 & 2025.08. I get the same error message with the two docker images

Hi @mdelambilly - I have a response but it is not ideal.

This issue seems to be is caused by an unintended breaking change introduced with the Jetty version update included in Neo4j. It cannot be fixed without a code change. The current workaround is to generate new certificates with a valid hostname.

The problem is known, but there is no confirmed timeline for resolution. Using HTTPS on localhost is not recommended. As an alternative, an earlier release (e.g., 5.10) may work, though it has not been tested.

Someone internally suggested test https in an Aura Free instance and connect to that. OR If you want to test the config, try it on a cloud instance rather than localhost or try an older version of neo4j.

These were some potential suggestions, but for now the actual issue is more involved. I hope you are able to find a work around.

Sorry Ari,

I do not understand, neo4j docker app is installed on a server on which I directed my domain name. I generated certificated with LetsEncrypt to connect to it in SSL/TLS.

I connect to neo4j browser using a subdomain in https. This part works just fine. But when I give to neo4j browser the bolt URL, I get the error message about its inability to load any of the given libraries: [netty_tcnative_linux_x86_64, netty_tcnative_linux_x86_64_fedora, netty_tcnative_x86_64, netty_tcnative].

@Ari_Neo4j Now that I explained you how I installed neo4j in docker in a server, can you explain me what is no correct ?

@mdelambilly - I have escalated for further clarification. As soon as I get a response, I will let you know ASAP.

Thanks @Ari_Neo4j ,

menawhile I tried to load cypher shell 2025.08 for windows but got this:

NoSuchKey

The specified key does not exist.

cypher-shell/cypher-shell-2025.08.zip

0NGPSQ22A9BN6CC1

FzqrfWj4ckkbtmYEIO9NtYmZpd5v5VWMYBYbjx0EzmRAKJE5ZYQwJ8axT2mZoHuIz/nLHVLBRikW6Fag9oVNqKYngdt2fadpIGU7uINh7C0=

@Ari_Neo4j Any new about this topic ?

Hi @mdelambilly - no new updates. I will reply once I have one.