# 如何关闭 S3 存储？

**URL:** <https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338>\
**Category:** Self-hosting\
**Created:** [2020年八月10日 11:18 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338 "2020-08-10T11:18:06Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月10日 11:18 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/1 "2020-08-10T11:18:06Z")

</div>

大家好，

如何完全关闭 AWS S3 存储，并将 S3 存储中的所有文件和备份恢复到我的 EC2 服务器上？

---

<div class="post-metadata">

**Author:** ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)\
**Post date:** [2020年八月10日 13:19 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/2 "2020-08-10T13:19:06Z")

</div>

我相信这会解决问题：

`./launcher enter app`  
`rake uploads:migrate_from_s3`  
`rake posts:rebake`

这将把上传文件从 S3 迁移到你的 Web 服务器。之后，你可以返回 app.yml 文件，将 `DISCOURSE_USE_S3: false` 进行修改。然后重新构建。

---

<div class="post-metadata">

**Author:** ![Bill](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/bill/32/159342_2.png) [@Bill](https://meta.discourse.org/u/Bill)\
**Post date:** [2020年八月10日 14:14 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/3 "2020-08-10T14:14:29Z")

</div>

我也会进入 Discourse 的管理后台，取消勾选所有激活 S3 模式的复选框。

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月11日 03:54 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/4 "2020-08-11T03:54:18Z")

</div>

我按照 @AntiMetaman 的建议操作了，但出现了 rake aborted 错误。首先，它提示我关闭 S3 上传。我关闭了 S3 上传后再次尝试运行 rake，随后出现了这个错误。

```
root@ip-172-31-7-247-app:/var/www/discourse# rake uploads:migrate_from_s3 --trace
** Invoke uploads:migrate_from_s3 (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute uploads:migrate_from_s3
Migrating uploads from S3 to local storage for 'default'...
rake aborted!
NoMethodError: undefined method `downcase' for nil:NilClass
/var/www/discourse/app/models/global_setting.rb:107:in `s3_bucket_name'
/var/www/discourse/app/models/site_setting.rb:157:in `absolute_base_url'
/var/www/discourse/lib/tasks/uploads.rake:138:in `migrate_from_s3'
/var/www/discourse/lib/tasks/uploads.rake:118:in `block in migrate_all_from_s3'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rails_multisite-2.3.0/lib/rails_multisite/connection_management.rb:68:in `with_connection'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rails_multisite-2.3.0/lib/rails_multisite/connection_management.rb:78:in `each_connection'
/var/www/discourse/lib/tasks/uploads.rake:118:in `migrate_all_from_s3'
/var/www/discourse/lib/tasks/uploads.rake:93:in `block in <main>'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `block in execute'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:281:in `execute'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:219:in `block in invoke_with_call_chain'
/usr/local/lib/ruby/2.6.0/monitor.rb:235:in `mon_synchronize'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:199:in `invoke_with_call_chain'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/task.rb:188:in `invoke'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:160:in `invoke_task'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:116:in `block (2 levels) in top_level'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:116:in `each'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:116:in `block in top_level'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:125:in `run_with_threads'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:110:in `top_level'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:83:in `block in run'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:186:in `standard_exception_handling'
/var/www/discourse/vendor/bundle/ruby/2.6.0/gems/rake-13.0.1/lib/rake/application.rb:80:in `run'
bin/rake:13:in `<top (required)>'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `load'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:63:in `kernel_load'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli/exec.rb:28:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:476:in `exec'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor.rb:399:in `dispatch'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:30:in `dispatch'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/vendor/thor/lib/thor/base.rb:476:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/cli.rb:24:in `start'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:46:in `block in <top (required)>'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/lib/bundler/friendly_errors.rb:123:in `with_friendly_errors'
/usr/local/lib/ruby/gems/2.6.0/gems/bundler-2.1.4/exe/bundle:34:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Tasks: TOP => uploads:migrate_from_s3

```

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月11日 04:55 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/5 "2020-08-11T04:55:25Z")

</div>

就是这个，对吧？

![s3](https://global.discourse-cdn.com/meta/original/3X/0/3/037a3a4bf86aee59e078a7a2f39ad00362f5a52c.png)

---

<div class="post-metadata">

**Author:** ![SouperC](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/souperc/32/62875_2.png) [@SouperC](https://meta.discourse.org/u/SouperC)\
**Post date:** [2020年八月11日 06:09 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/6 "2020-08-11T06:09:17Z")

</div>

我今天看到了这个话题。如果可以的话，不妨再等等。

> [@Migrate\_from\_s3 problems](https://meta.discourse.org/t/migrate-from-s3-problems/119064/):
>
> When migrating from S3 to local storage, we see a number of issues. The main issue is that the migrate\_from\_s3 rake task is not taking the Uploads table as a starting point, but the posts. This causes it to skip a lot of uploads which are being left on S3. uploads used as logo’s because they are not referenced in a post uploads for avatars because they are not referenced in a post uploads that are (for some reason) referenced by their CDN URL in raw because they do not match [the regex](https://github.com/discourse/discourse/blob/master/lib/tasks/uploads.rake#L130) that is…

---

<div class="post-metadata">

**Author:** ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)\
**Post date:** [2020年八月11日 11:52 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/7 "2020-08-11T11:52:42Z")

</div>

如果你仅在管理面板中关闭 S3，那只会禁用站点级别的 S3。你需要全局禁用它，因此必须在 app.yml 中将值从 true 改为 false，然后重新构建。

如果你已正确配置 S3，它应该可以正常工作。我刚刚尝试了 migrate\_from\_s3 和 migrate\_to\_s3，对我而言运行正常，没有遇到任何错误。我不清楚这个错误的具体含义，因此建议联系 Discourse 开发者寻求帮助：

`NoMethodError: undefined method 'downcase' for nil:NilClass`

---

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [2020年八月11日 13:03 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/9 "2020-08-11T13:03:39Z")

</div>

奇怪，我下面的回复被删除了，所以我再次发布。

> [@AntiMetaman](#):
>
> 我不知道这个错误是什么意思，所以此时应该由 Discourse 开发者提供帮助：  
> `NoMethodError: undefined method ` downcase’ for nil:NilClass`

当对 nil 对象调用字符串方法时会出现该错误；在 Ruby 中，这通常发生在预期为字符串对象但实际为 nil 的情况下。

这就是该错误发生的原因。

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月11日 14:41 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/11 "2020-08-11T14:41:14Z")

</div>

已在 app.yml 中添加了 `DISCOURSE_USE_S3: false`，但错误依旧。请问您使用的是哪个版本的 Discourse？我使用的是最新版本。

---

<div class="post-metadata">

**Author:** ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)\
**Post date:** [2020年八月11日 15:32 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/12 "2020-08-11T15:32:29Z")

</div>

我也是最新版本。你在重新构建时遇到任何错误了吗？如果有，能贴出来吗？

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月11日 16:11 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/13 "2020-08-11T16:11:01Z")

</div>

不，没有任何错误。

---

<div class="post-metadata">

**Author:** ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)\
**Post date:** [2020年八月11日 16:13 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/14 "2020-08-11T16:13:51Z")

</div>

如果错误仅出现在执行 rake 命令之后，能否请你贴出你输入的确切命令？当初你配置好 S3 时，是不是还需要将文件迁移到 S3？

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月11日 16:42 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/15 "2020-08-11T16:42:06Z")

</div>

这是我的完整 app.yml 文件

## 这是一个独立的 Discourse Docker 容器模板，包含所有组件

## 

## 修改此文件后，您必须重新构建

## /var/discourse/launcher rebuild app

## 

## 编辑时请_非常_小心！

## YAML 文件对空白字符或对齐中的错误超级敏感！

## 根据需要访问 [http://www.yamllint.com/](http://www.yamllint.com/) 验证此文件

templates:

- “templates/postgres.template.yml”
- “templates/redis.template.yml”
- “templates/web.template.yml”
- “templates/web.ratelimited.template.yml”

## 如果您想添加 Lets Encrypt (https)，请取消注释这两行

- “templates/web.ssl.template.yml”
- “templates/web.letsencrypt.ssl.template.yml”

## - “templates/cloudflare.template.yml”

## 此容器应暴露哪些 TCP/IP 端口？

## 如果您希望 Discourse 与另一个 Web 服务器（如 Apache 或 nginx）共享端口，

## 详见 [Run other websites on the same machine as Discourse](https://meta.discourse.org/t/17247)

expose:

- “80:80” # http
- “443:443” # https

params:  
db\_default\_text\_search\_config: “pg\_catalog.english”

## 将 db\_shared\_buffers 设置为总内存的最大 25%。

## 将由 bootstrap 根据检测到的 RAM 自动设置，或者您可以覆盖

db\_shared\_buffers: “128MB”

## 可以改善排序性能，但会增加每个连接的内存使用量

#db\_work\_mem: “40MB”

## 此容器应使用哪个 Git 修订版？（默认：tests-passed）

#version: tests-passed

env:  
LANG: en\_US.UTF-8

# DISCOURSE\_DEFAULT\_LOCALE: en

## 支持多少个并发 Web 请求？取决于内存和 CPU 核心数。

## 将由 bootstrap 根据检测到的 CPU 自动设置，或者您可以覆盖

UNICORN\_WORKERS: 2

## TODO: 此 Discourse 实例将响应的域名

DISCOURSE\_HOSTNAME: [engineersasylum.com](http://engineersasylum.com)

## 如果您希望容器以与上述指定的相同的主机名（-h 选项）启动，请取消注释

## （默认值为 “$hostname-$config”）

#DOCKER\_USE\_HOSTNAME: true

## TODO: 初始注册时将设为管理员和开发人员的逗号分隔电子邮件列表

## 示例 ‘user1@example.com,user2@example.com’

DISCOURSE\_DEVELOPER\_EMAILS: ‘praveen369gen@gmail.com’

## TODO: 用于验证新账户和发送通知的 SMTP 邮件服务器

DISCOURSE\_SMTP\_ADDRESS: [email-smtp.us-east-1.amazonaws.com](http://email-smtp.us-east-1.amazonaws.com)  
DISCOURSE\_SMTP\_PORT: 587  
DISCOURSE\_SMTP\_USER\_NAME: AXXXXXXXXXXXXXXX  
DISCOURSE\_SMTP\_PASSWORD: “xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx”  
#DISCOURSE\_SMTP\_ENABLE\_START\_TLS: true # （可选，默认为 true）

## 如果您添加了 Lets Encrypt 模板，请取消注释以下行以获取免费 SSL 证书

LETSENCRYPT\_ACCOUNT\_EMAIL: [praxxxxxx@gmail.com](mailto:praxxxxxx@gmail.com)

## 此 Discourse 实例的 CDN 地址（配置为拉取）

## 详见 [Enable a CDN for your Discourse](https://meta.discourse.org/t/14857)

#DISCOURSE\_CDN\_URL: [//discourse-cdn.example.com](https://discourse-cdn.example.com)  
DISCOURSE\_USE\_S3: false

## Docker 容器是无状态的；所有数据都存储在 /shared 中

volumes:

- volume:  
host: /var/discourse/shared/standalone  
guest: /shared
- volume:  
host: /var/discourse/shared/standalone/log/var-log  
guest: /var/log

## 插件放在这里

## 详见 [Install plugins on a self-hosted site](https://meta.discourse.org/t/19157)

hooks:  
after\_code:  
- exec:  
cd: $home/plugins  
cmd:  
- git clone [GitHub - discourse/docker\_manager: Plugin for use with discourse docker image · GitHub](https://github.com/discourse/docker_manager.git)  
- git clone [GitHub - discourse/discourse-solved: Allow accepted answers on topics · GitHub](https://github.com/discourse/discourse-solved.git)  
- git clone [GitHub - discourse/discourse-adplugin: Official Discourse Advertising Plugin. Install & Start Serving Ads on Your Discourse Forum · GitHub](https://github.com/discourse/discourse-adplugin.git)  
- git clone [https://github.com/communiteq/discourse-sitemap.git](https://github.com/communiteq/discourse-sitemap.git)  
- git clone [GitHub - discourse/discourse-whos-online: A plugin for Discourse which uses the messagebus to display a live list of active users · GitHub](https://github.com/discourse/discourse-whos-online.git)  
- git clone [GitHub - discourse/discourse-push-notifications: Plugin for integrating Chrome and FireFox push notifications · GitHub](https://github.com/discourse/discourse-push-notifications.git)  
- git clone [GitHub - discourse/discourse-chat-integration · GitHub](https://github.com/discourse/discourse-chat-integration.git)  
- git clone [GitHub - davidtaylorhq/discourse-telegram-notifications: A plugin for Discourse which allows users to receive their notifications by telegram message · GitHub](https://github.com/davidtaylorhq/discourse-telegram-notifications.git)  
- git clone [GitHub - discourse/discourse-docs · GitHub](https://github.com/discourse/discourse-knowledge-explorer.git)  
- git clone [GitHub - discourse/discourse-math: Official MathJax support for Discourse · GitHub](https://github.com/discourse/discourse-math.git)

## 构建后运行的任何自定义命令

run:

- exec: echo “Beginning of custom commands”

## 如果您想为首次注册设置“发件人”电子邮件地址，请取消注释并更改：

## 收到第一封注册邮件后，请重新注释该行。它只需运行一次。

#- exec: rails r “SiteSetting.notification\_email=‘info@unconfigured.discourse.org’”

- exec: echo “End of custom commands”

> [@AntiMetaman](#):
>
> 如果错误仅出现在您的 rake 命令之后，那么您能贴出您输入的确切内容吗？

 ![s3](https://global.discourse-cdn.com/meta/original/3X/3/3/33f91255629335c415a5fbfaa116b449178e413d.png)

> [@AntiMetaman](#):
>
> 当您首次配置 S3 时，您不是必须将文件迁移到 S3 吗？

我不太记得确切的情况了，但我想我使用 `rake uploads:migrate_to_s3` 迁移到了 S3。

---

<div class="post-metadata">

**Author:** ![AntiMetaman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/antimetaman/32/186978_2.png) [@AntiMetaman](https://meta.discourse.org/u/AntiMetaman)\
**Post date:** [2020年八月11日 17:53 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/16 "2020-08-11T17:53:22Z")

</div>

我完全不清楚，但这里有一个与你遇到的错误完全相同的类似帖子：

> [@Undefined method \`downcase' for nil:NilClass when processing mail](https://meta.discourse.org/t/undefined-method-downcase-for-nil-nilclass-when-processing-mail/53070/2):
>
> Any chances you could send me the raw version of said email via PM?

建议你与团队成员确认一下。

---

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [2020年八月12日 05:22 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/17 "2020-08-12T05:22:18Z")

</div>

> [@Pravi](#):
>
> `DISCOURSE_SMTP_PASSWORD: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"`

你好 @Pravi

侧边栏问题：

在你发布的 `yml` 文件中，你“写道”：

```plaintext
DISCOURSE_SMTP_PASSWORD: "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"

```

这是正确的吗？你的 `yml` 文件中的密码是否使用了双引号？

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月12日 05:39 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/18 "2020-08-12T05:39:56Z")

</div>

是的，它使用了双引号。自两年前添加以来，我从未修改过它。

我已经移除了双引号，然后重新构建了应用。接着再次尝试运行 `rake uploads:migrate_from_s3`，但依然没有成功。错误依旧。

---

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [2020年八月12日 06:07 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/19 "2020-08-12T06:07:51Z")

</div>

你好 @Pravi

老实说，我是 AWS 和 S3 的反对者，所以我不使用它们。

你有没有考虑过查看 Rake 任务，逆向分析该脚本，然后一步一步地手动执行该任务？

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月12日 06:55 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/20 "2020-08-12T06:55:29Z")

</div>

我对 Discourse 的内部脚本了解不多，有点不敢编辑脚本，担心会搞砸一切。

你能告诉我 discourse.config 文件的位置吗？我在服务器上到处都找不到。find 命令没有返回任何结果。

```
root@ip-172-31-7-247:/var/discourse# find . -name "*.config"
root@ip-172-31-7-247:/var/discourse# find . -name "*.conf"
./shared/standalone/letsencrypt/engineersasylum.com/engineersasylum.com.conf
./shared/standalone/letsencrypt/engineersasylum.com/engineersasylum.com.csr.conf
./shared/standalone/letsencrypt/engineersasylum.com_ecc/engineersasylum.com.conf
./shared/standalone/letsencrypt/engineersasylum.com_ecc/engineersasylum.com.csr.conf
./shared/standalone/letsencrypt/ca/acme-v01.api.letsencrypt.org/ca.conf
./shared/standalone/letsencrypt/ca/acme-v02.api.letsencrypt.org/ca.conf
./shared/standalone/letsencrypt/account.conf
./shared/standalone/postgres_data/pg_hba.conf
./shared/standalone/postgres_data/postgresql.auto.conf
./shared/standalone/postgres_data/pg_ident.conf
./shared/standalone/postgres_data/postgresql.conf
root@ip-172-31-7-247:/var/discourse#

```

---

<div class="post-metadata">

**Author:** ![neounix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/neounix/32/215617_2.png) [@neounix](https://meta.discourse.org/u/neounix)\
**Post date:** [2020年八月12日 07:28 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/21 "2020-08-12T07:28:45Z")

</div>

> [@Pravi](#):
>
> 我对 Discourse 的内部脚本了解不多，有点害怕去编辑脚本，不想把一切搞砸。

你好 @Pravi

抱歉让你产生了误解。

我并没有要求你编辑那个文件或任何其他文件。

在我看来，“逆向工程”一个脚本意味着研究它、了解它是如何工作的，这与编辑文件毫无关系。它指的是阅读并理解它。

通常，如果我们阅读并理解任何报错的脚本或文件，我们就能明白如何解决问题。

你似乎并没有阅读那个文件，却仍在发布来自该文件的错误信息。

希望这能有所帮助。

---

<div class="post-metadata">

**Author:** ![Pravi](https://avatars.discourse-cdn.com/v4/letter/p/76d3ee/32.png) [@Pravi](https://meta.discourse.org/u/Pravi)\
**Post date:** [2020年八月12日 07:38 UTC](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338/22 "2020-08-12T07:38:19Z")

</div>

我理解你的意思。我会尝试去做。  
你能告诉我 ‘discourse.config’ 文件的位置吗？S3 的配置存储在哪里？

[下一頁](https://meta.discourse.org/t/how-to-turn-off-s3-storage/160338.md?page=2)
