Skip to content

Running Sicura Console

Sicura Console is distributed as a container image and can be run using Docker or Podman.

Running Options

The Sicura Console runs from the <version>-rails image and is configured entirely through environment variables. You can run it:

  1. As a single container - see Running the Sicura Console Image
  2. Behind Nginx for SSL termination - see the reference SSL deployment
  3. As systemd services - see the Podman Quadlet reference deployment

The environment variables are listed in Sicura Console Environment Variables.

Note: The Classic Console runs from the <version> image. Its examples, including volume mounts and Docker Compose, are in Running the Console Container.

What Happens at Startup

The container runs two processes, and their output goes to the container log:

  • Nginx - serves the web interface on port 80 and passes API and agent traffic to the Console.
  • The Console application - handles API and agent requests and runs background jobs.

Before the application starts, it prepares its databases: it creates any that are missing and applies database migrations. This happens on every start, so the first start and the first start after an upgrade take longer than usual. The web interface returns errors until the application is up; /readiness reports when it is.

Everything the Console stores is in its PostgreSQL databases. You can remove the container and start a new one without losing data, as long as the new container gets the same settings, including the same SECRET_KEY_BASE; see Secret Key Base.

Note: The Classic Console does not use SECRET_KEY_BASE. It takes its license and sicura-console.yaml from environment variables or mounted files instead, so keep those with its other settings when you recreate the container.

Container Management

Viewing Container Logs

# View logs in real-time
docker logs -f sicura-console

# View the most recent 100 lines
docker logs --tail 100 sicura-console

Container Lifecycle Management

# Stop the container
docker stop sicura-console

# Start the container
docker start sicura-console

# Restart the container
docker restart sicura-console

# Remove the container (must be stopped first)
docker rm sicura-console

Automatic Restarts

The container runs several services, including the Console application and its web server. If any of them stops unexpectedly, or keeps failing as it starts, the whole container stops with exit status 1. Run the container with a restart policy so it comes back on its own:

A container that restarts repeatedly is a sign of a persistent problem, such as a database the Console cannot reach. Check the logs from before the restart with docker logs sicura-console. Stopping the container yourself, with docker stop for example, still exits with status 0.

Accessing the Container Shell

For troubleshooting:

docker exec -it sicura-console /bin/bash

The Console application is in /opt/sicura/console/code and runs as the sicura-console user.

Health Monitoring

The container answers two health checks on port 80:

  • /liveness - returns status 200 as soon as Nginx is running. It does not check the Console application.
  • /readiness - returns status 200 when the Console is ready to serve requests, and 503 when it is not. While the application is still starting, it returns a 502 error from Nginx instead.
curl -i http://localhost/readiness

The /readiness response is JSON. all_ready is ok when every check passes, and checks gives the result of each check: the application (core_ready), the database connections (db_ready), the built-in system account (system_session_ready), and the background job workers (workers).

Use /readiness for a load balancer or orchestrator health check. Use /liveness only to check that the container is running.