Sign inSign up

heyfworld/ferdium-server

By heyfworld

•Updated 4 months ago

Image
0

331

heyfworld/ferdium-server repository overview

⁠Modernized Ferdium Server

An optimized, modernized, and lightweight self-hostable Docker image for the Ferdium⁠ app client, built on Node.js 24 LTS and AdonisJS v5.

This is a drop-in replacement for the official legacy ferdium/ferdium-server image, optimized for homelabs and personal hosting.

⁠What It Does & Key Enhancements
  • Modern Tech Stack: Built on Node.js 24.16.0 LTS (Alpine) and pnpm v10.
  • Optimized Footprint: Multi-stage build with selective artifact copying to keep the runtime image size under ~120MB (saving over 60% compared to upstream).
  • Auto-Recipe Compiler: Automatically pulls, compiles, and packages the latest Ferdium recipe library on first startup without engine mismatch issues.
  • Enhanced Security: Automatic secure APP_KEY generation and JWT certificate generation at startup.
  • Health Checks: Built-in health check route that verifies both API responsiveness and database connectivity.

⁠Quick Start
# docker-compose.yml
services:
  ferdium-server:
    image: heyfworld/ferdium-server:latest
    container_name: ferdium-server
    ports:
      - "3333:3333"
    environment:
      - NODE_ENV=production
      - APP_URL=http://localhost:3333
      - DB_CONNECTION=sqlite
      - DATA_DIR=/data
      - JWT_USE_PEM=true
      - IS_REGISTRATION_ENABLED=true
      - IS_DASHBOARD_ENABLED=true
    volumes:
      - ./data/ferdium:/data
      - ./data/recipes:/app/recipes
    restart: unless-stopped

Copy

docker compose up -d

Copy

⁠Or with docker run:
docker run -d \
  --name ferdium-server \
  --restart unless-stopped \
  -p 3333:3333 \
  -e NODE_ENV=production \
  -e APP_URL=http://localhost:3333 \
  -e DB_CONNECTION=sqlite \
  -e DATA_DIR=/data \
  -e JWT_USE_PEM=true \
  -v $(pwd)/data/ferdium:/data \
  -v $(pwd)/data/recipes:/app/recipes \
  heyfworld/ferdium-server:latest

Copy

Open http://localhost:3333 — done.


⁠Environment Variables
VariableDefaultDescription
APP_URLhttp://localhost:3333The external URL used to access the server
DB_CONNECTIONsqliteDatabase driver (sqlite, pg, mysql)
DATA_DIR/dataDirectory where certificates and keys are stored
JWT_USE_PEMtrueGenerate/use RSA key pair PEM files for JWT auth
IS_REGISTRATION_ENABLEDtrueAllow new user registration
IS_DASHBOARD_ENABLEDtrueEnable web dashboard
CONNECT_WITH_FRANZfalseEnable integration/account import from Franz

Note: For external databases, configure standard credentials (DB_HOST, DB_PORT, DB_USER, DB_PASSWORD, DB_DATABASE).


⁠Advanced Configuration

For specialized deployments, you can tune the following advanced variables:

⁠Database Tuning & SSL
VariableDefaultDescription
DB_SSLfalseEnable SSL for database connections (e.g., PostgreSQL). Set true if hosted on cloud platforms.
DB_CA_CERTNoneCA certificate string for verifying secure database connections (overrides DB_SSL configuration if provided).
DB_DEBUGfalseEnable verbose database query logging for debugging.
DB_SQLITE_JOURNAL_MODEWALSQLite journal mode (DELETE, TRUNCATE, PERSIST, MEMORY, WAL, OFF).
DB_SQLITE_SYNCHRONOUSFULLSQLite synchronous mode (OFF, NORMAL, FULL, EXTRA).
DB_BUSY_TIMEOUT5000SQLite busy timeout in milliseconds before a query fails.

⁠JWT Authentication
VariableDefaultDescription
JWT_EXPIRY90dJWT Token expiration duration (e.g., 90d, 24h, 7d).
JWT_PUBLIC_KEYNoneOverride path or inline RSA public key PEM string.
JWT_PRIVATE_KEYNoneOverride path or inline RSA private key PEM string.

⁠Mail Service Settings
VariableDefaultDescription
MAIL_CONNECTIONsmtpMailer driver: smtp, ses, mailgun, sparkpost.
MAIL_REQUIRE_TLSfalseForce TLS encryption for SMTP connections.
MAIL_SSLfalseEnable SSL for SMTP connections.
SES_ACCESS_KEYNoneAWS SES Access Key ID.
SES_ACCESS_SECRETNoneAWS SES Access Secret Key.
SES_REGIONNoneAWS SES Region (e.g., us-east-1).
MAILGUN_API_KEYNoneMailgun API Private Key.
MAILGUN_DOMAINNoneMailgun Sending Domain name.
SPARKPOST_API_KEYNoneSparkPost API Transmit Key.

⁠Miscellaneous Configuration
VariableDefaultDescription
IS_CREATION_ENABLEDtrueAllow users to upload and package custom recipes.
LOG_LEVELinfoLogging verbosity level (e.g., trace, debug, info, warn, error).
APP_NAMEferdium-serverCustomized name of the application instance.

⁠Verify
# Verify API and Database Health
curl -s http://localhost:3333/health

# Check server startup logs
docker logs ferdium-server

Tag summary

Content type

Image

Digest

sha256:88b30cb2a…

Size

117.9 MB

Last updated

4 months ago

docker pull heyfworld/ferdium-server