DEV Community πŸ‘©β€πŸ’»πŸ‘¨β€πŸ’»

Szikszai GusztΓ‘v
Szikszai GusztΓ‘v

Posted on

Base API: Self Hosted!

Base API can now be self hosted πŸŽ‰

How does it work?

Thanks to Crystal, the end result is just a binary that you download and run on your own server (Linux for now, macOS coming soon).

What is available?

You can create projects and use all of the same features as the online version with the same interface without any restrictions.

What does it need to run?

You will need to configure:

  • The database, which needs to be PostgreSQL.

  • The credentials for a Mailgun account to send emails (SMTP will be available soon).

  • Optionally credentials for AWS S3 if you want to store files and images in the cloud, otherwise they will be saved locally.


How to get it up and running?

  1. Create an account and get a licence key from your account page:
    Account Page
    Licence Key

  2. Download the binary and save it in a directory and make it runnable: chmod +x base-latest-linux

  3. Create the configuration file in the same directory named config.yml with the following content (replaced with your credentials):

    database_url: "postgres://postgres:postgres@localhost/base"
    files_path: "public/files"
    license: "l2vHT62y6qbB5hFv"
    mailgun_api_key: "FVn5k63OcsVUgA7T"
    mailgun_domain: "some.domain.com"
    s3_region: "eu-west-1"
    s3_bucket: "base"
    s3_secret: "8SXLTxMnaWnsfX7b"
    s3_key: "s6T5NULtt25jCUzV"
    log_level: "debug"
    admin_username: "admin"
    admin_password: "12345"
    
  4. Run the migrations to create the tables in the database with the ./base-latest-linux migrate command.

  5. Start the server with the ./base-latest-linux β€”port 8080 command.

  6. Navigate to http://localhost:8080 to see the dashboard.
    Status Page

  7. That’s it you now have Base API running on your server and you can connect to it with any of the client libraries.


πŸ“» Follow me for more Base API goodness in the near future.

Top comments (0)

🌚 Browsing with dark mode makes you a better developer.

It's a scientific fact.