Running my own discourse image

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.
I modified the discourse source which is cloned from
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!

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.


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

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.


There is native support for SSO. You run a single route on your main app providing the Discourse SSO protocol, documentation is here: Official Single-Sign-On for Discourse (sso)


What Plugin are you suggesting?

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.

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?

I can move it to support. But please make sure you are using the standard install method using the official discourse repo.

Yep, thanks. I surely used standard install method.

So you are now using an unmodified discourse instance? You used the standard install script, unchanged and are no longer attempting to use a fork?

I think there is a misunderstanding. I meant I followed the official guideline to install discourse.
I looked up many resources about discourse sso but nothing was helpful for my login scenario.
That’s why I had to modify the source codes.

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 Beginner's Guide to Creating Discourse Plugins - Part 1

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?

1 Like