get started Docker

Docker

Run socAdmin as a container next to the databases you already have, with a single command or a few lines of Compose.

Quick start

docker run -d \
  -p 8080:8080 \
  -v socadmin-data:/data \
  -e ADMIN_EMAIL=admin@example.com \
  -e ADMIN_PASSWORD='MyStr0ng!Pass' \
  soleilclems/socadmin

Open http://localhost:8080 and sign in with the email and password above.

  • -v socadmin-data:/data keeps accounts, settings and encryption keys across restarts. Always mount it.
  • ADMIN_EMAIL and ADMIN_PASSWORD create the first admin account on startup. Without them, the first person to register becomes the admin.

Docker Compose

Add socAdmin to the Compose file that runs your database. The *_HOST variables pre-configure the connection, so users don’t have to type the server address. Use the service name as the host.

services:
  socadmin:
    image: soleilclems/socadmin
    ports:
      - "8080:8080"
    volumes:
      - socadmin-data:/data
    environment:
      - ADMIN_EMAIL=admin@example.com
      - ADMIN_PASSWORD=MyStr0ng!Pass
      - MYSQL_HOST=mysql
      - MYSQL_USER=root
      - MYSQL_PASSWORD=secret
    depends_on:
      mysql:
        condition: service_healthy

  mysql:
    image: mysql:8
    environment:
      - MYSQL_ROOT_PASSWORD=secret
    volumes:
      - mysql-data:/var/lib/mysql
    healthcheck:
      test: ["CMD", "mysqladmin", "ping", "-h", "localhost"]
      interval: 5s
      timeout: 3s
      retries: 10

volumes:
  socadmin-data:
  mysql-data:

Then start everything:

docker compose up -d

Connecting to databases outside Compose

Inside a container, socAdmin blocks connections to private and loopback IP addresses by default (127.0.0.1, 10.x, 172.16–31.x, 192.168.x). This stops the UI from being used to probe your internal network.

Service names such as mysql or db.internal are not affected. If you need to reach a database by private IP, for example one on the host machine, opt in:

-e ALLOW_PRIVATE_NETWORKS=true

Cloud metadata addresses (169.254.x.x) stay blocked in every case.

The data volume

Everything socAdmin keeps lives in a single SQLite file, /data/socadmin.db:

  • socAdmin accounts, roles and settings
  • saved database credentials, encrypted
  • the encryption key for those credentials, generated on first start
  • the JWT signing secret, when JWT_SECRET is not set

If you lose the volume, every account and saved connection is gone. Back it up like any other database.

Audit logs (sign-ins, connections, queries run) are written to standard output, so read them with docker logs. They never contain passwords, query text or row data.

Image details

  • Based on alpine:3.21, about 30 MB.
  • Runs as the non-root user socadmin.
  • Built-in health check on /.
  • Architecture: linux/amd64.
  • Listens on port 8080. Change it with PORT.

Next, put it behind HTTPS: Production setup.