# Uploading a file to the web root

**URL:** https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626
**Category:** Self-hosting
**Created:** [November 16, 2015, 1:51am UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626 "2015-11-16T01:51:36Z")
**Posts on this page:** 20
**Page:** 1

<div class="post-metadata">

### Author: ![enry](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@enry](https://meta.discourse.org/u/enry)
#### Post date: [November 16, 2015, 1:51am UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/1 "2015-11-16T01:51:36Z")

</div>

I need to upload a file to the web root, specifically, some SSL certificate activation file. On every other webapp I’ve ever used in my 15+ years of working in web, I could relatively easily do this with varying degree of difficulty. Only with this docker+discourse ruby thing are things so incredibly layered that I feel I need to learn 12 different things just to upload a file to a web root.

Please help? TIA.

---

<div class="post-metadata">

### Author: ![wesochuck](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/wesochuck/32/108706_2.png) [@wesochuck](https://meta.discourse.org/u/wesochuck)
#### Post date: [November 16, 2015, 3:32am UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/2 "2015-11-16T03:32:09Z")

</div>

Maybe this will help?

> [@Is there any way to access the public folder outside of Docker?](https://meta.discourse.org/t/is-there-any-way-to-access-the-public-folder-outside-of-docker/26051/2):
>
> Sure, have a look in /var/discourse/shared/standalone. slight_smile The public folder itself is not stored there, but e.g. the compiled assets and uploaded pictures; these directories are symlinked into Discourse’s public folder. If your goal is to serve static content, do not store it in the public folder as that folder is under source control and your files would be destroyed when the container is rebuilt.

I’d agree docker adds some complexity for certain tasks, but the stability and ease of install greatly outweigh these drawbacks for me.

---

<div class="post-metadata">

### Author: ![enry](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@enry](https://meta.discourse.org/u/enry)
#### Post date: [November 16, 2015, 11:14pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/3 "2015-11-16T23:14:18Z")

</div>

@wesochuck thanks for the fast reply. Unsure if I should add to the other post or post here, but we have a number of files that must be placed in the **root** \<== emphasis here, as adding some subfolder that get symlinked through voodoo magic is not what I’m looking for.

In addition to the SSL verification file that our CA wants, we also have to put a google verification file. Yes I know GWT has DNS mechanism but that is more painful. Also others suggested a subdomain hosted in a normal webserver. This all seems like a painful workaround for something that should not be this hard!

But let me take a step backwards here. I would like to think I have a pretty good idea of Linux, hosting, VM, etc… Is there some architecture document on this docker thing ? Something more than marketing ([https://www.docker.com/what-docker](https://www.docker.com/what-docker)) but more educational than “stfu and type these commands” ([What is Docker? | Docker Docs](https://docs.docker.com/engine/userguide/basics/)).

---

<div class="post-metadata">

### Author: ![enry](https://avatars.discourse-cdn.com/v4/letter/e/9fc29f/32.png) [@enry](https://meta.discourse.org/u/enry)
#### Post date: [November 16, 2015, 11:26pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/4 "2015-11-16T23:26:10Z")

</div>

Update - [What is Docker? | Docker Docs](https://docs.docker.com/engine/introduction/understanding-docker/)

---

<div class="post-metadata">

### Author: ![vhamon](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vhamon](https://meta.discourse.org/u/vhamon)
#### Post date: [February 2, 2017, 9:19am UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/5 "2017-02-02T09:19:58Z")

</div>

Hello,

I tried to put a .txt file into /var/discourse/shared/standalone, giving it www-data read rights. After rebuilding app, the file is still not available to public. Nginx need to be configured ? How ? Any help would be greatly appreciated.

Thanks in advance,  
Valentin.

---

<div class="post-metadata">

### Author: ![vhamon](https://avatars.discourse-cdn.com/v4/letter/v/cdc98d/32.png) [@vhamon](https://meta.discourse.org/u/vhamon)
#### Post date: [February 2, 2017, 12:55pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/6 "2017-02-02T12:55:05Z")

</div>

I found by myself a simple solution by adding a custom command in app.yml :  
run :

- exec : echo “MY\_KEY” \> /var/www/discourse/public/KEY\_NAME.txt

---

<div class="post-metadata">

### Author: ![Ryan\_Nix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_nix/32/78712_2.png) [@Ryan\_Nix](https://meta.discourse.org/u/Ryan_Nix)
#### Post date: [August 13, 2017, 1:43pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/8 "2017-08-13T13:43:11Z")

</div>

I’m still struggling to find a way to upload a domain verification for Mailjet. I can’t create a subdomain, so I would prefer the txt file method of verification. Where can I place the .txt file within the Discourse folder?

Thanks!

Ryan

---

<div class="post-metadata">

### Author: ![Shaneod](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@Shaneod](https://meta.discourse.org/u/Shaneod)
#### Post date: [June 21, 2018, 5:15pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/9 "2018-06-21T17:15:59Z")

</div>

Hey @Ryan_Nix - did you find a way to do that? struggling to do the same.

---

<div class="post-metadata">

### Author: ![Shaneod](https://avatars.discourse-cdn.com/v4/letter/s/85e7bf/32.png) [@Shaneod](https://meta.discourse.org/u/Shaneod)
#### Post date: [June 21, 2018, 5:18pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/10 "2018-06-21T17:18:47Z")

</div>

> [@vhamon](#):
>
> I found by myself a simple solution by adding a custom command in app.yml :  
> run :
> 
> - exec : echo “MY\_KEY” \> /var/www/discourse/public/KEY\_NAME.txt

Hey @vhamon - can you explin that step by step - not familar with this setup really and need to add a file to root.

---

<div class="post-metadata">

### Author: ![Ryan\_Nix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_nix/32/78712_2.png) [@Ryan\_Nix](https://meta.discourse.org/u/Ryan_Nix)
#### Post date: [June 22, 2018, 11:38am UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/11 "2018-06-22T11:38:23Z")

</div>

In the end, I was able to create the TXT file.

---

<div class="post-metadata">

### Author: ![lt100](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lt100/32/67668_2.png) [@lt100](https://meta.discourse.org/u/lt100)
#### Post date: [November 21, 2018, 2:38pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/12 "2018-11-21T14:38:23Z")

</div>

Would you mind sharing how exactly you did it?

---

<div class="post-metadata">

### Author: ![Ryan\_Nix](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/ryan_nix/32/78712_2.png) [@Ryan\_Nix](https://meta.discourse.org/u/Ryan_Nix)
#### Post date: [November 21, 2018, 3:42pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/13 "2018-11-21T15:42:05Z")

</div>

Sure. I created a TXT record at my DNS provider Cloudflare which was enough to validate the domain.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [November 21, 2018, 4:28pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/14 "2018-11-21T16:28:44Z")

</div>

It’s always going to be easier here to use DNS records for domain verification.

---

<div class="post-metadata">

### Author: ![lt100](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lt100/32/67668_2.png) [@lt100](https://meta.discourse.org/u/lt100)
#### Post date: [November 21, 2018, 4:44pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/15 "2018-11-21T16:44:56Z")

</div>

Thanks, unfortunately, the service I use ([formspree.io](http://formspree.io)) requires verification with a txt file, and I have no idea how to add it.

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [November 21, 2018, 5:16pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/16 "2018-11-21T17:16:28Z")

</div>

Can you point us at something on [formspree.io](http://formspree.io) which talks about uploading a txt file?

---

<div class="post-metadata">

### Author: ![lt100](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lt100/32/67668_2.png) [@lt100](https://meta.discourse.org/u/lt100)
#### Post date: [November 21, 2018, 5:24pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/18 "2018-11-21T17:24:56Z")

</div>

> Can you point us at something on [formspree.io](http://formspree.io/) which talks about uploading a txt file?

 ![formspree](https://global.discourse-cdn.com/meta/original/3X/f/4/f4d584750c9f6fec3ac9b74a34563569e63cc560.png)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [November 21, 2018, 5:27pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/19 "2018-11-21T17:27:16Z")

</div>

You’re not pointing me toward anything on their site, that’s a screenshot with no context. To be clearer I meant a support page or other document.

---

<div class="post-metadata">

### Author: ![lt100](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lt100/32/67668_2.png) [@lt100](https://meta.discourse.org/u/lt100)
#### Post date: [November 21, 2018, 5:38pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/20 "2018-11-21T17:38:45Z")

</div>

I’m sorry, there is no mention of this feature in their docs.

Verification txt is required when a user creates a form to accept requests ‘site-wide’ (from `mywebsite.com/*`) and not from specific pages (e.g., `mywebsite.com/login`).

 ![fs2](https://global.discourse-cdn.com/meta/original/3X/6/8/68982136280d379c68f58217343e68a7d136c54e.png)

(My users use formspree to requests invites)

---

<div class="post-metadata">

### Author: ![Stephen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/stephen/32/95011_2.png) [@Stephen](https://meta.discourse.org/u/Stephen)
#### Post date: [November 21, 2018, 6:27pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/21 "2018-11-21T18:27:21Z")

</div>

Where are your users coming from? Do you have another site or application somewhere?

Are there no other more sophisticated methods available to you for enrolement?

---

<div class="post-metadata">

### Author: ![lt100](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lt100/32/67668_2.png) [@lt100](https://meta.discourse.org/u/lt100)
#### Post date: [November 21, 2018, 6:43pm UTC](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626/22 "2018-11-21T18:43:56Z")

</div>

Unfortunately not, I’m not a skilled webdev, just trying to use whatever services are available.

Thank you for taking the time to answer me though, I’ll get in touch with formspree and ask whether they can verify my website through DNS records, or manually.

[Next page](https://meta.discourse.org/t/uploading-a-file-to-the-web-root/35626.md?page=2)
