Aer Server

aer server

Start a Salesforce API-compatible server

Synopsis

Start a Salesforce API-compatible server.

Source paths can be directories containing Apex classes (.cls), triggers (.trigger), flows (.flow-meta.xml), and object metadata (objects/ subdirectories). All code and metadata from the specified paths will be loaded into the server.

Source paths can include a @namespace suffix to treat the code as belonging to a namespace (e.g., mycode@myns). Use –default-namespace to set a default namespace for all sources without an explicit @namespace suffix.

aer server [source-paths...] [flags]

Options

      --addr string                         address to listen on (default "127.0.0.1:8080")
      --all-exceptions                      show details about all caught exceptions
      --allow-callouts                      allow outbound HTTP callouts to endpoints permitted by Remote Site Settings or Named Credentials when no WireMock stub matches
      --allow-email                         deliver Messaging.sendEmail output via SMTP (configured by AER_SMTP_HOST/PORT/USER/PASSWORD, default localhost:25); without this flag email is logged and discarded
      --api-version string                  Salesforce API version to expose (default "67.0")
  -p, --assign-perms strings                assign permission sets to the default admin user (canonical Name or NamespacePrefix__Name, repeatable)
      --assign-psg strings                  assign permission set groups to the default admin user (canonical DeveloperName or NamespacePrefix__DeveloperName, repeatable)
      --bootstrap-db string                 bootstrap SQLite database to seed before starting the server
      --certificate strings                 load a PEM-encoded certificate key file; the certificate name is derived from the filename (extension stripped; repeatable)
      --certificate-dir strings             load every PEM file (.pem/.crt/.cer/.key) in a directory as certificate keys named after their filenames (repeatable)
      --certificate-key strings             associate a certificate developer name with an inline base64-encoded PEM key (format: CertName=BASE64; e.g. the output of 'openssl base64 -A'; repeatable)
      --currency string                     org default currency ISO code (e.g., USD, EUR, GBP)
      --db string                           database to use for persistent storage: a SQLite file path, a postgres:// DSN, or postgresqltest:// for an ephemeral PostgreSQL server (default: in-memory SQLite)
  -d, --default-namespace string            treat loaded code as if it belongs to the specified namespace
      --enable-external-service-callbacks   mount HTTP routes for the callbacks blocks declared in any loaded External Service Registration (under /dev/external-services/callbacks/<reg>/<op>/<callback>)
      --enforce-governor-limits             enforce governor limit checks for API requests
      --feature strings                     enable optional features (PersonAccounts, HealthCloud, LiveAgent, OmniChannel, MultiCurrency, FinancialServicesCloud, B2BCommerce, RevenueCloud, LifeSciencesCloud, ConsumerGoodsCloud, ManufacturingCloud, Scheduler, CRMAnalytics, PrivacyCenter, ExperienceCloud, FieldService, Knowledge, EducationCloud, HighVelocitySales, WorkplaceCommandCenter, StateAndCountryPicklist, Division)
  -h, --help                                help for server
      --locale string                       default locale for new users (e.g., en_US, en_GB, de_DE)
      --package strings                     package files to load (can be specified multiple times)
      --package-dir strings                 directories containing .pkg files to load (can be specified multiple times)
      --password string                     password for password OAuth flow (default "password")
      --sandbox                             set Organization.IsSandbox to true
      --sandbox-post-copy string            SandboxPostCopy class to execute after startup data initialization
      --seed-session-token string           session token registered at startup as an authenticated session for the default admin user, e.g. for sf org login access-token; must be 00D000000000000! followed by letters, digits, underscores, or periods (AER_SEED_SESSION_TOKEN environment variable overrides)
      --timezone string                     default timezone for new users (e.g., America/Chicago, America/Los_Angeles)
      --username string                     email address for the default admin user (overrides admin@aer.local)
      --watch                               watch source files and incrementally reload changed Apex/LWC files
      --wiremock strings                    WireMock JSON stub file(s) to use for outbound HTTP callouts (repeatable)
      --wiremock-dir strings                directory containing WireMock JSON stub file(s) for outbound HTTP callouts (repeatable)

Options inherited from parent commands

      --help-aerrc      show how the .aerrc configuration file works and exit
  -q, --quiet           suppress progress output
  -v, --verbose count   increase verbosity (repeat for more detail)

SEE ALSO

  • aer - aer is the Apex Execution Runtime
© 2012–2026 October Swimmer.