Bookserver possible?

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
Post Reply
scottfrey
Posts: 6
Joined: Tue Mar 28, 2017 12:14 am

Bookserver possible?

Post by scottfrey »

I'm looking at trying to build a replicating bookserver via DietPi (for traveling in my RV)

it will need to do a couple of non-provided things and I am asking if this is feasible;

- It will need to connect to my home network (when parked in the driveway) but provide a hotspot to serve books when away. So, it will need to be setup as WiFi accesspoint, but rather than share an ethernet connection it may need to share another wifi port (wlan1). Basically it needs wifi internet access AND provide hotspot access to itself

- It will need to run a webserver with PHP and SQlite (for this: https://github.com/seblucas/cops )

- It will need to run Resilio Sync to sync from the main bookserver.

Is this possible with Diet-Pi? I can do all this with the full Jessie, but DietPi looks like it will be running much more efficeintly.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Bookserver possible?

Post by johnvick »

I have the COPS book server running under DietPi on XU4 and Orange Pi Zero. Not hard to setup - install webserver - lighttpd works fine - PHP and SQLite. The instructions on the COPS site are easy to follow.

Not sure what you mean by the questions about networking - do you have your DietPi device in your car? And do you want it to update the book collection when you are in your driveway?

I'm not familiar with Resilio Sync but SyncThing (installable through dietpi-software menu) works really well.

John
scottfrey
Posts: 6
Joined: Tue Mar 28, 2017 12:14 am

Re: Bookserver possible?

Post by scottfrey »

Not sure what you mean by the questions about networking - do you have your DietPi device in your car? And do you want it to update the book collection when you are in your driveway?
Pretty close, its in a camper.

Essentially, I need it to both join my home network, and to provide a hotspot to join an ipad to it when not able to connect to a network. In other words, it need two wifi configurations (and two wifi adapters) simultaneously.
I'm not familiar with Resilio Sync but SyncThing (installable through dietpi-software menu) works really well.
Resilio is the original BittorentSync, now renamed. Can Syncthing connnect to a Bittorent Sync? Or does it rely on Syncthing on both ends?

Question, how did you trigger teh webserver stack to install?
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Bookserver possible?

Post by johnvick »

You need SyncThing on both ends. Having used Bittorrent sync, SyncThing is streets ahead - easy to setup, use and fast. The webserver stack is easily installed through the dietpi-software menus. Would a way round the networking problem be to use a mobile phone as your hotspot on the road and set this up with the same SSID and password as you use at home - therefore the Pi device won't notice? ANd it will only need one WiFi config?

John
scottfrey
Posts: 6
Joined: Tue Mar 28, 2017 12:14 am

Re: Bookserver possible?

Post by scottfrey »

Would a way round the networking problem be to use a mobile phone as your hotspot on the road and set this up with the same SSID and password as you use at home - therefore the Pi device won't notice? ANd it will only need one WiFi config?
If I had a cellular connection I could just hit my home book server, so, no. This needs to work where there is no cell coverage, and have an interent connect to update the book catalog when there is access to my local wifi network (any wifi, really)
SyncThing is streets ahead - easy to setup, use and fast.
Syncthing does not appear to run well on Synology. wheich is where all my source data lives. So, no. Syncthing is not an option in this case.
The webserver stack is easily installed through the dietpi-software menus.
It seems like it would be, however (from this thread: http://dietpi.com/phpbb/viewtopic.php?f ... 1549#p1549) :
I only want to install a LAMP stack, what should I do?
Unless you specifically need a webserver stack, it is recommended that you allow DietPi to install webserver stacks automatically. This will ensure compatibility and stability on your system, for the webserver choice you have made.
Which implies that I will not be able to just install a LAMP stack.

How do I trigger an install of a LAMP stack?
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Bookserver possible?

Post by johnvick »

If I had a cellular connection I could just hit my home book server, so, no. This needs to work where there is no cell coverage, and have an interent connect to update the book catalog when there is access to my local wifi network (any wifi, really)
You can use a phone as a WiFi hotspot without a cellular connection.
How do I trigger an install of a LAMP stack?
Just select it from the dietpi-software menu.

John
scottfrey
Posts: 6
Joined: Tue Mar 28, 2017 12:14 am

Re: Bookserver possible?

Post by scottfrey »

You can use a phone as a WiFi hotspot without a cellular connection.
I'm pretty sure you can't use the iphone to connect to the bookserver that way, nor use an ipad to connect to the bookserver through the phone. I belive the hotspot acts as a guest network. Not does an iPhone hotspot allow you to choose passwords and the password changes, so no, that's not a solution. Also, I don't think you can start a hotspot without a cellular connection. I'll have to test that though

In any case I have also discovered that an iPhone can't authenticate to the DietPi's hotspot, so that's kind of a non-starter.

But, this still doesn't asnwer the question of how to have two wifi devices.
User avatar
johnvick
Legend
Posts: 693
Joined: Wed Jun 08, 2016 11:53 am
Location: New Zealand

Re: Bookserver possible?

Post by johnvick »

I use an Android phone and it can act as a WiFi hotspot - you can choose your SSID name and password. You can setup the hotspot without a cellular connection. I use my home router SSID and password on the phone so when on the road my portable devices connect up as if I was at home. So you in effect have two seperate WiFi networks but with the same credentials.

I don't have an iphone but I believe you can change SSID and of course you must be able to change the password. If you can't use the hotspot without cellular data on then a $50 Android phone will let you do this.

Therefore if you can setup up a phone like this it will achieve what you are trying to do. On the road, access the bookserver on the Pi device. Drive up to the house, switch off the phone hotspot, the Pi connects to home network, your sync software connects up (BT sync works with Diet Pi BTW) and grabs any new books.

John
scottfrey
Posts: 6
Joined: Tue Mar 28, 2017 12:14 am

Re: Bookserver possible?

Post by scottfrey »

So your solution is to use a $50 android instead of a $10 pi zero w and a $10 wifi adapter?

My solution is to use two wifi adapters (to use hardware I already own).

Can DietPi do this or not? Anyone know?
User avatar
k-plan
Posts: 416
Joined: Sun Feb 28, 2016 5:28 pm

Re: Bookserver possible?

Post by k-plan »

scottfrey wrote: Can DietPi do this or not? Anyone know?
Short response:
Yes, YOU can do it with DietPi, but DietPi will not do it for you by default.


Elaborate answer:

DietPi is a Debian based Linux distribution.

Goal is a lightweight, simplified learner friendly distribution, automating the linux installation and configuration process for you.
For supported hard and software combination it is really easy to use for everyone.
Nice and silky menu for most everything, no need to editing config file strew about hole file system by hand.

If you want to run special feature, hard and software, it's as difficult or hard as on every other Debian based Linux distribution.
Every has it's own peculiarity.

Yes, I think it's possible, depending on your designated external USB Wifi chipset.
But you have to do many thinks straighten by hand, so you will loose the advantage from DietPi.

RPi Zero W with onboard and external USB Wifi, using wireless connection and multiple Hotspot feature at the same time, running COPS and Resilio Sync and connected with different Apple device, is very custom-built. Not many user need such a configuration.

For your use case, it can be more handy, using e.g. Rasbian lite as a base, google around for tutorial, mixed them up to build your special custom-built device. Nothing is impossible. This can be a good choice.

Raspberry advantage is a huge community, many tutorial on the web, great support, but most of them based on Rasbian.
And after this, you will understand how your system work. No hassle around with things, DietPi do especially for automating the linux installation and configuration process for you.

Just my two cent.
Good luck.
If you find our project or support useful, then we’d really appreciate it if you’d consider contributing to the project however you can.
Donating is the easiest – you can use PayPal and Bitcoin.
Post Reply