> ## Knowledge Base Index
> Fetch the complete knowledge base index at: https://help-legacy.galaxycloud.app/sitemap.xml
> Use this file to discover available pages before exploring further.
> Pure-Markdown content can be obtained by appending a '.md' suffix to the content URLs listed in the sitemap (without the trailing slash).

# Deployment configurations


### Overview
Learn how to configure an application on Galaxy.

|| A valid credit card must be registered on your Galaxy account to deploy any application, including free apps.

#### Configure your domain name

The first thing you should do is verify that the deployment was successful. Check to see if the application is accessible by navigating to its URL. Then check the application logs in Galaxy at `galaxy.meteor.com/app/<app_name>/logs` to see if there are any errors that are affecting the deployment.

Once your application is successfully deployed, head on over to your [Galaxy dashboard](http://galaxy.meteor.com) to configure your application by adding a custom domain name and enabling SSL encryption.

Add a domain in your application’s settings and point your DNS to:

* `galaxy-ingress.meteor.com` for applications in the US East region.
* `eu-west-1.galaxy-ingress.meteor.com` for applications in the EU West region.
* `ap-southeast-2.galaxy-ingress.meteor.com` for applications in the Asia-Pacific region.

If you are deploying to a root domain (for example mydomain.com), then follow the advanced instructions [here](/dns.html).

![](https://storage.crisp.chat/users/helpdesk/website/273b1dc6f4f43800/image_11avmf0.png)

[Enable encryption](/encryption.html) to secure sensitive data by generating a free [Let’s Encrypt](https://letsencrypt.org) certificate by clicking on `Generate Certificate` or uploading your own custom certificate.

![](https://storage.crisp.chat/users/helpdesk/website/273b1dc6f4f43800/image_gpdr8u.png)

#### Configure your MongoDB

If your Meteor application has a package that requires Mongo, then you'll need a Mongo database configured for your application. Most users will want to use a hosted database provider instead of running it yourselves, such as [MongoDB Atlas](https://www.mongodb.com/cloud/atlas) or [ScaleGrid](https://console.scalegrid.io/users/register?partnerID=meteor.com).

For optimum performance, we recommend that you setup a database in the same AWS region as your app deployment.

Many MongoDB providers expect you to tell them what IP addresses your app will be connecting from and forbids all connections from outside those addresses. To accomplish this on Galaxy, you'll need to [run your app in IP whitelisting mode](/container-environment.html#network-outgoing).

##### Create a settings file for Galaxy

Create a Meteor settings file that will define the set of configurations needed for your application to deploy and run on Galaxy. At a minimum, the settings file needs to contain the connection URL to the MongoDB database.

In your application directory, create a file named settings.json. Put the Mongo URI in the file, using this format:

```json
{
  "galaxy.meteor.com": {
     "env": {
       "MONGO_URL": "mongodb://<dbuser>:<dbpassword>@<dbserver>:<dbport>/<dbname>"
     }
   }
}
```

> You can contact support to obscure your settings.json file. Once this is done, all app settings will be hidden across your account. A user with access to any of your app's dashboards will not be able to view the information in your settings.json file from within the associated dashboard after this feature is enabled.



#### Environment variables


Environment variables in Galaxy are managed using your app's `settings.json` file. Galaxy interprets key/value pairs found in the `{"galaxy.meteor.com": {"env": { ... }}` section of your settings as environment variables.

Note that your entire `settings.json` file has a size limit of approximately 32KB. If your settings file is larger than this, your containers will not run successfully. Unfortunately, there will be no clear error message in this case pointing at the root cause of the problem.


##### Common environment variables


The following environment variable are commonly set for Galaxy apps:

* `MONGO_URL`: If you have any Meteor packages that requires a Mongo database, then this environment variable must be set. See your database provider instructions to determine the correct format and content for the URL. An example format would be `"MONGO_URL": "mongodb://<db_username>:<db_password>@<db_server_host>:<db_server_port>/<db_name>"`
* `MONGO_OPLOG_URL`: This is an optional environment variable if you are using MongoDB for your application. This is a performance optimization that we recommend for production applications. Read more in our [detailed documentation](https://github.com/meteor/docs/blob/master/long-form/oplog-observe-driver.md#oplogobservedriver-in-production). An example format would be `"MONGO_OPLOG_URL": "mongodb://<oplog_username>:<oplog_password>@<db_server_host>:<db_server_port>/<oplog_db_name>?authSource=admin"`
* `ROOT_URL`: This is an optional environment variable. If you have any Meteor packages that need to generate a URL, then those packages will use `ROOT_URL` to identify the URL where the app is hosted. The default value for this is the primary hostname that your app is deployed to. This variable hooks up to the `Meteor.absoluteUrl()` API.
* `MAIL_URL`: This is required if you have the `email` package in your application. In order to send email from the application, the `MAIL_URL` environment variable needs to be set. An example format would be `"MAIL_URL": "smtp://postmaster%40your.mailserver.address.com:password@mailserver.smtp.address.com:587"`
* `GALAXY_NODE_OPTIONS`: This is for any Node settings that can be controlled at the command line.
* `USER_LOG_DESTINATION`: This allows you to configure [custom log storage](./logs.html#custom-storage).

If you're using MongoDB, you'll have to configure a database and a user account with rights to access that database with your database provider.


### Learn more


* Learn how to [configure your MongoDB](/mongodb.html) provider for Galaxy.
* Deployment-specific configuration using [Meteor.settings](http://docs.meteor.com/#/full/meteor_settings).
* [Secrets Management: How to Secure Your settings.json and Deploy Meteor Safely](https://help.galaxycloud.app/en/article/secrets-management-how-to-secure-your-settingsjson-and-deploy-meteor-safely-12hxmy3/)