config.toml


Configuration File Structure

The configuration file uses a simple TOML format with top-level keys for global settings and then sections for different components.

On Linux, the configuration file at XDG_CONFIG_DIR/gosuki/config.toml. By default, this resolves to ~/.config/gosuki/config.toml, following the XDG Base Directory Specification.

On MacOS, it is located at /Library/Application Support/gosuki/config.toml.

On Windows, the configuration file is located at %APPDATA%\gosuki\config.toml.

On BSD systems (FreeBSD, OpenBSD, NetBSD), the config path follows Linux conventions at ~/.config/gosuki/config.toml.

The location can be changed using the gosuki -c path/to/config.toml

Here’s a breakdown of the key parts:

Top-Level Settings

watch-all = true
disabled-modules = ["github", "reddit", "firefox"]
  • watch-all: Whether to monitor all profiles browsers (default: true). Overrides browser sections.

  • disabled-modules: List of module names to disable (e.g., "github", "reddit", "firefox")

Note

set watch-all=false to disable automatic watching of all profiles and instead control watching profiles manually from their specific sections.


[database]

[database]
  path = "~/.local/share/gosuki/gosuki.db"
  sync-interval = '4s'
  • path: Full path to database file location (supports shell expansions like ~ and $HOME)
    • Default on Linux/BSD: ~/.local/share/gosuki/gosuki.db
    • Default on Windows: %APPDATA%/gosuki/gosuki.db
    • Default on macOS: /Library/Application Support/gosuki/gosuki.db
  • sync-interval: Synchronization interval (e.g., ‘5m’, default: ‘4s’)

[webui]

[webui]
listen = '127.0.0.1:2025'
  • listen: Specifies the network address and port on which the UI server listens for incoming connections.
    • Format: IP:port (e.g., 127.0.0.1:2025, localhost:8080, or 0.0.0.0:8081).
    • By default, it binds to 127.0.0.1:2025, which restricts access to localhost only for security reasons.
    • Use 0.0.0.0 to allow external access (not recommended without proper security measures).
    • The UI is typically used for web-based interaction or API endpoints, so ensure the port is accessible and not blocked by firewalls.

Browser Definitions

Since v1.3.0+, browser definitions are centralized in a YAML manifest at pkg/browsers/browsers.yaml. Standard browser profiles are auto-detected. Manual [browser] sections are only needed for custom profiles or non-standard locations.

[chrome]

[chrome]
  [chrome.profile-options]
    watch-all-profiles = false
    profile = "Default"

[chrome.custom-profiles]

You can define a list of custom profiles with their corresponding paths. The path must point directly to the profile and not the browser’s base directory.

[[chrome.custom-profiles]]
  flavour = "chrome"
  name = "my-custom-chrome"
  path = "/home/user/.config/google-chrome/MyProfile"

[[chrome.custom-profiles]]
  flavour = "chrome"
  name = "work-chrome"
  path = "/opt/chromium/profiles/work"

The flavour field must match the browser name: chrome, firefox, brave, librewolf, waterfox, zen, icecat, palemoon, basilisk, or chromium.


[firefox]

[firefox]
  [firefox.profile-options]
    watch-all-profiles = true
    profile = "default"

[firefox.custom-profiles]

[[firefox.custom-profiles]]
  flavour = "firefox"
  name = "work-firefox"
  path = "/home/user/.mozilla/firefox/abc123.default"

[[firefox.custom-profiles]]
  flavour = "firefox"
  name = "personal-firefox"
  path = "/opt/firefox/profiles/personal"

The flavour field must match the browser name: chrome, firefox, brave, librewolf, waterfox, zen, icecat, palemoon, basilisk, or chromium.


[p2p-sync]

multi device synchronization settings

[p2p-sync]
  sync-master = true        # Set to true to run this node as a sync master
  master-node = "hostname.lan"  # The host or ip v4 address of the master node (listening port is 2026)
  master-listen = ""        # Address to listen on as sync-master (defaults to localhost)
  alias = ""                # Alias to identify this Gosuki node (defaults to hostname if empty)
  • sync-master: Whether this node acts as the master for p2p sync (default: true)
  • master-node: The host or ip v4 address of the master node (listening port is 2026)
  • master-listen: Address to listen on as sync-master (defaults to localhost)
  • alias: Alias to identify this Gosuki node (defaults to hostname if empty)

[html-autoimport]

Auto imports bookmarks from a Netscape Bookmarks html file.

[html-autoimport]
  paths = ["$HOME/shares/bookmarks", "~/other/shared/bookmarks"]
  • paths: List of directories to scan for HTML bookmark files
    • Default import directory on Linux/BSD: ~/.local/share/gosuki/imports
    • Default import directory on Windows: %APPDATA%/gosuki/imports

[github]

[github]
  sync-interval = '6h'
  github-token = "GITHUB_TOKEN"
  • github-token: GitHub personal access token (required for syncing)
  • sync-interval: Sync interval in seconds (default: ‘6h’)

[reddit]

[reddit]
  client-id = ""
  client-secret = ""
  username = ""
  password = ""
  sync-interval = '24h'
  include-likes = false
  fetch-comments = true       # Fetch and store comments
  fetch-media = false         # Fetch media attachments
  comment-fetch-delay = 2s    # Delay between comment requests
  max-concurrent-api = 3      # Concurrent API workers
  • client-id/client-secret: Reddit API credentials (required)
  • username/password: Reddit account credentials (required for syncing)
  • sync-interval: Sync interval in seconds (default: ‘1h’)
  • include-likes: Whether to also save liked posts
  • fetch-comments: Fetch and store comments
  • fetch-media: Fetch media attachments
  • comment-fetch-delay: Delay between comment requests
  • max-concurrent-api: Concurrent API workers

Configuration Notes

  1. Path Expansion: Values like ~/.local/share/gosuki/ (Linux/BSD), %APPDATA%/gosuki/ (Windows), and $HOME/shares/bookmarks will be automatically expanded to their absolute paths.
  2. Custom Profile Paths: To use non-standard browser profiles, define them using the [custom-profiles] array format shown above. Optionally set watch-all-profiles = false and specify which profile to use with profile = "your-custom-name".
  3. Flavour Specification: The flavour field is required for each custom profile. The flavour field must match the browser name: chrome, firefox, brave, librewolf, waterfox, zen, icecat, palemoon, basilisk, or chromium. Use gosuki profile list to verify your profiles are detected.
  4. Module Flavors: To see all available modules and their supported flavors, run gosuki modules list.
  5. Default Values: Unspecified options will use their built-in defaults.
  6. Editing: You can manually edit the config file after generation. Changes will take effect after restarting the daemon.