跳至主要内容

通过运行时标志配置

配置一般通过位于您服务器上的 Owncast 管理网站 /admin 完成,但是,在启动 Owncast 时,您可以设置许多运行时标志以修改其行为。

大多数管理员从未需要这些。 使用管理员界面进行正常配置。 这里的标志主要用于恢复,例如重置丢失的管理员密码,或用于脚本和自动启动。

您可以使用 --help 运行 Owncast 以查看可用运行时标志的完整列表。

Flag reference

FlagValuePurposePersistence
--adminpasswordpasswordSet a new admin password. The usual way to recover access if you lost yours.Saved to the database
--backupdirdirectory pathDirectory where database backups are written.This run only
--databasefile pathUse a database file other than the default data/owncast.db.This run only
--enableDebugFeaturesnoneEnable additional debugging options.This run only
--enableVerboseLoggingnoneEnable additional logging.This run only
--followervalidationintervalsecondsHow often Fediverse followers are re-validated.This run only
--logdirdirectory pathDirectory where logs are written.This run only
--restoreDatabasebackup file pathRestore a database backup, then exit. Restart Owncast afterwards.One-time action
--rtmpportport numberSet the listen port for the RTMP server. Default is 1935.Saved to the database
--streamkeykeySet a temporary stream key. While it's in effect the Stream Keys admin tab is hidden.This session only
--webserveripIP addressForce the web server to listen on a specific IP address.Saved to the database
--webserverportport numberForce the web server to listen on a specific port. Default is 8080.Saved to the database

Flags marked "saved to the database" change your stored server configuration. The new value keeps applying on later starts even after you drop the flag. The others only affect the run they're passed to.

Examples

Reset a lost admin password:

owncast --adminpassword mynewpassword

Set a temporary stream key for this session:

owncast --streamkey mystreamkey

Run on custom ports. You can also change ports in the admin, which requires a restart to take effect:

owncast --webserverport 9090 --rtmpport 2945

Restore a database backup:

owncast --restoreDatabase /path/to/owncastdb.bak

Improve this page

See something missing or incorrect? Edit this page and improve the documentation for everyone.

Contributors to this documentation
Gabe KangasGabe Kangas
S
Solomon Mithra
mtabrizmtabriz
J
Jannik
J
Jannik Volkland