Skip to content

Instantly share code, notes, and snippets.

@MrPandir
Created December 23, 2025 18:38
Show Gist options
  • Select an option

  • Save MrPandir/e8d7168bafbe3be77bd46bf4903b6c7a to your computer and use it in GitHub Desktop.

Select an option

Save MrPandir/e8d7168bafbe3be77bd46bf4903b6c7a to your computer and use it in GitHub Desktop.
This Adminer plugin keeps you logged in for up to 30 days by extending the login session lifetime.
services:
db:
image: postgres:18
container_name: ${COMPOSE_PROJECT_NAME}_postgres
restart: always
environment:
POSTGRES_USER: user
POSTGRES_PASSWORD: password
POSTGRES_DB: db
# ports:
# - 5432:5432
volumes:
- postgres-data:/var/lib/postgresql
adminer:
image: adminer:5
container_name: ${COMPOSE_PROJECT_NAME}_adminer
restart: always
# ports:
# - 8080:8080
# environment:
# ADMINER_DESIGN: custom
volumes:
# - ./adminer.css:/var/www/html/designs/custom/adminer.css:ro
- ./permanent-login.php:/var/www/html/plugins-enabled/permanent-login.php:ro
depends_on:
- db
volumes:
postgres-data:
<?php
class AdminerPermanentLogin {
function permanentLogin($create = false) {
return 'your-very-strong-unique-secret-key-here';
}
}
return new AdminerPermanentLogin();
@MrPandir
Copy link
Author

Replace your-very-strong-unique-secret-key-here with your own unique secret key. You can generate one using the command:

openssl rand -hex 32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment