entschleunigung Posted 4 hours ago Share Posted 4 hours ago Hello everyone, Some of you may already be working with DDEV, and probably some of you are familiar with Tailscale as well. Just briefly: Tailscale is, and I’ll try to be as sober as possible, a gift from the heavens. It’s a type of mesh VPN and ridiculously easy to install and manage. It's free for up to 100 clients, too. Please just check out a few videos on YouTube about it, it’s a lot of fun to work with. In broad strokes, it works like this: You sign up – for example – with Google Auth at tailscale.com. Then you install – for example – the client for your Mac (it’s available for nearly all operating systems). You also install the client on your home server. (In my case, Tailscale is also running on my Synology, and there are some great guides for that.) A rough outline of the workflow: (For installation details and the necessary steps, Perplexity was a huge help. LLMs are truly a blessing for this kind of thing; there are nice step-by-step guides.) I still had a Dell Optiplex 7050 lying around (these things cost about 100 euros, they’re very quiet and energy-efficient). I also had some extra RAM, and I installed a 1 TB NVMe. I installed Debian 12 netinstall and then added all the necessary packages. Those include: Docker, DDEV, Tailscale (https://tailscale.com/kb/1031/install-linux) After a successful installation, you'll be prompted in the console: To authenticate, visit: https://login.tailscale.com/a/XXXXXXXXXXXXXXX Open the URL in your browser and log in using the same auth method – for me, that’s Google in all cases. And just like that, your server has joined your Tailscale network and gets an IP in the format 100.x.y.z and tailxxxx.ts.net. Docker and DDEV should already be running smoothly before proceeding. To make Docker listen to the Tailscale IP, you'll need to add the following to /etc/docker/daemon.json: {  "hosts": ["fd://", "tcp://100.x.y.z:2375"] } This may vary in your case, but the idea should be clear. On my laptop, I use VSCode, and I’ve also installed the "VSCode Remote SSH Extension" to handle everything remotely. My specific workflow now is that I log into the server with the IDE, and for example, under /home/$USER/sites/$project, I start a new DDEV project. You know the drill: ddev config, ddev start, and so on... Now, to access the newly created projects from my client (here, a MacBook) without constantly editing the hosts file, I installed dnsmask via brew. In the default installation, you can edit the dnsmask.conf via nano: nano /opt/homebrew/etc/dnsmasq.conf And there, please add: address=/.ddev.site/100.x.y.z Then run: sudo brew services restart dnsmasq Et voilà , that’s it. Your example.ddev.site is now directly accessible. This might be a bit rough around the edges, but you’re professionals, and the idea should be clear. It has greatly improved my workflow, and I no longer have to worry about securing my server, since it’s only accessible from my Mac, no matter where I am, while my project data is safe on my home server. I hope you'll have as much fun with it as I have! 😀 Link to comment Share on other sites More sharing options...
Recommended Posts