Selfhosted tutorial

Fonnte provide selfhosted version for whatsapp API so you can send and reply whatsapp message from your own server.

Why selfhosted?

a portion of our users really concern about privacy and security. some doesn't even want fonnte to store anything including send history, request, etc even if this is for their own benefit.

to make sure the data is circulated inside of user's server only, we make this "lite version" of fonnte to be installed.

so you can have your whatsapp data only on your server.

Files

You will get these files :

  • Fonnte file to be installed in your ubuntu server
  • Fonnte dashboard for dashboard UI
  • Database for storing your data

Limitation

This selfhosted version is not fonnte.

it's written from scratch to be used especially for internal usage.

Built for

  • internal use
  • send message
  • reply message
  • No file limitation
  • No quota limitation

Limitation

  • No SAAS mode
  • Plain API
  • No statistic
  • Limited to 10 devices

Solution

  • No SAAS mode ? Have a good developer to build SAAS version for it. for initial move, you will need to create
    • Proper user system (login, register, etc)
    • API wrapper (create your own API with authentication etc for executing selfhost API)
    • Business plan (subscription or else)
    • More feature
  • Plain API ? Make API wrapper, so you can secure your API calls
  • No statistic ? Extend the db & function calls to have the statistics
  • Limited to 10 devices ? Ask admin for more devices

Requirement

to run this selfhosted version, you will need :

  1. VPS/Dedicated server
  2. Ubuntu v18.04++
  3. NodeJS v20++
  4. Ubuntu user with sudo previlege
  5. ipV4
  6. MariaDB or MYSQL (LTS prefered)
  7. Reserve port 3434 & 3435

for internal usage, webserver is optional. but i recommend to have one.

Installation

First of all, you will need to create 2 app, 1 for server the other 1 for admin page.

the admin page is optional though, you can just install the server if you just need to use API and webhook.

as i am using runcloud for panel, i will use it for this installation tutorial.

you can use any panel or no panel at all as long as port 3434 and 3435 available.

Database Setup

fonnte selfhost only support mysql as database.

you can use mysql or mariadb.

create your database user, database name and password.

this is required to run the server.

Server Installation

Put fonnte file in the folder you want it to run.

set permission to 770 so the file can be executed.

without proper permission, the file will not found even if it's there.

then paste this code in the cli and run.

install :

sudo ./fonnte && nano .env && sudo ./fonnte && journalctl -fu fonnte-selfhost.service -o cat

you will need to update database connection credentials

  • DB_NAME
  • DB_USER
  • DB_PASSWORD

then you can press ctrl+s to save and ctrl+x to exit.

wait for installation to complete and the server will run.

restart :

systemctl restart fonnte-selfhost.service && journalctl -fu fonnte-selfhost.service -o cat

Admin installation

for admin installation, you can upload the zip file the unzip it.

separated app folder is highly recommended for cleaner environment.

then you can unzip it and move the content to the folder.

Testing

you can open the admin url in the browser and run.

the default value for both user and password is admin.

you can change it in the env.php

you can try connect your device, send message and reply message.

Custom request

We also offer custom request to be tailored as you need at custom price.

but we mainly focus on the server customization.

Conclusion

This is a short guide for fonnte selfhost solution.

if you need any asistance, you can ask admin fonnte.

Related knowledge

See more
Made with in Indonesia