Skip to content

vixshan/bento

Repository files navigation

Add a custom domain to your bento profile

Prerequisites

Get free $100 Credit on Vultr to try your app, available for a limited time only!

If you don't know how to do this, I am an Ionos Partner and you can hire me at Vikshan

  • Node.js v20.0.0 or later
  • npm v7.0.0 or later
  • A Bento account
  • A custom domain, I recommend NameCheap for this. Please note this is an affiliate link, I will get a small commission if you buy a domain using this link. Some of the VPS providers I mentioned above also sell domains. You can also use Freenom for a free domain.
  • PM2 (optional)
  • Apache2 (Required for VPS ) - I won't go deep on this, you can check a documentation I wrote for my Discord bot's dashboard here, it is basically the same thing.
  • Certbot (Required for SSL on VPS) see here

Installation

Instalation in a VPS or PC

  1. Clone this repository and run npm install in the root directory
git clone https://github.com/vixshan/bento.git
cd bento
npm install
  1. Create a .env file in the root directory and add the following variables, see .env.example for an example
BENTO_USERNAME=<your bento username>
  1. Run npm start in the root directory
npm start

The app starts using PM2, you can now access your app at http://localhost or http://localhost:3000 if you're not using a reverse proxy.

To test your app, run npm test in the root directory

npm test
  • Set up a reverse proxy to the app using Apache2 or Nginx. See here for Apache2 and here for Nginx.

DEPLOY ON ZEABUR

Deployed on Zeabur

  1. Give this repo a star and fork it to your GitHub account here.

  2. If You don't have an account a Zeabur, click on this button; Deployed on Zeabur

  3. Now head towards Create an app, select Deploy from GitHub.

  4. Now select the forked repository, select branch.

  5. Now go to Variables and add variable listed below.

    • BENTO_USERNAME - Your bento username

      by default it launches with the .env file, so in case of conflicts, remove the .env file and add the variables in the Zeabur dashboard.


  6. Change the run command to

node .
  1. Head to networking and generate/assign a domain to your app.

DEPLOY TO KOYEB (RECOMMENDED, FREE)

  1. Give this repo a star and fork it to your GitHub account here.

  2. If You don't have an account On Koyeb. Create a account.

  3. Now head towards Create an app, select Deploy from GitHub.

  4. Now select the forked repository, select branch.

  5. Now go to Variables and add variable listed below.

    • BENTO_USERNAME - Your bento username

      by default it launches with the .env file, so in case of conflicts, remove the .env file and add the variables in the Koyeb dashboard.


please note Custom domanis are not supported in KOYAB HOBBY plan, you have to upgrade to a paid plan to add a custom domain.

Deployment to Heroku

  1. Give this repo a star and fork it to your GitHub account here.

  2. if you do not have an Heroku account,create one here.

  3. Click here to deploy the app to Heroku

  4. Now go to Settings -> Domains and add your custom domain.

Adding a custom domain to your Heroku app

  1. Now go to Deploy -> Deployment method and connect your app to the forked repo to enable auto deploys.

Note: You can also deploy the app to Heroku using the Heroku CLI.

KNOWN BUG: Due to some issues, I think caching, deploying the app on Koyeb/Heroku doesnt show the images, They load for a brief second and disappear. So, I recommend deploying the app to a VPS or PC.

DEPLOY TO RAILWAY

  1. Give this repo a star and fork it to your GitHub account here.

  2. If you do not have an Railway account,create one here.

  3. Now head towards https://railway.app/new, select Deploy from repo.

  4. Now select the forked repository, select branch.

  5. Now go to Variables and add variable listed below.

    • BENTO_USERNAME - Your bento username
  6. Go to Deployments and wait for deplyment to complete.

  7. Now go to Settings -> Networking -> Custom Domain and add your custom domain.

Adding a custom domain to your Railway app

DEPLOY TO OKTETO

  1. Give this repo a star and fork it to your GitHub account here.

  2. If You don't have an account On Okteto. Create a account.

  3. Now head towards Lunch Dev Environment.

  4. Now select the forked repository, select branch.

  5. Now go to Variables and add variable listed below.

    • BENTO_USERNAME - Your bento username
  6. Click on Advanced Options and add public/okteto.yml as your Okteto Manifest Path.

    Launching your Okteto app
  7. To add your custom domain, see this documentation.

DEPLOY TO REPL.IT (FREE)

  1. Give this repo a star and fork it to your GitHub account here.
  2. If You don't have an account On Repl.it. Create a account.
  3. Run on Repl.it
  4. Now go to Secrets and add variable listed below.
    • BENTO_USERNAME - Your bento username
  5. To add a custom domain, check this documentation.

Usage

I haven't tried deploying the app to other platforms like AWS, CloudFlare Workers, etc. If you have, please let me know how it went. My instance is deployed on Koyeb, you can check it here

Contributing

I am not a professional developer, I am still learning. If you find any bugs or issues with the app please open an issue or a pull request. I will be happy to review it. Also if you have any suggestions or ideas, please let me know.

If this project helped you, please consider giving it a star ⭐, or sponsor me here and check out my other projects here It will help me a lot.

License

This project is licensed under the MIT License - see the LICENSE file for details

Powered by;

DigitalOcean Referral Badge