Hosting your own TinyWebDB

tinywebdb
php

(Diego Barreiro Pérez) #1

How to host your own TinyWebDB Instance

This tutorial will help you to host your own TinyWebDB Instance for FREE using an alternative PHP version
This means that you can use any hosting provider or a VPS with a running Apache & PHP server

The tutorial is divided in 4 different sections:

  1. Signup into a hosting service
  2. Uploading the files
  3. Configuration
  4. Makeroid Builder setup

1. Signup into a hosting service

You can skip this step and go to “2. Uploading the files” if you already have a hosting provider or a VPS

One provider that will suit you is AwardSpace, so we’ll use that one for this guide. But you can use any other if they allow API hostings (this means that websites can be accessed with JavaScript disabled basically)

  1. Signup into AwardSpace by clicking on the “Give it a try” button
    image

  2. Fill the following form with your details (or use a Social Login) and click on Register Now!

  3. After closing all Welcome Dialogs, scroll down and click on Domain Manager:

  4. Click on “Create a Free Subdomain”, input the desired name for your project and hit “Create”:

  5. You are done! In a few minutes your new website will be ready


2. Uploading the files

For this section, we’ll use the File Transfer Protocol (FTP) to upload the files as all hosting providers allow it, and you can easily configure it for your VPS (just run sudo apt-get install vsftpd if FTP is not yet enabled)

  1. First of all, we’ll need to install a FTP Client on our computer to access the files. I strongly recommed FileZilla. For me, it’s the best one due to its simplicity and functionalities.
    - For Windows users: Windows x64 or Windows x32
    - For Mac OS X users: Mac OS X
    - For Linux users: Execute sudo apt-get install filezila
    Or just Google “FileZilla Client your_platform_name Installation

  2. Now we will need the FTP Access Credentials
    If you use a VPS, those credentials are the ones used to login via SSH
    Let’s go back to AwardSpace. To get those credentials, you’ll need to Login to the Dashboard, and click on FTP Manager


    Now create a new FTP Account by filling these textboxes (leave FTP Path blank):

    Finally, scroll down and click on “Information

    We’ll need the FTP Username and one of the Hostnames (FTP Password is the one you inputted before) only

  3. Open FileZilla, and fill the textboxes that are on the top with this data:


    Host: your_website_url or your hosting provider FTP URL or your VPS IP Address
    Username: FTP Username from the last step or the FTP Username of your hosting provider or your VPS username
    Password: FTP Password from the last step or the FTP Password of your hosting provider or your VPS password of the username
    Port: 21 if you use a hosting provider or 22 if you have a VPS

  4. Now hit Quickconnect, and if appears check the “Always trust certificate in future sessions” and hit “OK”:

  5. You’ll see these new folders:
    image
    Access to your_website_url (if you are using a VPS go to /var/www/html) folder (it can sometimes be public_html or public) and delete ALL its files (except the .. folder)

  6. Now download this ZIP file
    Extract the ZIP, navigate to TinyWebDB-PHP-master and you’ll see the following files:


    You need to upload the following files: .htaccess, database.txt, getvalue.php and storeavalue.php. Select them and drag to the FTP Client to upload

    It should look like this:
    image


3. Configuration

  1. In FileZilla, make right click to database.txt and click on “File permissions…”:
    You need to make the new dialog like this:
    image
    What is important is the Numeric value, which should be 666
    Hit “OK” and configuration will be done for hosting providers
  • If you are using a VPS, you will need to allow HTAccess Override and Mod Rewrite Module manuall
    Login via SSH and:
    • Execute sudo nano /etc/apache2/apache.conf and browse to a block of code like this:
      image
      You need to change the AllowOverride None to AllowOverride All
      After this, hit Ctrl+X, Y and Enter
    • Execute sudo a2enmod rewrite
    • Execute sudo systemctl restart apache2

4. Makeroid Builder setup

  1. In all TinyWebDB Components, you need to change in Properties the Service URL to the URL of your service or the IP of your VPS. In my case, it is http://tinywebdb-php.epizy.com
    image

  2. Enjoy your own TinyWebDB Service! :tada:


I hope this tutorial will help some users to host their own TinyWebDB Service using our modified version in PHP :blush:
You can suggest any change to this tutorial :+1:


TinyWebDB Server written in PHP
#2

Installed and changed permissions on my own website.

Used a simple test file.

Working great. Can you tell me how safe this is im comparison with other databases?


(Diego Barreiro Pérez) #3

Do you mean safe? :sweat_smile:


#4

:joy::joy::joy::joy:… Yep


(Diego Barreiro Pérez) #5

Mmm, in fact anything :sweat_smile:
The access to the database.txt file is blocked by Apache, so it’s directly not served to users
It’s more a way to make it simple than secure


(Nik) #8

thats mean no one can hack values?


(Diego Barreiro Pérez) #9

What do you mean by hack?
Can you explain with an example case?


(Nik) #10

for ex:- i created app using tiny db and its game or other reward app.
case for ex: created app that give you some coin by watching video rewards ad or daily free coin , that coin u can use to increase your game levels, so i am user and i don`t want to watch ads or wait for next day to get free coin, then i can easily hack TinyDB
so its possible with TinyWebDB (I Know Its Not Possible:sweat_smile:)


(Diego Barreiro Pérez) #11

Nope
TinyWebDB is just a simple database. It’s not recommended for large apps as it’s not very secure
You will have to develop your own API and system to avoid hacks, as anyone can alter TinyWebDB data by knowing just the URL


#12

So if the url was to be encoded inside the apk and the database.txt was somewhere put online, also with a random name that no one knows and the information put there is no real secret than it would come in handy i guess?

Selectie_999(451)

I tested with the obfuscated block and that works.


(Diego Barreiro Pérez) #13

Then it would be secure I think :thinking:


(Rakshak Manchanda) #14

can u provide full blocks image for more understanding


#15

There are no more blocks necessary to test this. Just put the service url in your screen1.initialize block and it works.


(Rakshak Manchanda) #16

just for example i want to create a video app with a videos list from that url . what i have to madethe changes in that

Thanks!


#17

You have allready blocks in this topic and you can make the others yourself i guess. You are like you say the Techy one. :sunglasses:


(Rakshak Manchanda) #18

yah!! :heart_eyes: i will try it my self first and if by chance fail then i will again ask you.


(Rakshak Manchanda) #19

its giving error Communication with the Web Service encountered a protocol exception ??

Any solution


#20

Did you set the url right?


(Rakshak Manchanda) #21

yes its http://wp-status.techyrakshak.xyz

not working


(Rakshak Manchanda) #22

also what is filezilla i m using a VPS hosting with Cpanel