# Setup encryption at rest with command line flags

**URL:** <https://forum.yugabyte.com/t/setup-encryption-at-rest-with-command-line-flags/767>\
**Category:** General\
**Created:** [July 14, 2020, 8:45am UTC](https://forum.yugabyte.com/t/setup-encryption-at-rest-with-command-line-flags/767 "2020-07-14T08:45:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [July 14, 2020, 8:45am UTC](https://forum.yugabyte.com/t/setup-encryption-at-rest-with-command-line-flags/767/1 "2020-07-14T08:45:25Z")

</div>

[Question posted by a user on [YugabyteDB Community Slack](https://www.yugabyte.com/slack) ]

Is there a way to setup encryption at rest with command line flags, for example when running YB with docker containers.

Or is the only way to mount a key to some path, and then run `yb-admin` afterwards ?

---

<div class="post-metadata">

**Author:** ![dorian\_yugabyte](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.yugabyte.com/dorian_yugabyte/32/206_2.png) [@dorian\_yugabyte](https://forum.yugabyte.com/u/dorian_yugabyte)\
**Post date:** [July 14, 2020, 8:46am UTC](https://forum.yugabyte.com/t/setup-encryption-at-rest-with-command-line-flags/767/2 "2020-07-14T08:46:11Z")

</div>

Currently, the only way is to mount a key to some path and run `yb-admin`. See docs: [Enable encryption at rest in YugabyteDB clusters | YugabyteDB Docs](https://docs.yugabyte.com/latest/secure/encryption-at-rest/)
