# Running my own discourse image

**URL:** https://meta.discourse.org/t/running-my-own-discourse-image/144555
**Category:** Development
**Created:** [March 17, 2020, 8:45am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555 "2020-03-17T08:45:18Z")
**Posts on this page:** 13
**Page:** 1

<div class="post-metadata">

### Author: ![Lona\_Lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lona_lee/32/169072_2.png) [@Lona\_Lee](https://meta.discourse.org/u/Lona_Lee)
#### Post date: [March 17, 2020, 8:45am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/1 "2020-03-17T08:45:18Z")

</div>

Hello there.

I’m trying to get discourse working on my EC2 instance. the default setup on the EC2 is done. Nothing seems to be wrong with it.  
However,  
I modified the discourse source which is cloned from [GitHub - discourse/discourse: A platform for community discussion. Free, open, simple. · GitHub](https://github.com/discourse/discourse.git).  
I tested the app locally and everything seems to work well, so I need to deliver this source code set to my EC2 instance to replace discourse\_dev which is the original source code.

I made an docker image and pulled it on EC2 instance and started container from the image.  
when I try ./launcher enter app, I couldn’t find /var/www/discourse.  
what am I doing wrong here? please help me out!

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 17, 2020, 8:50am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/2 "2020-03-17T08:50:24Z")

</div>

> [@Lona\_Lee](#):
>
> I modified the discourse source which is cloned

If you hadn’t done that this might have been a straightforward Support post.

Why did you need to do that? Why aren’t you using the Plugin or Theme Component architecture?

Generally non-standard installs are not supported here.

---

<div class="post-metadata">

### Author: ![Lona\_Lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lona_lee/32/169072_2.png) [@Lona\_Lee](https://meta.discourse.org/u/Lona_Lee)
#### Post date: [March 17, 2020, 8:57am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/3 "2020-03-17T08:57:48Z")

</div>

I was working on SSO,

1. have users logged in my website
2. users click a link, they can be redirected to discourse with a login token  
above is my scenario so I had to modified a few things

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 17, 2020, 8:59am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/4 "2020-03-17T08:59:58Z")

</div>

That’s a high maintenance configuration. You will need to constantly merge changes in. If you need to modify the API layer use a Plugin.

Get the basic installation working using Discourse tests-passed and move your changes to a plugin as necessary.

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [March 17, 2020, 2:06pm UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/5 "2020-03-17T14:06:32Z")

</div>

> [@Lona\_Lee](#):
>
> I was working on SSO,

There is native support for SSO. You run a single route on your main app providing the [Discourse SSO](https://meta.discourse.org/t/13045?silent=true) protocol, documentation is here: [Official Single-Sign-On for Discourse (sso)](https://meta.discourse.org/t/official-single-sign-on-for-discourse-sso/13045)

---

<div class="post-metadata">

### Author: ![Lona\_Lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lona_lee/32/169072_2.png) [@Lona\_Lee](https://meta.discourse.org/u/Lona_Lee)
#### Post date: [March 19, 2020, 5:54am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/6 "2020-03-19T05:54:36Z")

</div>

What Plugin are you suggesting?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 19, 2020, 5:56am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/7 "2020-03-19T05:56:35Z")

</div>

Write your own. But I was speaking generally. Rafael, however has pointed out that sso is supported natively in the base install so you just need to follow the guide he links to configure it.

---

<div class="post-metadata">

### Author: ![Lona\_Lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lona_lee/32/169072_2.png) [@Lona\_Lee](https://meta.discourse.org/u/Lona_Lee)
#### Post date: [March 19, 2020, 6:07am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/8 "2020-03-19T06:07:05Z")

</div>

Yes. I had done it before making this topic.  
Well.. I’m here to ask you guys about deploying a discourse image to a server. (in my case, that’s EC2 instance)  
Should I move this to another category?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 19, 2020, 6:09am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/9 "2020-03-19T06:09:29Z")

</div>

I can move it to support. But please make sure you are using the [standard install](https://meta.discourse.org/t/142537?silent=true) method using the official discourse repo.

---

<div class="post-metadata">

### Author: ![Lona\_Lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lona_lee/32/169072_2.png) [@Lona\_Lee](https://meta.discourse.org/u/Lona_Lee)
#### Post date: [March 19, 2020, 6:10am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/10 "2020-03-19T06:10:52Z")

</div>

Yep, thanks. I surely used [standard install](https://meta.discourse.org/t/142537?silent=true) method.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 19, 2020, 6:14am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/11 "2020-03-19T06:14:47Z")

</div>

So you are now using an unmodified discourse instance? You used the [standard install](https://meta.discourse.org/t/142537?silent=true) script, unchanged and are no longer attempting to use a fork?

---

<div class="post-metadata">

### Author: ![Lona\_Lee](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/lona_lee/32/169072_2.png) [@Lona\_Lee](https://meta.discourse.org/u/Lona_Lee)
#### Post date: [March 19, 2020, 6:30am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/12 "2020-03-19T06:30:57Z")

</div>

I think there is a misunderstanding. I meant I followed the official guideline to install discourse.  
I looked up many resources about [discourse sso](https://meta.discourse.org/t/13045?silent=true) but nothing was helpful for my login scenario.  
That’s why I had to modify the source codes.

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [March 19, 2020, 6:32am UTC](https://meta.discourse.org/t/running-my-own-discourse-image/144555/13 "2020-03-19T06:32:43Z")

</div>

So you need to move your code to your own plugin. I trust you have the skills to do that if you are able to modify the code directly? Install like everyone else. Otherwise your situation is unsupported unless someone has a lot of free time on their hands to work out your novel case.

Please use the plugin architecture if the core logic does not fit your needs. Then at least the basic install is identical. You will thank yourself down the line when updates are just a button click. You will also help anyone who takes over from you and get more timely support here.

The guide you may need is here [Developing Discourse Plugins - Part 1 - Create a basic plugin](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515)

Before going that far, though, you might want to explain why the native SSO support does not suit your needs and perhaps an SME on that functionality can weigh in?
