updates for beta15

This commit is contained in:
miloschwartz 2025-02-27 11:08:57 -05:00
parent 8b8d75992c
commit 272c5c548a
No known key found for this signature in database
4 changed files with 141 additions and 137 deletions

View file

@ -6,93 +6,97 @@ Pangolin is configured using a `config.yml` file. The file is expected to be mou
### `app` ### `app`
- `dashboard_url`: string - `dashboard_url`: string
- Env: APP_DASHBOARDURL - Env: APP_DASHBOARDURL
- Example: `https://example.com` or `https://proxy.example.com` - Example: `https://example.com` or `https://proxy.example.com`
- The url where the application is hosted. This is used for many things, including generating links. - The url where the application is hosted. This is used for many things, including generating links.
- You can run Pangolin on a subdomain or root domain. Users will be redirected to this url to complete the auth step. - You can run Pangolin on a subdomain or root domain. Users will be redirected to this url to complete the auth step.
- `base_domain`: string - `log_level`: string
- Env: APP_BASEDOMAIN - Options: `debug`, `info`, `warn`, `error`
- Example: `example.com` - The log level for the application.
- The base domain for the application. This is used for setting cookies and determining the base domain for resources. - `save_logs`: boolean
- `log_level`: string - Whether to save logs to a file. Logs are saved to `config/logs/`.
- Options: `debug`, `info`, `warn`, `error` - Logs rotate
- The log level for the application. - Max size: 20MB
- `save_logs`: boolean - Max files: 7 days
- Whether to save logs to a file. Logs are saved to `config/logs/`. - `log_failed_attempts`: boolean
- Logs rotate - Whether to log failed authentication attempts. This is useful for security tools like Crowdsec and Fail2ban.
- Max size: 20MB
- Max files: 7 days
- `log_failed_attempts`: boolean
- Whether to log failed authentication attempts. This is useful for security tools like Crowdsec and Fail2ban.
### `server` ### `server`
- `external_port`: int - `external_port`: int
- Env: SERVER_EXTERNALPORT - Env: SERVER_EXTERNALPORT
- The port the external facing (public) API will listen on. - The port the external facing (public) API will listen on.
- `internal_port`: int - `internal_port`: int
- Env: SERVER_INTERNALPORT - Env: SERVER_INTERNALPORT
- The port the internal private facing (private) API will listen on. - The port the internal private facing (private) API will listen on.
- `next_port`: int - `next_port`: int
- Env: SERVER_NEXTPORT - Env: SERVER_NEXTPORT
- The port the frontend server will listen on. - The port the frontend server will listen on.
- `internal_hostname`: string - `internal_hostname`: string
- Example: `pangolin` - Example: `pangolin`
- The hostname of the Pangolin container. This is used for internal communication between the components. - The hostname of the Pangolin container. This is used for internal communication between the components.
- If running with Docker Compose, this should be the name of the container, which is likely `pangolin`. - If running with Docker Compose, this should be the name of the container, which is likely `pangolin`.
- `session_cookie_name`: string - `session_cookie_name`: string
- Example: `p_session_token` - Example: `p_session_token`
- The name of the session cookie. This is used to store the session token for the main application. - The name of the session cookie. This is used to store the session token for the main application.
- `resource_access_token_param`: string - `resource_access_token_param`: string
- Example: `p_token` - Example: `p_token`
- The query parameter used to pass the access token to the resource. Badger extracts this token and sends it to Pangolin to authenticate. This is used in direct share links that do not require a browser redirect. - The query parameter used to pass the access token to the resource. Badger extracts this token and sends it to Pangolin to authenticate. This is used in direct share links that do not require a browser redirect.
- `resource_session_request_param`: string - `resource_session_request_param`: string
- Example: `p_session_request` - Example: `p_session_request`
- The query parameter used to pass the session request token to be exchanged for a real session token in Badger. - The query parameter used to pass the session request token to be exchanged for a real session token in Badger.
- `cors`: object (optional) - `cors`: object (optional)
- Configuration for Cross-Origin Resource Sharing (CORS). - Configuration for Cross-Origin Resource Sharing (CORS).
- `origins`: array of strings (optional) - `origins`: array of strings (optional)
- Example: `["https://proxy.example.com"]` - Example: `["https://proxy.example.com"]`
- List of allowed origins for cross-origin requests. - List of allowed origins for cross-origin requests.
- `methods`: array of strings (optional) - `methods`: array of strings (optional)
- Example: `["GET", "POST", "PUT", "DELETE", "PATCH"]` - Example: `["GET", "POST", "PUT", "DELETE", "PATCH"]`
- HTTP methods allowed for CORS requests. - HTTP methods allowed for CORS requests.
- `allowed_headers`: array of strings (optional) - `allowed_headers`: array of strings (optional)
- Example: `["X-CSRF-Token", "Content-Type"]` - Example: `["X-CSRF-Token", "Content-Type"]`
- HTTP headers allowed in CORS requests. - HTTP headers allowed in CORS requests.
- `credentials`: boolean (optional) - `credentials`: boolean (optional)
- Whether to allow credentials. - Whether to allow credentials.
- Default: true - Default: true
- `trust_proxy`: boolean (optional) - `trust_proxy`: boolean (optional)
- Whether to trust the proxy headers (e.g., `X-Forwarded-For`) for determining the client IP address. - Whether to trust the proxy headers (e.g., `X-Forwarded-For`) for determining the client IP address.
- Default: `true` - Default: `true`
- `dashboard_session_length_hours`: int (optional) - `dashboard_session_length_hours`: int (optional)
- The length of time in hours that the dashboard session will last after logging in. - The length of time in hours that the dashboard session will last after logging in.
- Default: `720` - Default: `720`
- `resource_session_length_hours`: int (optional) - `resource_session_length_hours`: int (optional)
- The length of time in hours that a session for each resource will last after logging in. - The length of time in hours that a session for each resource will last after logging in.
- Default: `720` - Default: `720`
### `domains`
- `<domain_key>`: string
- The unique key for the domain configuration.
- `base_domain`: string
- Example: `example.com`
- `cert_resolver`: string
- Example: `letsencrypt`
- The name of the Traefik certificate resolver to use for this domain. This must match the name of the certificate resolver in the Traefik configuration.
- `prefer_wildcard_cert`: boolean
- Example: `true`
- Whether to prefer a wildcard certificate when generating certificates. This is useful if you want to use a wildcard certificate for the base domain and all subdomains.
### `traefik` ### `traefik`
- `cert_resolver`: string - `http_entrypoint`: string
- Example: `letsencrypt` - Example: `web`
- The name of the Traefik certificate resolver. This must match the name of the resolver in the Traefik configuration. - The name of the Traefik entrypoint for HTTP traffic. This must match the name of the entrypoint in the Traefik configuration.
- `http_entrypoint`: string - `https_entrypoint`: string
- Example: `web` - Example: `websecure`
- The name of the Traefik entrypoint for HTTP traffic. This must match the name of the entrypoint in the Traefik configuration. - The name of the Traefik entrypoint for HTTPS traffic. This must match the name of the entrypoint in the Traefik configuration.
- `https_entrypoint`: string - `additional_middlewares`: array of strings (optional)
- Example: `websecure` - Example: `["middleware1", "middleware2"]`
- The name of the Traefik entrypoint for HTTPS traffic. This must match the name of the entrypoint in the Traefik configuration. - Additional middlewares to apply to the resource router generated at runtime. These must be defined in another Traefik configuration provider like the dynamic file provider.
- `prefer_wildcard_cert`: boolean
- Whether to prefer a wildcard certificate when generating certificates. This is useful if you want to use a wildcard certificate for the base domain and all subdomains.
- Before setting this to `true`, please see the docs for setting up wildcard certificates with Let's Encrypt, <a href="/Pangolin/wildcard-certs">here</a>.
- `additional_middlewares`: array of strings (optional)
- Example: `["middleware1", "middleware2"]`
- Additional middlewares to apply to the resource router generated at runtime. These must be defined in another Traefik configuration provider like the dynamic file provider.
### `gerbil` ### `gerbil`
- `start_port`: int - `start_port`: int
- Env: GERBIL_STARTPORT - Env: GERBIL_STARTPORT
- This is the starting port for WireGuard tunnels that new Gerbil exit nodes will use and increment as they register with Pangolin. Advised to choose a base of a range with no conflicts. - This is the starting port for WireGuard tunnels that new Gerbil exit nodes will use and increment as they register with Pangolin. Advised to choose a base of a range with no conflicts.
@ -110,65 +114,65 @@ Pangolin is configured using a `config.yml` file. The file is expected to be mou
### `rate_limits` ### `rate_limits`
- `global`: object - `global`: object
- The global rate limit configuration for all requests to the external Pangolin API. - The global rate limit configuration for all requests to the external Pangolin API.
- `window_minutes`: int - `window_minutes`: int
- Example: `1` - Example: `1`
- The window in minutes for the rate limit. - The window in minutes for the rate limit.
- `max_requests`: int - `max_requests`: int
- Example: `100` - Example: `100`
- The maximum number of requests allowed in the window. - The maximum number of requests allowed in the window.
### `email` (optional) ### `email` (optional)
- `smtp_host` (optional): string - `smtp_host` (optional): string
- The SMTP host for sending emails. - The SMTP host for sending emails.
- `smtp_port` (optional): int - `smtp_port` (optional): int
- The SMTP port for sending emails. - The SMTP port for sending emails.
- `smtp_user` (optional): string - `smtp_user` (optional): string
- The SMTP username for sending emails. - The SMTP username for sending emails.
- `smtp_pass` (optional): string - `smtp_pass` (optional): string
- The SMTP password for sending emails. - The SMTP password for sending emails.
- `smtp_secure` (optional): boolean - `smtp_secure` (optional): boolean
- Whether to use a secure connection when sending emails. Use this if you're using port 465. - Whether to use a secure connection when sending emails. Use this if you're using port 465.
- Default: `false` - Default: `false`
- `no_reply` (optional): string - `no_reply` (optional): string
- Example: `no-reply@example.com` - Example: `no-reply@example.com`
- The address to send emails from. This can be any email address. Most often this will be the same as the `smtp_user`. - The address to send emails from. This can be any email address. Most often this will be the same as the `smtp_user`.
### `users` ### `users`
- `server_admin`: object - `server_admin`: object
- The server admin who can always create new organizations. This user will always be created on startup. - The server admin who can always create new organizations. This user will always be created on startup.
- `email`: string - `email`: string
- Env: USERS_SERVERADMIN_EMAIL - Env: USERS_SERVERADMIN_EMAIL
- The email address of the server admin. - The email address of the server admin.
- `password`: string - `password`: string
- Env: USERS_SERVERADMIN_PASSWORD - Env: USERS_SERVERADMIN_PASSWORD
- The password of the server admin. - The password of the server admin.
- This password will always overwrite the password in the database on startup. This is useful for resetting the password. - This password will always overwrite the password in the database on startup. This is useful for resetting the password.
- The password must meet the following requirements: - The password must meet the following requirements:
- At least 8 characters - At least 8 characters
- At least one uppercase letter - At least one uppercase letter
- At least one lowercase letter - At least one lowercase letter
- At least one digit - At least one digit
- At least one special character - At least one special character
### `flags` (optional) ### `flags` (optional)
- `require_email_verification` (optional): boolean - `require_email_verification` (optional): boolean
- Whether to require email verification for new users. If set to `true`, new users will need to verify their email address before they can log in. - Whether to require email verification for new users. If set to `true`, new users will need to verify their email address before they can log in.
- Only turn this on if you have email configured. - Only turn this on if you have email configured.
- `disable_signup_without_invite` (optional): boolean - `disable_signup_without_invite` (optional): boolean
- Whether to allow users to sign up without an explicit invite. If set to `true`, the "Sign Up" button will be removed from the login form. - Whether to allow users to sign up without an explicit invite. If set to `true`, the "Sign Up" button will be removed from the login form.
- Users will still be able to sign up if they have a valid invite. - Users will still be able to sign up if they have a valid invite.
- `disable_user_create_org` (optional): boolean - `disable_user_create_org` (optional): boolean
- Whether to allow users to create new organizations. If set to `true`, users will not be able to create new organizations. - Whether to allow users to create new organizations. If set to `true`, users will not be able to create new organizations.
- The server admin can always create new organizations. - The server admin can always create new organizations.
- `allow_raw_resources` (optional): boolean - `allow_raw_resources` (optional): boolean
- Whether to allow users to create raw TCP/UDP resources. If set to `false`, users will only be able to create http/https resources. - Whether to allow users to create raw TCP/UDP resources. If set to `false`, users will only be able to create http/https resources.
- `allow_base_domain_resources` (optional): boolean - `allow_base_domain_resources` (optional): boolean
- Whether to allow users to create resources on the base domain. If set to `false`, users will only be able to create resources on subdomains. - Whether to allow users to create resources on the base domain. If set to `false`, users will only be able to create resources on subdomains.
## Example Configuration File ## Example Configuration File
@ -177,10 +181,15 @@ Pangolin is configured using a `config.yml` file. The file is expected to be mou
```yaml ```yaml
app: app:
dashboard_url: "https://example.com" dashboard_url: "https://example.com"
base_domain: "example.com"
log_level: "info" log_level: "info"
save_logs: false save_logs: false
domains:
domain1:
base_domain: "example.com"
cert_resolver: "letsencrypt"
prefer_wildcard_cert: false
server: server:
external_port: 3000 external_port: 3000
internal_port: 3001 internal_port: 3001
@ -194,7 +203,6 @@ traefik:
cert_resolver: "letsencrypt" cert_resolver: "letsencrypt"
http_entrypoint: "web" http_entrypoint: "web"
https_entrypoint: "websecure" https_entrypoint: "websecure"
prefer_wildcard_cert: true
gerbil: gerbil:
start_port: 51820 start_port: 51820

View file

@ -23,7 +23,7 @@ It is highly reccommended that you read the [official Traefik documentation](htt
1. Make sure the stack is not running. 1. Make sure the stack is not running.
2. Update the Traefik configuration to use the DNS-01 challenge instead of the HTTP-01 challenge. This tells Traefik to use your DNS provider to create the DNS records needed for the challenge. 2. Update the Traefik configuration to use the DNS-01 challenge instead of the HTTP-01 challenge. This tells Traefik to use your DNS provider to create the DNS records needed for the challenge.
3. Set the `prefer_wildcard_cert` flag to `true` in the Pangolin configuration file. 3. Set the `prefer_wildcard_cert` flag to `true` in the Pangolin configuration file for your domain.
- This settings will try to encourage Traefik to request one wildcard certificate for each level of the domain used by your existing resources. - This settings will try to encourage Traefik to request one wildcard certificate for each level of the domain used by your existing resources.
- For example: If you have two resources `blog.example.com` and `blog.subdomain.example.com`, Traefik should try to request a wildcard certificate for `*.example.com` and `*.subdomain.example.com` automatically for you. - For example: If you have two resources `blog.example.com` and `blog.subdomain.example.com`, Traefik should try to request a wildcard certificate for `*.example.com` and `*.subdomain.example.com` automatically for you.

View file

@ -24,6 +24,4 @@ Follow existing manual install steps, but Gerbil is not required. Your Docker co
<WithoutTunnelingCompose /> <WithoutTunnelingCompose />
After first starting the app, make sure to fill out all of your information, like `dashboard_url`, `base_domain`, etc the `config.yml` that was generated for you in the volume.
See all configuration options [here](https://docs.fossorial.io/Pangolin/Configuration/config). See all configuration options [here](https://docs.fossorial.io/Pangolin/Configuration/config).

View file

@ -34,9 +34,7 @@ Are you experienced with authentication procedures and best practices? We would
- [ ] Remember me for authentication sessions - [ ] Remember me for authentication sessions
### Organization & Domain Management ### Organization & Domain Management
- [ ] Support for multiple domains - [x] Support for multiple domains
- [ ] Set domain per organization
- [ ] Would need to refactor auth to support cross-site cookies
- [x] Support for running a resource at the root domain (without subdomain) - [x] Support for running a resource at the root domain (without subdomain)
- [x] Make this optional via a flag in the config - [x] Make this optional via a flag in the config