roji

Start the reverse proxy server.

sudo roji                                          # Run in foreground
sudo roji --network web,api                        # Watch multiple networks
sudo roji --domain test.localhost                   # Custom domain
sudo roji --http-port 8080 --https-port 8443       # Custom ports
sudo roji --log-level debug                        # Verbose logging

Flags:

FlagDescriptionDefault
--networkDocker network(s) to watchroji
--domainBase domaindev.localhost
--http-portHTTP port80
--https-portHTTPS port443
--certs-dirCertificate directory~/.local/share/roji/certs
--data-dirData directory~/.local/share/roji
--dashboardDashboard hostnameroji.{domain}
--log-levelLog level (debug, info, warn, error)info
--auto-certAuto-generate certificatestrue
--configConfig file path~/.config/roji/config.yaml

roji doctor

Check environment and fix common issues.

roji doctor          # Run all checks
roji doctor --fix    # Auto-fix issues where possible
roji doctor --json   # Output as JSON

Checks performed:

  • Docker daemon running
  • Docker socket accessible
  • Docker network(s) exist
  • Ports 80/443 available
  • CA certificate exists and is valid
  • CA certificate installed in system trust store
  • Server certificate validity
  • DNS resolution (*.localhost)
  • Config file validation
  • Tunnel (when configured: cloudflared installed, logged in, named tunnel exists)

roji config

Manage configuration.

roji config show     # Display current settings
roji config path     # Show config file locations
roji config init     # Create default config file
roji config edit     # Open in $EDITOR
roji config reload   # Apply static_sites / proxy_sites changes to the running roji

roji config reload asks the running roji to read the config file again. It lists every declared site and marks the ones that were not registered, with the reason. Only static_sites and proxy_sites take effect this way; changes to anything else need roji to be restarted. The command fails when roji is not running or cannot read the file, and succeeds when some sites were skipped.

roji ca

Manage the CA certificate.

roji ca status              # Check installation status
roji ca install             # Install to system trust store
roji ca install --user      # Install to user store (no sudo)
roji ca install --windows   # Install to Windows (from WSL)
roji ca install --firefox   # Also install to Firefox (Linux)
roji ca install --force     # Force reinstall
roji ca uninstall           # Remove from trust store
roji ca export [path]       # Export CA certificate (.pem or .crt)

Platform support:

PlatformMethod
macOSKeychain (security add-trusted-cert)
Linux (Debian/Ubuntu)update-ca-certificates
Linux (RHEL/Fedora)update-ca-trust
Windowscertutil -addstore
WSL → Windowscertutil.exe (user store)

roji service

Manage roji as a system service.

roji service install    # Register as system service
roji service uninstall  # Remove service registration
roji service start      # Start the service
roji service stop       # Stop the service
roji service restart    # Restart the service
roji service status     # Show service status

Platform support:

PlatformService ManagerConfig Location
Linuxsystemd/etc/systemd/system/roji.service
macOSlaunchd~/Library/LaunchAgents/com.roji.agent.plist
WindowsNSSMWindows Service

roji log

View server logs.

roji log               # Follow logs in real-time (like tail -f)
roji log -n 100        # Show last 100 lines, then follow
roji log --no-follow   # Print current logs and exit

Log file locations:

  • Linux/WSL: ~/.local/share/roji/roji.log
  • macOS: ~/Library/Logs/roji.log

Logs are automatically rotated when they exceed 10MB.

roji routes

List all registered routes from the running server.

roji run

Start a dev server on a free port and give it a hostname.

roji run <name> -- <command> [args...]

roji run app -- npx vite --port {port}
roji run api -- npx wrangler dev --port {port}
roji run web -- npm run dev

Picks a free port, routes https://<name>.<domain> to it on the running roji, and runs the command. The port replaces every {port} in the arguments and is set as the PORT environment variable. The hostname and the URL are passed the same way: {host} and ROJI_HOST, {url} and ROJI_URL. The route is removed when the command exits, and the command’s exit code is passed through.

roji has to be running. See Dev Servers on the Host for details.

roji version

Show version, commit hash, build date, and Go version.

roji credits

Print roji’s license, the licenses of the Go modules linked into the binary (CREDITS), and the notices for other bundled software such as Petite Vue (THIRD_PARTY_NOTICES). The same files ship in the release archives, but the one-liner installer keeps only the binary, so this is how to read them after installing that way.

roji health

Check if the roji server is healthy. Exits with code 0 if healthy, 1 otherwise.