If you like my work, please consider supporting its development.

BluestNight provides an official Docker image for Nebula Forms, for easy setup. This guide describes how to set up the Docker image for use with Docker Compose.

This guide assumes that you already have Docker and Docker Compose installed. If not, download and install them. Links are provided below for convenience.

  • Windows: Docker (Docker Compose should be bundled).
  • Mac: Docker (Docker Compose should be bundled).
  • Linux: Install docker and docker-compose through the package manager (package names may vary).
  • FreeBSD: Install docker and docker-compose-py36.

Download the Latest Image

Different tagged images of Nebula Forms are provided for convenience.

  • devel is built with changes that have not been tested yet and should not be used for production systems. You may be asked to use this image to test that an issue got fixed.
  • latest contains the current release of Nebula and is updated to the newest version when it is released.
  • There are also versions for each release of Nebula to allow reverting to an older working version in case incompatible changes occur. These are tagged vA.B.C, where A.B.C corresponds to a version number.

It’s recommended to use the latest image, like so:

docker pull bluestnight/nebula-forms:latest

Create The Configuration File(s)

To avoid duplicating content, refer to the getting started guide for a walkthrough of setting up the configuration. This guide assumes you are using a Linux system with the configuration file(s) contained in /etc/nebula-forms.

Create The Docker Compose File

Docker Compose is a tool used for managing multiple containers on a single Docker installation. Configuration options are set in a configuration file instead of on the command-line. Configuration files are written in YAML - you can find documentation for Docker Compose files here.

Below, you can find a working template file for Nebula Forms. This guide assumes the file will be saved to /etc/docker/docker-compose.yml.

version: "3.2"
services:
    nebula:
        image: bluestnight/nebula-forms:latest
        # This maps port 2002 in the container to 2003 on the host
        port:
            - "2003:2002"
        # Instructs docker-compose how to deploy the container and
        # when/whether to restart it.
        deploy:
            replicas: 1
            restart_policy:
                condition: on-failure
            # Define resource limits and reservations
            resources:
                limits:
                    cpus: '0.40' # Max 40% of CPU time
                    memory: 50M # Max 50 MiB of RAM
                reservations:
                    cpus: '0.05' # Reserve 5% of CPU time
                    memory: 10M # Reserve 10 MiB of RAM
        # Set an environment variable for where the entry config
        # file is located in the container. Defaults to
        # /etc/nebula-forms/config.toml if not set.
        environment:
            CONFIG_FILE: /etc/nebula-forms/config.toml
        # Configure where logs can be found on host system.
        # Can be set to journald on systemd systems
        logging:
            driver: json-file
        # Mounts a directory on the host inside the container
        volumes:
            - type: bind
              source: /etc/nebula-forms
              target: /etc/nebula-forms

Starting/Stopping The Container

Start the container using docker-compose:

docker-compose -f /etc/docker/docker-compose.yml up

The container can be stopped later:

docker-compose -f /etc/docker/docker-compose.yml down

For other things, check the Docker Compose reference.

Set Up a Reverse Proxy

To have Nebula available on ports 80 or 443 (standard HTTP(S)), you should set up a reverse proxy.