Configuration
You now have the server and files setup, so we can get to configuring the basics. So, we will go over every line of the .env
file.
Since we use keys for payment processors, login methods, and similar we want to store them safely within your .env
file rather then the database.
Basics
LICENSE_KEY=
- You get this from https://shadowdevs.com/license and should be a simple string. This your license from us to use Shadow Store.
PORT=
- By default its
5173
, but you can change it to any 4 character number.
- By default its
MONGO_URL=
- The MongoDB URL for your database. If you do not add any password lock to your database and leave it as local only, you can use something like this:
mongodb://127.0.0.1:27017/shadowstore
- The MongoDB URL for your database. If you do not add any password lock to your database and leave it as local only, you can use something like this:
ORIGIN=
- Your full domain, include the
https://
. Ex:https://shadowdevs.com
- Your full domain, include the
PUBLIC_DOMAIN=
- Just your domain name for the website. Ex:
shadowdevs.com
- Just your domain name for the website. Ex:
Discord
DISCORD_CLIENT_ID=
- You can find this on the Discord Developer Application > General Information. It would be the
Application ID
.
- You can find this on the Discord Developer Application > General Information. It would be the
DISCORD_CLIENT_SECRET=
- You can find this on the Discord Developer Application > OAuth2. It will be the
Client Secret
.
- You can find this on the Discord Developer Application > OAuth2. It will be the
BOT_TOKEN=
- You can find this on the Discord Developer Application > Bot. It is the
Token
.
- You can find this on the Discord Developer Application > Bot. It is the
OWNERS=[""]
- This must always be an array (
[""]
), and should contain the Discord User IDs for people you want to login with owner permissions.
- This must always be an array (
Payment Processors
PayPal
This required you to have a PayPal Business Account to be able to use their API in the required ways by Shadow Store.
PAYPAL_PUBLIC=
- PayPal API Client ID
PAYPAL_SECRET=
- PayPal API Secret Key
Instructions for getting PayPal API Keys
- Head to the PayPal Developers Panel, select live mode, and create a new app.
- Put in your app name and hit create app.
- Grab the
Client ID
&Secret 1
and paste them into the.env
in their respective place.
Make sure to NOT share your PayPal Client ID or Secret with anyone! This would give them FULL access to your API, which could let them transfer funds and more.
Now that have the keys and have put them into your .env
, you are ready to go. Once you turn on your site and login to the admin panel, head to the settings page and hit the "Payment Details" button to enable PayPal or review/edit the keys (you can review/edit them via the .env
file at anytime as well). Note that editing the keys will require a site restart to go into effect.
Stripe
You will need a Stripe account if you wish to use this processor.
STRIPE_PUBLIC=
- Stripe API Publishable key
STRIPE_SECRET=
- Stripe API Secret Key
Instructions for getting Stripe API Keys
- Head to the "Developers" tab in the bottom right then the "API Keys" tab.
- Click create secret key and give it a name.
- You can only view your secret key once, so ensure you save it.
- You will also need to grab the
Publishable Key
, so ensure you create it if it isn't already created. - Once you have them both, head to your
.env
file and paste the keys into your respective slots.
Make sure to NOT share your Stripe Publishable or Secret key with anyone! This would give them FULL access to your API, which could let them transfer funds and more.
Now that have the keys and have put them into your .env
, you are ready to go. Once you turn on your site and login to the admin panel, head to the settings page and hit the "Payment Details" button to enable Stripe or review/edit the keys (you can review/edit them via the .env
file at anytime as well). Note that editing the keys will require a site restart to go into effect.
Emails
SENDGRID_KEY=
- Head to the SendGrid API Keys page, create an API key, and then copy the key.
- If using SendGrid, then you don't need to put anything into the SMTP options.
SMTP_HOST=
- The host address for your SMTP server.
- Set to
null
if using Gmail SMTP.
SMTP_PORT=
- The port for your SMTP server.
- Set to
null
if using Gmail SMTP.
SMTP_USER=
- The email user for your SMTP server. Ex:
[email protected]
- The email user for your SMTP server. Ex:
SMTP_PASS=
- The password or key for your SMTP server.
License System
LICENSE_SYSTEM_KEY=
- Use the license key from our site that is given once you purchase the Internal License System or External License System.
Advanced
These settings should remain the same way as seen below / provided in the download, unless you know what you are doing.
BODY_SIZE_LIMIT=5368709120
- This increases the base SvelteKit body size limit to 10gbs.
HOST=localhost
- This modifies how SvelteKit interacts with itself.