GoBlog provides several CLI commands for administration and maintenance. You can run any command with --help to see usage instructions and available options.
./GoBlog --config ./config/config.yml./GoBlog --config ./config/config.yml setup --username admin --password "your-secure-password"Set up the user credentials (username, password, and optionally TOTP). The password is securely hashed using bcrypt before storage.
Options:
--username(required) - Login username--password(required) - Login password (stored as bcrypt hash)--totp- Enable TOTP two-factor authentication
Example with TOTP:
./GoBlog --config ./config/config.yml setup --username admin --password "your-secure-password" --totpThis will output the TOTP secret which you should add to your authenticator app.
./GoBlog --config ./config/config.yml healthcheck
# Exit code: 0 = healthy, 1 = unhealthyUseful for container health checks and monitoring.
./GoBlog --config ./config/config.yml checkChecks all external links in published posts and reports broken links.
Flags:
-
--ignore-403: Skip reporting HTTP 403 responses. Sites behind Cloudflare and similar bot-protection services frequently respond with 403 to non-browser clients, producing noisy false positives. -
--check-dnsbl: After the link check, query public DNS-based blocklists for each unique linked hostname and report any listings. This helps spot links to domains that have been taken over (e.g., expired domain repurposed as spam/malware).Lookups go through the system DNS resolver. Spamhaus prohibits queries through large public resolvers (such as Google
8.8.8.8or Cloudflare1.1.1.1): make sure your machine uses your ISP's resolver or your own. Free use is limited to low-volume, non-commercial users; check the Spamhaus DNSBL usage terms.
./GoBlog --config ./config/config.yml check --ignore-403 --check-dnsbl./GoBlog --config ./config/config.yml export ./exportedExports all posts as Markdown files with front matter to the specified directory.
# Refresh follower profiles from remote servers
./GoBlog --config ./config/config.yml activitypub refetch-followers blogname
# Check followers (ok/gone/moved), interactive cleanup
./GoBlog --config ./config/config.yml activitypub check-followers blogname
# Manually add a follower by actor IRI or @handle
./GoBlog --config ./config/config.yml activitypub add-follower blogname https://mastodon.example.com/users/alice
./GoBlog --config ./config/config.yml activitypub add-follower blogname @alice@mastodon.example.com
# Send Move activities for account migration
./GoBlog --config ./config/config.yml activitypub move-followers blogname https://newserver.example.com/users/newaccount
# Clear the movedTo setting
./GoBlog --config ./config/config.yml activitypub clear-moved blogname
# Send Move activities when changing domains
./GoBlog --config ./config/config.yml activitypub domainmove https://old.example.com https://new.example.comWhen changing your GoBlog domain:
- Configure both domains to point to your GoBlog instance
- Add the old domain to
altAddressesin your server config - Update
publicAddressto the new domain - Restart GoBlog
- Run
activitypub domainmove
The old domain's actor will serve with movedTo pointing to the new domain, and non-ActivityPub requests to the old domain will be redirected.
./GoBlog --config ./config/config.yml media migrate --yesConsolidates duplicate media files by detecting perceptually identical images and replacing references to compressed copies with the originals. See Media Migration for details.
Flags: --yes, --dry-run, --discover-only, --threshold N, --limit N, --preview
./GoBlog --config ./config/config.yml media optimize abc123.jpgOptimizes a media file using imgproxy, generating optimized variants. Works the same as the "Optimize" button in the media files editor subpage. Requires media optimization and imgproxy to be configured.
./GoBlog --config ./config/config.yml media checkFormats
./GoBlog --config ./config/config.yml media checkFormats --has-variantsScans all media files and checks if each original image has all configured optimized variants. For each image, it compares the existing optimized variants in the database against the expected format and width combinations (e.g. avif_800, jpeg_2000) and reports any that are missing. Requires media optimization to be enabled and configured.
Flags: --has-variants — only show images that already have at least one optimized variant (excludes images that were never optimized).
./GoBlog --config ./config/config.yml \
--cpuprofile cpu.prof \
--memprofile mem.profGenerates CPU and memory profiles for performance analysis.