Moera node configuration file is a YAML file containing configuration options.
The file should be placed in the
moera-node working directory and named
application-prod.yml for the production server or
the development server.
Configuration options have names like
node.registrar.domain. In the configuration
file they may be set in two forms:
node: registrar: domain: moera.blog
Here is a minimal configuration file you may use as a basis for your configuration:
server: port: 8081 spring: datasource: url: jdbc:postgresql:<DB name>?characterEncoding=UTF-8 username: <DB username> password: <DB password> flyway: user: <DB username> password: <DB password> node: root-secret: <secret> mail: reply-to-address: <mailrobot e-mail address> root-address: <admin e-mail address> media: path: media/
See the explanation of these and other options below.
All server properties are listed in Spring Boot documentation. The built-in web
server used by
moera-node is Tomcat.
Server HTTP port.
Maximum amount of request body to swallow. Increase this number to support uploading large files.
spring.datasource.url: jdbc:postgresql:<DB name>?characterEncoding=UTF-8
JDBC URL of the database.
spring.datasource.username: <DB username>
Login username of the database.
spring.datasource.password: <DB password>
Login password of the database.
spring.flyway.user: <DB username>
Login user of the database to migrate.
spring.flyway.password: <DB password>
Login password of the database to migrate.
A long random sequence of characters that is used to authenticate as a topmost administrator (root admin) of the server.
node.address: <IP address>
IP address of the server visible to the clients. In most cases, there is no need to configure it, since the address is detected automatically. But on servers having several uplinks, it may be necessary to set the address explicitly.
Location of the directory where media files are stored. The directory must be
readable and writable by
moera-node process. The path is relative to
moera-node working directory.
This option defines how media files are served to the client. The possible values are:
stream— the file is streamed to the client directly;
sendfile— the file’s location is passed back to the proxying web server in
X-Sendfileheader (used by Apache);
accel— the file’s location is passed back to the proxying web server in
X-Accel-*headers (used by NGINX).
node.media.serve is set to
accel, this option sets a prefix added to
the names of media files. This prefix is then used in NGINX configuration to
configure serving media files from the media files directory.
moera-node allows to run several nodes on a single server instance. Each node
should have a separate domain name. Depending on the configuration, nodes may be
created only by the server administrator, or by any user.
The node named
_default_ is created automatically during the installation. If you
have no plans to run several nodes, the default node is all you need.
Activates the multi-node mode. The possible values are:
none— single node mode (you also need to set
private— multi-node mode, only the server administrator may create new nodes (you also need to set
public— multi-node mode, any user may create a node (you also need to set
node.domain: <domain name>
node.multi is set to
none, this option defines domain name of the single node.
node.registrar.host: <host name>
node.multi is set to
public, this option defines the host name of the built-in
web interface for creating nodes. If a user opens a subdomain that has no node
defined for it, they are redirected automatically to the web interface for creating
node.registrar.domain: <domain name>
node.multi is set to
public, this option defines the name of
the domain where subdomains are created for the new nodes. Note that
cannot register subdomains in DNS by itself, so you need to have a wildcard
subdomain defined on the DNS server. Or you can add subdomains manually for every
All mail properties are listed in Spring Boot documentation. In addition, there
are several properties specific to
SMTP server host.
SMTP server port.
Login user of the SMTP server.
Login password of the SMTP server.
Additional JavaMail properties.
true, attempt to authenticate the user using the
true, enables the use of the
STARTTLS command (if supported by the server)
to switch the connection to a TLS-protected connection before issuing any login
node.mail.send-limit: 10 node.mail.send-period: 10
Limit the rate of outbound mail to
node.mail.send-limit mails in
The e-mail address that is put to the
Reply-To: header in outgoing mails.
E-mail address of the server’s administrator.
It is possible to use the configuration file to override the built-in default values of the node settings. This will affect all nodes in the server.
The settings are given as a list of name-value pairs:
node: options: - name: posting.max-size defaultValue: 65536 - name: posting.subject.present defaultValue: true
These options set the number of threads in the thread pools used by
various purposes. Larger number increases memory usage and the peak load on
the server, but allows to run more tasks in parallel.
The pool used to resolve node names with Moera naming service.
The pool used to send notifications to other nodes.
The pool used to fetch posts from other nodes.
The pool used to push notifications to clients.
The pool used for unspecified background tasks.
Number of old log files that are preserved.
If set to
true, a random delay is added before answering to any request,
to simulate network latency.