-
-
Notifications
You must be signed in to change notification settings - Fork 69
Home
The documentation covered on this page outlines the process for deploying a container to reference and colorize selfh.st/icons via HEX color codes.
Note: The documentation below assumes users are deploying the latest container version.
This project leverages AI to assist with development. Code contributions generated or modified with the help of AI tools are reviewed and tested by maintainers before release.
Due to CDN availability constraints with jsDelivr, GitHub releases are not used when publishing updates to this container/repository.
If you'd like to be notified of new releases, sign up for e-mail notifications (no spam) using the form below:
- E-mail (Release notes only, no spam)
| Name | Tag |
|---|---|
| Latest | latest |
| Release |
4.0.2, 4.0, 4
|
The following architectures are supported by this image. Docker will automatically detect the appropriate value for your machine - no special tags are required.
| Architecture |
|---|
| x86-64 |
| arm64 |
| arm/v7 |
This image is configured to reference remote icon files by default. For local asset hosting, consider obtaining the assets using one of the following options:
- rsync
- Cloning the repository to a local folder
- External tools like git-sync
By default, no environment variables or volume mounts are required to deploy the container. Once deployed, follow the URL conventions under Building Links to begin referencing icons.
services:
selfhst-icons:
image: ghcr.io/selfhst/icons:latest
container_name: selfhst-icons
restart: unless-stopped
ports:
- 4050:4050The following optional variables and volume mounts enable additional customization, including serving icons from local files.
| Variable | Default | Description |
|---|---|---|
PORT |
4050 |
Internal port for communicating with the container |
PRIMARY_COLOR |
none |
HEX color variable for applying and updating a single color across icons |
ICON_SOURCE |
remote |
|
REMOTE_URL |
https://cdn.jsdelivr.net/gh/selfhst/icons@main |
Remote URL for icons when remote or hybrid source is selected |
LOG_LEVEL |
info |
|
CACHE_TTL |
3600 |
How long icons are cached in seconds |
CACHE_SIZE |
500 |
Maximum number of icons stored in cache |
REMOTE_TIMEOUT |
10 |
Seconds to wait for a remote request before timing out |
CORS_ALLOWED_ORIGINS |
* |
Allowed origin(s) for cross-origin requests (must include http:// or https://) |
services:
selfhst-icons:
image: ghcr.io/selfhst/icons:latest
container_name: selfhst-icons
restart: unless-stopped
ports:
- 4050:4050
environment:
PORT: 4050
PRIMARY_COLOR: 0f60d9
ICON_SOURCE: remote
REMOTE_URL: https://cdn.jsdelivr.net/gh/selfhst/icons@main
LOG_LEVEL: info
CACHE_TTL: 3600
CACHE_SIZE: 500
REMOTE_TIMEOUT: 10
CORS_ALLOWED_ORIGINS: "*"
# Only necessary if ICON_SOURCE is set to 'local' or 'hybrid', or if mounting custom icons alongside a 'remote' deployment
volumes:
- /local/path/to/svg:/app/icons/svg:ro # Required for local/hybrid custom colors, optional if not using custom colors
- /local/path/to/png:/app/icons/png:ro # Optional
- /local/path/to/webp:/app/icons/webp:ro # Optional
- /local/path/to/avif:/app/icons/avif:ro # Optional
- /local/path/to/ico:/app/icons/ico:ro # Optional
- /local/path/to/custom:/app/icons/custom:ro # Optional, can be used with local or remote deployments
healthcheck:
test: ["CMD", "/server", "-healthcheck"]
interval: 30s
timeout: 5s
retries: 3
start_period: 5sWhile out of scope for this wiki, many deployments will require HTTPS. A sample Caddyfile has been provided as a reference for proxying the container.
icons.selfh.st {
reverse_proxy selfhst-icons:4050
}
After deployment, icons can be referenced with the following URL conventions:
| Icon | Valid URLs | Notes |
|---|---|---|
| Custom Colors | https://example.com/plex/0f60d9 |
|
https://example.com/plex?color=0f60d9 |
||
https://example.com/plex.svg?color=0f60d9 |
Use this if your application requires icon extensions in the URL | |
| Primary Color | https://example.com/plex/primary |
|
https://example.com/plex?color=primary |
||
https://example.com/plex.svg?color=primary |
Use this if your application requires icon extensions in the URL | |
| Standard Icons | https://example.com/plex |
No extension, defaults to WebP |
https://example.com/plex.svg |
||
https://example.com/plex.png |
||
https://example.com/plex.webp |
||
https://example.com/plex.avif |
||
https://example.com/plex.ico |
||
https://example.com/plex.gif |
Unsupported extension, will fall back to WebP | |
| Custom Icon | https://example.com/custom/plex.png |
Custom icons require a volume mount, must contain an extension in the URL, cannot be colorized, and are not limited to the extensions above |