Installation

How to install and run Alarik using Docker.

This guide will walk you through getting Alarik up and running on your system. The recommended approach is using Docker, which handles all dependencies and provides a consistent environment across platforms.

Prerequisites

Before you begin, make sure you have the following installed:

Quick Start with Prebuilt Images

The easiest way to get started is using the prebuilt Docker images from GitHub Container Registry. Create a docker-compose.yml file:

services:
  alarik:
    image: ghcr.io/achtungsoftware/alarik:latest
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      - API_BASE_URL=http://localhost:8080
      - CONSOLE_BASE_URL=http://localhost:3000
      - ADMIN_USERNAME=alarik
      - ADMIN_PASSWORD=alarik
      - JWT=YOUR_SECURE_JWT_KEY
      - ALLOW_ACCOUNT_CREATION=false
    volumes:
      - alarik-storage:/app/Storage

  console:
    image: ghcr.io/achtungsoftware/alarik-console:latest
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - NUXT_PUBLIC_API_BASE_URL=http://localhost:8080
      - NUXT_PUBLIC_CONSOLE_BASE_URL=http://localhost:3000
      - NUXT_PUBLIC_ALLOW_ACCOUNT_CREATION=false
    depends_on:
      - alarik

volumes:
  alarik-storage:

Then start the services:

docker compose up -d

Once started, the following services will be available:

ServiceURLDescription
APIhttp://localhost:8080S3-compatible API endpoint
Consolehttp://localhost:3000Web-based management interface

Configuration

Alarik is configured through environment variables passed directly to each Docker container.

Alarik API Variables

API_BASE_URL
string
The base URL where the Alarik API is accessible. Used for generating correct URLs in responses.
API_BASE_URL=http://localhost:8080
CONSOLE_BASE_URL
string
The base URL where the web console is accessible.
CONSOLE_BASE_URL=http://localhost:3000

Console Variables

The console uses Nuxt and requires the NUXT_PUBLIC_ prefix for environment variables:

NUXT_PUBLIC_API_BASE_URL
string
The base URL of the Alarik API that the console connects to.
NUXT_PUBLIC_API_BASE_URL=http://localhost:8080
NUXT_PUBLIC_CONSOLE_BASE_URL
string
The base URL where the console is accessible.
NUXT_PUBLIC_CONSOLE_BASE_URL=http://localhost:3000
NUXT_PUBLIC_ALLOW_ACCOUNT_CREATION
boolean
Controls whether the registration form is shown in the console UI.
NUXT_PUBLIC_ALLOW_ACCOUNT_CREATION=false

Authentication

A default admin user is always created on first startup. You can customize the credentials using these variables:

ADMIN_USERNAME
string
Username for the default admin account.
ADMIN_USERNAME=alarik
ADMIN_PASSWORD
string
Password for the default admin account.
ADMIN_PASSWORD=alarik
Change the default admin credentials before deploying to production. The default values are publicly known and should only be used for local development.

S3 Access Keys

You can configure default S3 access keys for the admin account:

DEFAULT_ACCESS_KEY
string
Default S3 access key ID.
DEFAULT_ACCESS_KEY=AKIAIOSFODNN7EXAMPLE
DEFAULT_SECRET_KEY
string
Default S3 secret access key.
DEFAULT_SECRET_KEY=wJalrXUtnFEMI/K7MDENG/bPxRfiCYEXAMPLEKEY
These example keys are from AWS documentation and are publicly known. Always generate unique keys for production environments.

Account Settings

ALLOW_ACCOUNT_CREATION
boolean
Controls whether users can register new accounts through the console. When disabled, only administrators can create new accounts. This should be disabled in production.
ALLOW_ACCOUNT_CREATION=false

Test the API

Using the AWS CLI:

aws s3 --endpoint-url http://localhost:8080 ls

Or with curl:

curl http://localhost:8080

Create a Test Bucket

aws s3 --endpoint-url http://localhost:8080 mb s3://my-first-bucket

Building from Source (Advanced)

If you prefer to build natively without Docker, you'll need Swift 6.2 or later installed on your system.

Native builds are only supported on Linux and macOS. Windows users must use Docker.
cd alarik
swift run

For the web console (requires Node.js):

cd console
npm install
npm run dev