HowTo: Install Kegbot Server directly on your Android tablet (no root)


#1

This is an alternative to running the Android program “Using local storage”. You can run a full Kegbot Server directly on the same tablet, with no extra hardware and you don’t have to pay for monthly hosting like Digital Ocean or Heroku. The only downside is that you may not be able to access the server from outside the tablet (i.e. LAN or Internet). I haven’t looked into how the network topology works, but it may be possible.

  1. Nab a copy of GNURoot Debian https://play.google.com/store/apps/details?id=com.gnuroot.debian&hl=en The other GNURoot distributions (like wheezy) are not all-in-one packages, and require some filesystem setup. This one is a 2-click install.

  2. Follow the steps in https://kegbot.org/docs/server/install Slight additional notes:
    a) You are already “fake root” so root commands do not need sudo.
    b) Run “apt-get update” before anything
    c) Do not run “apt-get upgrade” It doesn’t work and puts your dpkg in a messed up state. You will have to remove everything from /var/lib/dpkg/updates if this happens.
    d) /data/kb can’t be created, even under “fake root”. I just put everything under /kb.
    e) Instead of running setup-kegbot.py, go to “cd /kb/bin” and then “setup-kegbot.py --allow_root true” instead

  3. The server should run at 127.0.0.1:8000 and you can access it from the Android chrome and kegbot-android at this address.


Just discovered Kegbot
#2

Hmm, interesting. I think I’ll be trying this in the next few weeks. I’ll report back with any issues or questions.


#3

Hi,

I tried this on my Nexus 7 but it didn’t work for me. I encountered problems in the last phase of the installation (“e” in the list above). I get a “Permission denied for [email protected]… using password:YES…”

/Bjorn


#4

I hope someone else can help you with this problem, Bjorn. I do not have a Nexus 7 to test on, nor am I familiar with the setup-kegbot.py python script to be able to tell what it’s failing permissions on. Maybe you can run a python debugger? Or try some of the commands inside the script manually?

My initial guess is that GNURoot Debian has some permission issues on later versions of Android. It works fine on my Acer Iconia A210 (Jellybean) but doesn’t on my Nexus 5 (Android M).


#5

Got this working on my A210 but not seeing the temperature sensor in the app. The kegbot server is reading the values I just can’t see it on the tap page to set it up in the app or from my browser. Any Clues?


#6

The kegbot-android is unable to display temperature if it’s using the Local DB. I just made a change this morning to the app to be able to do this, but will need to learn how to publish a Git fork.

When the kegbot-android is hooked up to the kegbot-server, it sends the temperature data (asynch temp+sensor values) and the only place to configure your system to use the temperature sensor is the Admin/Taps/Edit/Temperature Sensor dropdown.

Are you saying that temperature updates are reaching the kegbot-server (running on Android) but the Admin webpage dropdown still shows “No Sensor”?


#7

Yup server sees it and is spewing data. There is actually no Temperature sensor option even listed on the edit page.

This is a working system up for a while. Running on a windows laptop with virtual box. Was just hoping to ditch the laptop if I can run it all on the tablet.


#8

Restarted the server and redid the tap/controller and the temp sensor came up :slight_smile: I can also access the web server from my laptop :slight_smile:

Only thing not working is the take a picture it’s just black and never starts the countdown. No biggie.

Thanks for figuring out how to run the server on the tablet. It frees up the laptop and will save a few pennies not having it run 24/7


#9

I got it working on my 2012 Nexus 7 (grouper). I lent my kegerator to a friend so I haven’t tested it fully but the app and server are communicating fine. FYI I went with GNURoot Debian and also apt-get installed build-essential .
That “Permission Denied” error looks like a mysql error. When I ran setup-kegbot.py --allow_root true it asked me for the mysql user and pass, to which I just used the root user and password which was specified when installing mysql-server.


#10

I have Acer A3 A20 and I can’t get pass the MSQL part of this, when I run set up wizard I get errors… Help please


#11

When you run

$ mysql -u root -e ‘GRANT ALL PRIVILEGES ON kegbot.* TO [email protected] IDENTIFIED BY “pw”; flush privileges;’

Then your username will be “kegbot”, and your password will be “pw”. Don’t use the "@localhost" part during the setup script.

Does that help?


#12

Now when I go to edit my local settings I get permission denied


#13

You mean when you’re editing local_settings.py using vi? Maybe you need to do a chmod 777 -R?


#14

First I just want to say thank you for posting this.
I set the server up on the nexus 7 and it seems to be working but the sessions gives me an error which I am pretty sure that it is caused by the time zone. Server is about 4 hours fast.
This is my first shot at using a terminal emulator or anything close to it.
I saw a fix on the site somewhere, But I don’t have a command prompt as the server is just jamming along.

How do I get the command prompt back? Can I use a new window? Do I stop the server? If I stop the server will I have to start over from the beginning?
If I can just restart how would I re-start the server?


#15

If you type and there’s no command prompt, then the server is in the foreground. I think when the server is running in the foreground, you can do “CTRL-Z” then use the “bg” command to let it run in the background (instead of freezing it). CTRL-Z is accessed by pressing and releasing the Volume Down button, which changes the cursor to a “V” (indicating the next key you type is ctrl), then pressing Z.

If you stop the server, it won’t reset all the hard work you’ve done. Just make sure you’re in the virtualenv, and activated, and I don’t remember the actual line that starts the server, but your data and installation should be intact.

I don’t know how to stop the server. Maybe CTRL-C?

Also when you start the server again, if you want it to be in the background, append an ampersand “&” to the end. Like if the start commands was “kegbot runserver” you can use “kegbot runserver&” and you will have a command prompt while the server runs in the background.


#16

Awesome thanks. Sessions are now working. Now for the stats tab. Do I need to be in production mode for that to work. I did not proceed after getting the server running. I did send the “kegbot run_workers” but that did not seem to help. Everything is working just no stats.
Thanks again.


#17

So I was trying to finish the build but I got stuck when trying to configure nginx. I do not have any of the folders. nginx, sites-available or sites-enabled. I did install nginx and it looked like it took. Then I created the config. file and the folders in /etc. When I run the “cp kegbot-nginx.conf /etc/ngnix/sites-available” I get a file or directory not found error.
I even put the files in different places and changed the path in the above command with the same error. I’m so close. What am I doing wrong or is there somewhere else to put the files.


#18

Sorry I don’t know how to answer either of these. Hopefully someone else will, but the board has been deserted for a while now.


Just discovered Kegbot
#19

Any idea if it’s possible to move the settings / config from my existing kegberry server installation to a tablet installation?


#20

This pry a stupid question but how do i modify local settings.py to configure email? Im stuck…