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/socadminOpen http://localhost:8080 and sign in with the email and password above.
-v socadmin-data:/datakeeps accounts, settings and encryption keys across restarts. Always mount it.ADMIN_EMAILandADMIN_PASSWORDcreate 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:services:
socadmin:
image: soleilclems/socadmin
ports:
- "8080:8080"
volumes:
- socadmin-data:/data
environment:
- ADMIN_EMAIL=admin@example.com
- ADMIN_PASSWORD=MyStr0ng!Pass
- POSTGRES_HOST=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=secret
depends_on:
postgres:
condition: service_healthy
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_PASSWORD=secret
volumes:
- pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 10
volumes:
socadmin-data:
pg-data:services:
socadmin:
image: soleilclems/socadmin
ports:
- "8080:8080"
volumes:
- socadmin-data:/data
environment:
- ADMIN_EMAIL=admin@example.com
- ADMIN_PASSWORD=MyStr0ng!Pass
- MONGO_HOST=mongo
depends_on:
mongo:
condition: service_healthy
mongo:
image: mongo:7
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 3s
retries: 10
volumes:
socadmin-data:
mongo-data:services:
socadmin:
image: soleilclems/socadmin
ports:
- "8080:8080"
volumes:
- socadmin-data:/data
environment:
- ADMIN_EMAIL=admin@example.com
- ADMIN_PASSWORD=MyStr0ng!Pass
- JWT_SECRET=change-me-to-a-random-string-at-least-32-chars
- MYSQL_HOST=mysql
- MYSQL_USER=root
- MYSQL_PASSWORD=secret
- POSTGRES_HOST=postgres
- POSTGRES_USER=postgres
- POSTGRES_PASSWORD=secret
- MONGO_HOST=mongo
depends_on:
mysql:
condition: service_healthy
postgres:
condition: service_healthy
mongo:
condition: service_healthy
restart: unless-stopped
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
postgres:
image: postgres:16-alpine
environment:
- POSTGRES_PASSWORD=secret
volumes:
- pg-data:/var/lib/postgresql/data
healthcheck:
test: ["CMD-SHELL", "pg_isready -U postgres"]
interval: 5s
timeout: 3s
retries: 10
mongo:
image: mongo:7
volumes:
- mongo-data:/data/db
healthcheck:
test: ["CMD", "mongosh", "--eval", "db.adminCommand('ping')"]
interval: 5s
timeout: 3s
retries: 10
volumes:
socadmin-data:
mysql-data:
pg-data:
mongo-data:Then start everything:
docker compose up -dConnecting 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=trueCloud 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_SECRETis 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 withPORT.
Next, put it behind HTTPS: Production setup.