Skip to main content

Going to production

Railway

Railway is (as far as I know) the easiest and the fastest way to spin up the OSEMS app production ready (and they offer a free trial account with $5 credits).

Click the following button to deploy the app:

Deploy on Railway

You should land on a site that looks like this:

Click "Deploy Now".

Next, sign in with GitHub:

Accept terms for creating an account and allow to authorize Railway GitHub App.

On the next page, you need to fill in environment variables:

  • EMAIL_SERVER_PASSWORD: SMTP password
  • INITIAL_ADMIN_EMAIL: Admin email (to receive a login link to the app)
  • EMAIL_SERVER_PORT: SMTP port, e.g. 587
  • EMAIL_SERVER_USER: SMTP user
  • EMAIL_SERVER_HOST: SMTP host
  • JWT_SECRET: Generate it at: https://generate-random.org/string-generator?length=64
  • NEXT_PUBLIC_EMAIL_FROM: Email address allowed by SMTP server

Important: you cannot send emails introducing yourself as "whoever@you.want" (NEXT_PUBLIC_EMAIL_FROM) if it's not an email registered on the SMTP server.

It has to be your email, connected with the SMTP account you authenticate to with EMAIL_SERVER_USER and EMAIL_SERVER_PASSWORD.

You can put the email also in format "Your Name <you@example.com>", so emails from you will be shown in inboxes by that name.

For development or testing purpose you can use Ethereal Email, that will generate you temporary SMTP details. In that case NEXT_PUBLIC_EMAIL_FROM and INITIAL_ADMIN_EMAIL doesn't need to be real.

Next, you click deploy and wait.

The app will be ready when deployment item becomes green, showing you an automatically generated subdomain of your app.

Click on that subdomain to be redirected to it.

Then you should see a login screen of the up and running OSEMS app:

Enter email you've provided as INITIAL_ADMIN_EMAIL and check your email inbox.

In case of using Ethereal Email, go to Messages.

You should find "Confirm logging in" message with "Click here to log in" link inside.

Click it and you should be redirected to OSEMS dashboard.

That's it 🎉!

Now you have up and running Open Source Email Marketing Service on Railway infrastructure.

You can start creating mailing lists, using signup forms, adding contacts, sending newsletters and creating autoresponders.

In case of any issues, just report them.