Pelican Panel
Pelican Panel is a game server panel forked from Pterodactyl which manages Docker containers on multiple machines, using their control plane Wings. Wings is required to use it and vice versa. To set up Wings, see the docs for services (P).
Read the official docs before continuing.
Note
Pelican Panel plugins are currently not supported on NixOS.
Basic Usage
# configuration.nix
{ pkgs, ... }:
{
services.pelican-panel = {
enable = true;
openFirewall = true;
# Secrets saved like this will be world-readable in the store:
secretEnvironmentFile = pkgs.writeText "secrets.env" ''
APP_KEY="my-super-secret-app-key"
'';
};
}
The web installer is disabled by default. This means that you have to create the first admin user yourself. Run
pelican-artisan p:user:make --admin
The secretEnvironmentFile option has to be set to the absolute path of a file that exists. Please use a proper secret management scheme to provide it.
By default, the panel runs using Caddy on an insecure port (services (P)). Caddy will not listen on ports 80 and 443. You can configure Caddy to serve via https by setting services (P) to a valid domain and the port to 443.
Environment
All changes to .env will be stored in /var/lib/pelican, but it is recommended to configure everything through Nix where possible;
make changes with services (P) or services (P).
Reverse proxying
Currently, only Caddy is supported as the webserver. By default, it doesn't listen on :80 or :443, but can be configured to serve the panel via HTTPS:
# configuration.nix
{ pkgs, ... }:
{
services.pelican-panel = {
enable = true;
webserver = "caddy";
domain = "https://panel.domain.com";
port = 443;
secretEnvironmentFile = pkgs.writeText "secrets.env" ''
APP_KEY="my-super-secret-app-key"
'';
};
}
You may also set webserver to "none" to serve /var/lib/pelican/www using your own webserver.
Alternatively, you can set caddy.domain to null and port to something else than 80 or 443 (8080 by default).
For example, to serve the panel using Caddy, with Traefik as the reverse proxy, use:
# configuration.nix
{ pkgs, config, ... }:
let
domain = "panel.domain.com";
in
{
services = {
pelican-panel = {
enable = true;
webserver = "caddy";
domain = "https://${domain}";
caddy.domain = null;
secretEnvironmentFile = pkgs.writeText "secrets.env" ''
APP_KEY="my-super-secret-app-key"
'';
};
traefik.dynamicConfigOptions.http = {
routers.pelican = {
entryPoints = [ "websecure" ];
rule = "Host(`${domain}`)";
service = "pelican";
tls.certResolver = "letsencrypt";
};
services.pelican.loadBalancer = {
passHostHeader = true;
servers = [ { url = "http://127.0.0.1:${toString config.services.pelican-panel.port}"; } ];
};
};
};
}
Database
Type
It is possible to choose between MariaDB and PostgreSQL as database backend.
The default is MariaDB, but can be changed by setting services (P) to pgsql.
Remote Database
If you don't want to create the database locally, you can simply set services (P) to false and set the environments
under services (P) accordingly.
As there is no official documentation from the Pelican team, the database config definition may help, see here.