SQL-Config

Info:
When a “default” is mentioned for any option, it is meant that if the option is commented out or removed, that is what BlueMap will use as a fallback.
This may not be the same as the option that is pre-filled-in.

storage-type

The storage-type of this storage.

Depending on this setting, different config-entries are allowed/expected in this config file.

Don’t change this value! (If you want a different storage-type, check out the other example-configs)

connection-url

The JDBC-Connection URL that is used to connect to the database.

The exact format of the url is determined by the JDBC-Driver you are using.
But the format for this url is usually something like: jdbc:[driver]://[host]:[port]/[database]

connection-properties

You can set any additional (JDBC-Driver-specific) properties here
Usually that’s your db-user and password

Example:

connection-properties: {
  user: "myUser",
  password: "myPassword"
}

max-connections

The maximum number of connections to the database that are allowed to be open at the same time. A negative number means unlimited.

Default is -1

driver-jar

This can be used to load a custom jdbc-driver from a .jar file.

E.g. if your runtime-environment is not already providing the sql-driver you need, you could download the MariaDB JDBC-Connector.
And place it in the ./bluemap folder and use it like this:

driver-jar: "bluemap/mariadb-java-client-3.0.7.jar"

driver-class

This is the driver-class that BlueMap will try to load and use.
Check the documentation of the driver you are using if you don’t know this.

Leaving this commented means that BlueMap automatically tries to find a suitable driver in your classpath.
(If you added a custom driver-jar above, you HAVE TO set the correct class name here)

connection-init-sql

SQL-statements that are executed once on every new connection to the database.

Leaving this commented out means that BlueMap uses sensible defaults for the used sql-dialect. These are:

MySQL / MariaDB

connection-init-sql: [] #(no initialization SQL)

PostgreSQL

connection-init-sql: [
  "SET synchronous_commit = off"
]

SQLite

connection-init-sql: [
  "PRAGMA journal_mode = WAL"
  "PRAGMA synchronous = NORMAL"
  "PRAGMA busy_timeout = 30000"
  "PRAGMA foreign_keys = ON"
]

table-prefix

The prefix that is prepended to the names of all tables BlueMap creates and uses.
Only lowercase letters (a-z), digits (0-9) and underscores () are allowed, with a maximum length of 32 characters.
Changing this value on an existing setup will NOT rename existing tables or move data, BlueMap will create new, empty ones instead.
_Default is
bluemap_

compression

The compression-type that bluemap will use to compress generated map-data. Available compression-types are:

  • gzip
  • zstd
  • deflate
  • none Default is gzip