'Remote connections to this server are not allowed' error when attempting to connect to H2 database in Confluence Server

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Problem

When attempting to connect remotely to the embedded H2 database in Confluence Server the following exception is thrown:

1 2 Connection to jdbc:h2:tcp://myserver.com/myconfluence/localhome/database/h2db failed. Remote connections to this server are not allowed.

Cause

Remote connections to the embedded H2 database are not permitted for security reasons. You can only connect to H2 from the server on which Confluence is installed.

Resolution

Connect to the embedded H2 database from the server on which Confluence is installed, as described in Embedded H2 Database.

Note: Plugin vendors can connect remotely to the embedded H2 database when Confluence is running in dev mode, but administrators should not use this as a workaround, and instead should migrate to a supported external database.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.