Universal Admin GitHub

Run it on a server for your whole team

It's one program: put it on a server, and everyone opens it in a browser and logs in with their own database account. The database checks the password, and each account's rights decide what that person sees and may change.

Get Universal Admin

The one rule

Leave the password out of the database URL (postgres://db.example.com/shop), so people log in. With the password in the URL, nobody logs in, so the admin only answers on the machine it runs on, and refuses requests that come through a proxy.

As a service (systemd)

Put the program and a two-line config in a folder:

# /opt/universal-admin/config.yaml
connect: postgres://localhost/shop
# /etc/systemd/system/universal-admin.service
[Service]
ExecStart=/opt/universal-admin/universal-admin --config /opt/universal-admin/config.yaml
WorkingDirectory=/opt/universal-admin
Restart=always

[Install]
WantedBy=multi-user.target

On its first start it writes the key for people's logins next to the config, as .universal-admin-secret, readable by its owner only, so logins survive restarts.

Docker

docker run -p 8080:8080 -e UA_SESSION_SECRET=change-me-to-32-or-more-characters \
  ghcr.io/technoprodev/universal-admin --db postgres://db.example.com/shop

In a container, set UA_SESSION_SECRET (32 characters or more), since the container's disk is thrown away. To use a config file, mount its folder at /data.

Docker Compose, beside your database

services:
  admin:
    image: ghcr.io/technoprodev/universal-admin:latest
    command: --db postgres://db/shop
    environment:
      UA_SESSION_SECRET: ${UA_SESSION_SECRET}
    ports:
      - "127.0.0.1:8080:8080"
    depends_on: [db]
  db:
    image: postgres:17
    environment:
      POSTGRES_DB: shop
      POSTGRES_PASSWORD: ${DB_PASSWORD}

Kamal

As an accessory beside a Rails app: see the Rails guide.

HTTPS

Put any reverse proxy in front. With Caddy, which gets the certificate by itself:

admin.example.com {
  reverse_proxy 127.0.0.1:8080
}

To serve it under a path such as /admin/, have the proxy strip that prefix and set base_path: /admin/ in the config, so links and files point the right way.

Everything else (every setting, the config file, checking it with universal-admin check) is in the README.