TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Raspberry Pi as a local server for self hosting applications

356 点作者 christian_fei超过 4 年前

30 条评论

anderspitman超过 4 年前
The hardware is there (RPi + USB storage). The server software is there (NextCloud, Plex, n8n, etc). What isn&#x27;t there is the plumbing. The next logical step after this blog post is making your services accessible to your phone over the public net. You&#x27;ll immediately find yourself mired in domain name registration, VPS management, TLS cert management, dyndns, port forwarding, hole punching, etc etc.<p>There are lots of great tools that solve some of these problems. I have yet to find one that solves all of them.<p>I think we need something like Namecheap + CloudFlare + ngrok, designed and marketed for self-hosters and federators. You simply register a domain and run a client tool on each of your machines that talks to a central server which tunnels HTTPS connections securely to the clients.<p>Mapping X subdomain to Y port on Z machine should take a couple clicks from a web interface.
评论 #24478622 未加载
评论 #24476628 未加载
评论 #24477808 未加载
评论 #24477474 未加载
评论 #24476258 未加载
评论 #24476770 未加载
评论 #24476114 未加载
评论 #24476205 未加载
评论 #24478364 未加载
评论 #24508633 未加载
评论 #24477710 未加载
评论 #24477394 未加载
评论 #24478062 未加载
评论 #24476189 未加载
评论 #24476012 未加载
评论 #24477826 未加载
评论 #24510577 未加载
评论 #24477288 未加载
评论 #24477330 未加载
评论 #24479053 未加载
评论 #24477950 未加载
评论 #24475987 未加载
评论 #24476372 未加载
评论 #24479182 未加载
评论 #24477114 未加载
评论 #24482980 未加载
评论 #24477436 未加载
评论 #24478673 未加载
评论 #24476122 未加载
antognini超过 4 年前
One thing to watch out for when doing something like this is that the Raspberry Pi will by default put your file system on the SD card it boots from. SD cards aren&#x27;t meant to support a lot of write&#x2F;erase cycles, so it&#x27;s easy to end up with a corrupt SD card after a few months to a year depending on what you&#x27;re doing on your Pi.<p>A workaround that can save you some headaches here is to only boot from the SD card (which means you&#x27;re effectively only ever reading from the card), and then mount a filesystem on an external SSD drive. There are a couple of good guides here [1] [2].<p>[1]: <a href="https:&#x2F;&#x2F;www.stewright.me&#x2F;2019&#x2F;10&#x2F;run-raspbian-from-a-usb-or-ssd-on-a-raspberry-pi-4&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.stewright.me&#x2F;2019&#x2F;10&#x2F;run-raspbian-from-a-usb-or-...</a><p>[2]: <a href="https:&#x2F;&#x2F;www.pragmaticlinux.com&#x2F;2020&#x2F;08&#x2F;move-the-raspberry-pi-root-file-system-to-a-usb-drive&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.pragmaticlinux.com&#x2F;2020&#x2F;08&#x2F;move-the-raspberry-pi...</a>
评论 #24475637 未加载
评论 #24475707 未加载
评论 #24475374 未加载
评论 #24474988 未加载
评论 #24475645 未加载
评论 #24495900 未加载
评论 #24476103 未加载
评论 #24474921 未加载
fossuser超过 4 年前
How do people access these servers off of their home network (or do they not?).<p>That seems like most of the value to me, hosting some service you can access from anywhere without having to use Digital Ocean.<p>It seems like most residential ISPs don&#x27;t provide a static IP and some block port 80? I think forcing ISPs to allow home users to serve traffic via some standard method would go a long way to enabling a more decentralized web.<p>I know Zero Tier, and Tailscale exist - but I don&#x27;t really understand how they work (and I think they require intermediate server access anyway so might as well use Digital Ocean?).<p>I&#x27;d like a future where you could sell users a raspberry pi running a service they can just plug into their home switch and access it securely from anywhere.
评论 #24476120 未加载
评论 #24475391 未加载
评论 #24475380 未加载
评论 #24475359 未加载
评论 #24475977 未加载
评论 #24475339 未加载
评论 #24475317 未加载
评论 #24475331 未加载
评论 #24475689 未加载
评论 #24475315 未加载
评论 #24476582 未加载
评论 #24475467 未加载
评论 #24475333 未加载
评论 #24482825 未加载
评论 #24484909 未加载
评论 #24476546 未加载
评论 #24484087 未加载
评论 #24476233 未加载
评论 #24475342 未加载
评论 #24477296 未加载
评论 #24475274 未加载
评论 #24476131 未加载
评论 #24475344 未加载
liability超过 4 年前
I recently thought about getting an RPi4 but ultimately spent about a hundred dollars more to get a cheap NUC. It was a bit more expensive but it seems like a more robust platform. A real AC adapter instead of USB (apparently the RPi4 kind of botched it in some revisions? What I read wasn&#x27;t confidence inspiring), takes normal SO-DIMM ram and a typical SSD, doesn&#x27;t have a reputation for overheating.. it seems generally more straight forward with fewer &#x27;gotchas.&#x27;
评论 #24475094 未加载
评论 #24474982 未加载
评论 #24475187 未加载
评论 #24475242 未加载
评论 #24476098 未加载
评论 #24475025 未加载
erulabs超过 4 年前
Nice! I recently wrote a blog article about home-hosting on a RPI4 using kubernetes (<a href="https:&#x2F;&#x2F;kubesail.com&#x2F;blog&#x2F;k3s-raspberry-pi" rel="nofollow">https:&#x2F;&#x2F;kubesail.com&#x2F;blog&#x2F;k3s-raspberry-pi</a>).<p>Such a bright future in home-hosting - really looking forward to seeing the movement grow! The <a href="https:&#x2F;&#x2F;www.linuxserver.io&#x2F;" rel="nofollow">https:&#x2F;&#x2F;www.linuxserver.io&#x2F;</a> community is pretty great re: home-hosting apps as well.
评论 #24476350 未加载
评论 #24474994 未加载
评论 #24475611 未加载
评论 #24474986 未加载
louwrentius超过 4 年前
If you run anything semi-serious please consult this blog post by Jeff Geerling about SD card performance (buy A1 ones).<p><a href="https:&#x2F;&#x2F;www.jeffgeerling.com&#x2F;blog&#x2F;2019&#x2F;raspberry-pi-microsd-card-performance-comparison-2019" rel="nofollow">https:&#x2F;&#x2F;www.jeffgeerling.com&#x2F;blog&#x2F;2019&#x2F;raspberry-pi-microsd-...</a>
评论 #24477202 未加载
codezero超过 4 年前
I haven&#x27;t been into computer hardware lately, but I decided to pick up a NAS, and was pleased to learn that they&#x27;re now just a complete computer - I&#x27;ve started using VMs living on my NAS to do this kind of thing, which is quite nice. Synology&#x27;s interface is not bad either, but I imagine others have come up with even better ways to use these systems.<p>Obviously a RPi is a way cheaper way to get a lot of the same work done though :)
rcarmo超过 4 年前
Friendly reminder that you can use Piku (<a href="https:&#x2F;&#x2F;github.com&#x2F;piku" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;piku</a>) for Heroku-like deployments.
评论 #24476238 未加载
评论 #24477209 未加载
评论 #24474924 未加载
nicbou超过 4 年前
I&#x27;m using my old Thinkpad T510 as a home server. It&#x27;s been running for 7+ years already. I only need to dust the vents once in a while.<p>It has PiHole, Nextcloud, my humble little Netflix clone, and a few other things. If you use ffmpeg a lot, you ought to have more power than the RPi offers. I often SSH into it to use it as a SOCKS proxy in other countries.
评论 #24477577 未加载
评论 #24475865 未加载
cstuder超过 4 年前
On my Raspberry Pi 3 I&#x27;m running Hypriot OS which installs a minimal host OS and then just runs Docker.<p>Thanks to cloud-init (Old version though) you can even pre-configure the boot image with your SSH key etc. which allows you to automate your initial install.<p><a href="https:&#x2F;&#x2F;blog.hypriot.com&#x2F;downloads&#x2F;" rel="nofollow">https:&#x2F;&#x2F;blog.hypriot.com&#x2F;downloads&#x2F;</a><p><a href="https:&#x2F;&#x2F;cloudinit.readthedocs.io&#x2F;en&#x2F;0.7.9&#x2F;topics&#x2F;capabilities.html" rel="nofollow">https:&#x2F;&#x2F;cloudinit.readthedocs.io&#x2F;en&#x2F;0.7.9&#x2F;topics&#x2F;capabilitie...</a>
评论 #24562320 未加载
评论 #24475353 未加载
评论 #24474943 未加载
_lacroix超过 4 年前
Setting up a pi-hole DNS server for my wifi network was one of the best decisions I&#x27;ve ever made. Horrifying to see what percentage of traffic is on the ad server blacklist though...
评论 #24475200 未加载
评论 #24476470 未加载
评论 #24477179 未加载
评论 #24475340 未加载
评论 #24475089 未加载
x87678r超过 4 年前
I like my rpi but my life got better when I bought a mini pc instead. Its pretty common to get a 16GB mem micro for not much more than an rpi with power supply, sd card, case.<p><a href="https:&#x2F;&#x2F;computers.woot.com&#x2F;offers&#x2F;lenovo-thinkcentre-m73-240g-tiny-pc-10?ref=w_cnt_lnd_cat_pc_2_24" rel="nofollow">https:&#x2F;&#x2F;computers.woot.com&#x2F;offers&#x2F;lenovo-thinkcentre-m73-240...</a>
评论 #24475410 未加载
评论 #24479358 未加载
flyinghamster超过 4 年前
It really wasn&#x27;t until I got myself a Pi 4 that I really appreciated what an improvement it was over the earlier generations. I have the Pi 4 and a 3B+ running BOINC, crunching away on World Community Grid[1], and the 4 is at least twice as fast at completing work units (it&#x27;s too early for RAC numbers to settle down, yet). The Cortex-A72 is a huge step up from the A53. [ETA: both are actively cooled.]<p>Also, the Pi 4 eliminates the USB2 bottleneck the old Pis have, and has a couple of USB3 ports.<p>[1] Be sure to boot with arm_64bit=1 in config.txt or you will get no work units.
评论 #24481609 未加载
yegle超过 4 年前
For anyone with a home server and has the need to remotely access your self-hosted websites, <a href="https:&#x2F;&#x2F;pomerium.io" rel="nofollow">https:&#x2F;&#x2F;pomerium.io</a> has been a wonderful piece of software in my stack.<p>You can safely expose your self-hosted websites to the internet and without the hassle of needing to have a VPN connection first.
评论 #24478551 未加载
oblib超过 4 年前
A DigitalOcean vps can be a pretty inexpensive and easy option.<p>I&#x27;ve done this with a Pi and Dyndns. It&#x27;s pretty easy to setup but not as good (for me) as a DO vps because my home ISP limits data heading out. I would have to purchase a business plan to fix that and it still wouldn&#x27;t be better or cheaper than what DO and others can provide.<p>A Pi can be used for development on your home network and it excels at that. And the older RPis can run [1]CouchDB and be configured to &quot;Live Sync&quot; with a CouchDB running on a commercial VPS. That too is a pretty easy to setup and it provides some pretty nice options. For example, you can make your app use the Cloud based CouchDB while you&#x27;re out and about and it will sync your data with your local CouchDB. Then when you get home you can turn off the cloud access and even delete your data on the cloud DB.<p>1. The latest version of CoudhDB (v3.0+) doesn&#x27;t run on the new ARM based Pi 4.
评论 #24478572 未加载
StillBored超过 4 年前
The pi4 even overclocked isn&#x27;t a great number cruncher, and I don&#x27;t think the gpu acceleration has landed yet..<p>So I might expect it to be on par with that old of a macbook but not beat it by nearly 2x, particularly if the macbook is being accelerated. (despite having 2x the core count) Which makes me think the MBP may be suffering from some serious thermal throttling, which wouldn&#x27;t be uncommon on machines of that vintage.<p>I also assume the call line is:<p><a href="https:&#x2F;&#x2F;github.com&#x2F;christian-fei&#x2F;raspberry-pi-time-lapse&#x2F;blob&#x2F;master&#x2F;create-time-lapse#L17" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;christian-fei&#x2F;raspberry-pi-time-lapse&#x2F;blo...</a><p>which is noticeably missing the -hwaccel switch, which means its probably not using the GPU on the mac..
评论 #24475847 未加载
评论 #24477010 未加载
newbie789超过 4 年前
This is related because I&#x27;m exclusively interested in building a local-network-only media server to serve my firestick and a laptop, but are plex (nice interface, for some reason requires a sign-in to their service, some sort of paid features) or emby (similar) the only options?<p>If I for example wanted to just access my media library through firestick and windows with a kinda neat interface without paying anybody or making an account on a third party website, is there a solution?<p>I suppose I could just use VLC, which is fantastic software that isn&#x27;t particularly beautiful and get used to it, but I&#x27;d like a somewhat more &quot;netflix-style&quot; interface for navigating my content within a single rpi server on my network.
评论 #24479568 未加载
评论 #24479545 未加载
gramakri超过 4 年前
I have tinkered with RPI a lot in my previous life, I used to maintain the Qt eglfs QPA plugin. Back then, they were quite under powered CPU wise. Are the recent versions powerful enough to host websites and data for every day use? Like say, is it powerful to host a website, couple of blogs, a nextcloud&#x2F;syncthing instance and say Emby&#x2F;Jellyfin&#x2F;Plex? Most importantly, I want to hear about setups that people are using for every day use and not just learning.<p>(For context, we get a lot of requests to port Cloudron to ARM&#x2F;RPI but I am still not sure if these are just hobbyists&#x2F;tinkerers or something people use everyday.)
评论 #24475878 未加载
sneak超过 4 年前
Note that if you got all excited about n8n when learning about it from this webpage, as a potential open source Zapier:<p>n8n is not open source, despite being source available. The author goes to pretty great lengths to avoid confronting this fact.<p><a href="https:&#x2F;&#x2F;github.com&#x2F;n8n-io&#x2F;n8n&#x2F;issues&#x2F;40" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;n8n-io&#x2F;n8n&#x2F;issues&#x2F;40</a>
评论 #24491811 未加载
评论 #24478602 未加载
valiant-comma超过 4 年前
For simple, web-based speedtests on a local LAN&#x2F;WLAN, I like librespeed[1]. Really helps identify subpar WiFi coverage (for example), better than just signal strength. Runs nicely on a Pi, up to line rate (1 Gbps) on a Pi 4.<p>[1] <a href="https:&#x2F;&#x2F;github.com&#x2F;librespeed&#x2F;speedtest" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;librespeed&#x2F;speedtest</a>
评论 #24479305 未加载
gcctrp超过 4 年前
There are FreedomBox versions for Raspberry Pi 2, 3B, 3B+, and 4B.<p><a href="https:&#x2F;&#x2F;wiki.debian.org&#x2F;FreedomBox&#x2F;Hardware#Also_Working_Hardware" rel="nofollow">https:&#x2F;&#x2F;wiki.debian.org&#x2F;FreedomBox&#x2F;Hardware#Also_Working_Har...</a>
dboreham超过 4 年前
Ime devices with a proper CPU and SSD such as Intel NUC and Beelink are the MV solution to run server software without constant headaches due to slowness, limited memory and flash wearout. Ymmv of course. The Pi4 with 8G is getting close.
KingFelix超过 4 年前
I have a RP4 on my desk collecting dust, need to get it up and running for something useful. This post has got me motivated to find a use for it.
评论 #24475414 未加载
评论 #24475355 未加载
评论 #24474973 未加载
noncoml超过 4 年前
My only gripe about Raspberry Pi, and only thing that prevents me from using it as a home server, is that the USB cannot power an external HD
评论 #24476591 未加载
评论 #24476050 未加载
评论 #24476393 未加载
ttflee超过 4 年前
For ffmpeg h.264 encoding on macOS it is not very wise to use x264 instead of h264_videotoolbox.
2Gkashmiri超过 4 年前
How does Cgnat fit into this? Or do we have to forego any hopes of it as long as cgnat exists?
gurjeet超过 4 年前
Does anyone have any experience with running and upgrading FreedomBox for self-hosting.
pettycashstash2超过 4 年前
i use the rasp pi 3+B 1 GB model to sense oil level in my oil tank. i now know oil tank level anywhere any time. Take a look at <a href="http:&#x2F;&#x2F;myoilguage.com&#x2F;" rel="nofollow">http:&#x2F;&#x2F;myoilguage.com&#x2F;</a>
评论 #24478589 未加载
tonitosou超过 4 年前
i use a pi as webserver. works like a charm
评论 #24475882 未加载
sneak超过 4 年前
This is probably way better achieved by a $5&#x2F;mo VPS.<p>Benefits:<p>- way faster<p>- always on (presumably battery backed)<p>- you&#x27;re not responsible for disk or hw failures<p>- better internet (faster, redundant connections)<p>- cheaper ($60&#x2F;year vs $100 upfront)<p>- not fighting architecture differences<p>- comes with a public v4 address<p>- usually comes with a v6 address too<p>Downsides:<p>- data isn&#x27;t under your control and is subject to military espionage<p>- your internet connection to move larger files to&#x2F;from the remote device may not be great
评论 #24479261 未加载
评论 #24478614 未加载