tradicije

joined 2 weeks ago
[–] tradicije@lemmy.zip 6 points 2 hours ago* (last edited 2 hours ago) (1 children)

Cloudflare Tunnel. cloudflared is running directly on the phone, so I didn’t need to open any ports on my router.

Also, if you meant how I connected the phone to the internet, not the website — just Wi-Fi. :)

[–] tradicije@lemmy.zip 3 points 2 hours ago

Yeah, it’s a fun experience, I’ll update you again soon!

 

This post is a follow-up to my original post: https://lemmy.zip/post/71885626

Surprisingly, it wasn’t that tough to set up.

My original plan was to install postmarketOS and turn the phone into a proper tiny Linux server. Unfortunately, my Moto E5 Play is the pettyl variant, while the available postmarketOS port is for james. I decided that turning the phone into a brick probably wasn’t an essential part of the project.

So I went with Termux instead.

It’s now running nginx, PHP, MariaDB, WordPress, SSH and cloudflared directly on the phone. Everything starts automatically on boot, and I even made a tiny WordPress plugin for anonymous Today / Total / Online visitor stats.

And yes, the website is being served by the exact phone in the photo.

1 GB of RAM. Somehow this thing is now a production server.

I named it Pettyl, after the device codename.

You can actually visit it at https://moto.dimitrium.org/.

The website is barebones, I plan to push it to the limits. Also, this project will soon be available on my GitHub page https://github.com/tradicije

Next problem: figuring out how long an old Motorola can tolerate my bullshit.

[–] tradicije@lemmy.zip 11 points 4 days ago

Thank you everyone for commenting on this, I didn’t expect this much feedback!

I will go ahead and start this project with an old phone, not sure yet which phone, and I’ll document everything and give you an update soon!

[–] tradicije@lemmy.zip 2 points 4 days ago (2 children)

Yeah, I think creating a custom script for it won’t be an issue, for example when battery hits 80% it stops charging, and resumes charging when it hits 40%

[–] tradicije@lemmy.zip 4 points 4 days ago

Thanks! I’ll check it out

[–] tradicije@lemmy.zip 1 points 4 days ago (6 children)

I get that, using phones as servers is a pain because of cooling, but I was thinking maybe wire a fan to a custom made 3d printed rack, and also create a script for batteries, so the phones are not charging not stop.

Creating a cluster could help me self host more websites I create as I want to move away from using hosting services, I do have 2 mini pcs as servers right now, but they are kinda shit.

165
submitted 4 days ago* (last edited 2 hours ago) by tradicije@lemmy.zip to c/selfhosted@lemmy.world
 

Update is here: https://lemmy.zip/post/72142441

Hey guys, since I got into hosting my own servers, any electronic device I see I wonder - can it become a server?

This is probably not a crazy and new idea with android phones, but I had to share it with you. If you don’t know, there’s this thing called postmarket OS, full linux experience on an android phone.

Of course, not all phones are supported, but a phone like Galaxy Note 9 is a great candidate - it supports LAN over usb, postmarket OS fully supports it (the Exinos version) and setting up a phone as a selfhosted server has it’s real perks. Pis got really expensive, not to mention they don’t have a built-in UPS (phones have batteries), they use slow SD cards, while phones have faster UFS memory, phones draw way less power.

What do you guys think? I will for sure get a used Galaxy Note 9 and explore this idea, and if all goes well, I might even buy more of them and create a cluster.