Skip to content
RustPress

Documentation Run

Configuration

Every rp-config.toml setting and environment variable, the site folder layout, databases and connection strings, and the signals a running server understands.

Updated

This page lists the settings in rp-config.toml, the environment variables that override them, and the signals a running server understands. Most sites never need to touch any of these: the setup wizard writes what’s needed.

The site folder

The site folder (--root, $RP_ROOT, or the current folder) holds everything:

  • rp-config.toml: settings, created on first run with a fresh secret key
  • rp-content/: themes, plugins, uploads, logs, the AI workspace and, with SQLite, database.sqlite
  • sdk/: the plugin SDKs and PROTOCOL.md
  • rp.pid: the running server’s process ID

Databases

Databasedatabase_url
SQLite (default)sqlite://rp-content/database.sqlite
MySQLmysql://user:password@127.0.0.1:3306/wordpress
MariaDBmariadb://user:password@127.0.0.1:3306/wordpress
PostgreSQLpostgres://user:password@127.0.0.1:5432/wordpress

SQLite is right for most sites, including busy ones, and is one file to back up. For MySQL, MariaDB and PostgreSQL the database must already exist. Managed databases connect over TLS with ?sslmode=require or ?sslmode=verify-full. New sites name their tables rp_posts, rp_options…; set table_prefix = "wp_" to run on an existing WordPress database.

Settings in rp-config.toml

SettingDefaultWhat it does
listen127.0.0.1:8080Address and port; --listen overrides it
database_urlSQLite in rp-contentSee Databases above
table_prefixrp_Table prefix; a WordPress database usually uses wp_
content_dirrp-contentThemes, plugins, uploads
secret_keyRandomSigns logins and encrypts stored keys. Changing it logs everyone out
disallow_file_modsfalseTurn off installing and removing themes and plugins
disallow_file_editfalseTurn off the theme and plugin file editors
safe_modefalseRun without plugins, on the default theme
plugin_timeout_secs10How long a plugin call may take
plugin_memory_mb512A plugin service using more memory is restarted and flagged as a likely leak; 0 turns the check off
php_binaryFound on PATHPHP program for PHP plugins
php_options[]Extra php.ini settings, e.g. ["opcache.jit=tracing", "opcache.jit_buffer_size=32M"]
cache_urlMemoryShared cache: redis://, rediss:// (TLS), valkey://, valkeys://, memcached://host:11211
queue_workers2Background job workers
background_crontrueRun scheduled events and jobs inside the server
log_max_lines5000Lines per log file part
check_updatestrueLook for new releases twice a day
trusted_proxies["127.0.0.1", "::1"]Proxies whose X-Forwarded-For is believed: addresses, ranges (10.0.0.0/8) or private; [] when nothing runs in front
debugfalseExtra diagnostics in the log

Reload the server after editing the file: sudo systemctl reload rustpress, or send it SIGUSR2.

Environment variables

VariableWhat it does
RP_ROOTSite folder (instead of --root)
RP_DATABASE_URLDatabase (instead of database_url)
RP_CACHE_URLCache server (instead of cache_url)
PORTListen on 0.0.0.0:$PORT (container platforms set it)
RP_LISTENAddress to listen on
RP_SECRET_KEYSecret key, 32 characters or more
RP_TRUSTED_PROXIESComma-separated proxies, ranges or private
RP_TABLE_PREFIXDatabase table prefix
RP_FCGI_THREADSFastCGI worker threads (default 4 per CPU)
RP_SAFE_MODE=1Safe mode
RP_PHPPHP program for plugins
RP_PHP_PER_CALL=1Start PHP for every plugin call instead of keeping it running
RP_TAILWINDPath to a tailwindcss program (offline servers)
RP_LOG_QUERIES=1Print every database query
RP_UPDATE_API, RP_UPDATE_REPOWhere update checks look (default: GitHub, Witsberry/RustPress)

Site options you may want

Set these with rp option set NAME VALUE:

  • rp_page_cache (0 turns the page cache off) and rp_page_cache_ttl (seconds, default 600)
  • rp_minify (0 turns HTML and CSS minification off)
  • siteurl and home (the site’s address)

Optional programs

ForInstall
Plugins written in PHPphp 8.1 or later (sudo apt install php-cli)
Plugins written in JavaScriptNothing for sandboxed plugins; Node 18 or later for http services
Plugins written in Pythonpython3
Tailwind themesNothing: the Tailwind tool is downloaded once and checked
AI agents through Claude CodeClaude Code, logged in as the user RustPress runs as. It runs with only RustPress’s tools and none of the server’s environment
Building Rust plugins on the serverRust with the wasm32-unknown-unknown target, and bubblewrap; builds are refused without the sandbox

Signals

SignalEffect
TERM, INT (Ctrl+C)Stop: finish requests in progress, stop plugin programs, exit
USR2Restart without downtime, with the new program file and settings

Every command is in the Command reference.