Skip to content

Repository files navigation

EasyImage Go

EasyImage Go is a single-instance image host built with Fiber, GORM and embedded SQLite.

Images can use the local filesystem or S3-compatible object storage, while users, tokens, sessions, logs and metadata are stored in SQLite.

Build and run

Go 1.26 is pinned in mise.toml.

mise install
mise exec -- go build -o easyimage ./cmd/easyimage
EASYIMAGE_ADMIN_PASSWORD='replace-with-a-long-password' ./easyimage init
./easyimage serve --listen :8080

Documentation

Initialization

Initialization is one-time only. Without EASYIMAGE_ADMIN_PASSWORD, init reads a hidden password from an interactive terminal.

If an administrator password is lost, stop public traffic and reset it from the local CLI. The command accepts the same hidden terminal, --password-stdin, and EASYIMAGE_ADMIN_PASSWORD input methods as initialization:

EASYIMAGE_ADMIN_PASSWORD='replace-with-a-new-long-password' \
  ./easyimage reset-password --username admin

Persistent

The default persistent paths are:

  • data/config.json: typed runtime configuration and signing keys
  • data/easyimage.db: SQLite metadata
  • data/images/: images and recycle storage
  • data/resources/: administrator-managed fonts and watermark images

Others

S3-compatible storage, upload security policies, external content moderation, quarantine, and dry-run automatic deletion can be configured from the administrator settings page.

  1. See Storage backends, Upload security policies, and Upload client configuration.

  2. Compression, conversion, watermarks, EXIF privacy, and thumbnail generation are documented in Image processing.

  3. Optional Valkey-backed rate limiting and its development Compose service are documented in Valkey rate limiting.

  4. Review the deployment security checklist before exposing an instance or designing backup, restore, and credential-rotation procedures.

Container

The image runs as UID 10001 and stores all mutable state in /data. Initialize the volume once:

docker compose run --rm -e EASYIMAGE_ADMIN_PASSWORD='replace-with-a-long-password' easyimage init
docker compose up -d

Verification

mise exec -- go test ./...
mise exec -- go vet ./...
CGO_ENABLED=1 mise exec -- go test -race ./...

The official GORM SQLite driver uses CGO. Install a C compiler for local builds.

Contributors

Languages