Ensure the hosting device has a static IP address to prevent potential connectivity issues due to IP changes. This setup will enable seamless access to Puter and its services across your local network.
The hosts file is a straightforward way to map domain names to IP addresses on individual devices. It's simple to set up but requires manual changes on each device that needs access to the domains.
- Open Notepad as an administrator.
- Open the file located at
C:\Windows\System32\drivers\etc\hosts
. - Add lines for your domain and subdomain with the server's IP address, in the
following format:
192.168.1.10 puter.local 192.168.1.10 api.puter.local
- Open a terminal.
- Edit the hosts file with a text editor, e.g.,
sudo nano /etc/hosts
. - Add lines for your domain and subdomain with the server's IP address, in the
following format:
192.168.1.10 puter.local 192.168.1.10 api.puter.local
- Save and exit the editor.
Some routers allow you to add custom DNS rules, letting you configure domain names network-wide without touching each device.
- Access your router’s admin interface (usually through a web browser).
- Look for DNS or DHCP settings.
- Add custom DNS mappings for
puter.local
andapi.puter.local
to the hosting device's IP address. - Save the changes and reboot the router if necessary.
This method's availability and steps may vary depending on your router's model and firmware.
Setting up a local DNS server on your network allows for flexible and scalable domain name resolution. This method works across all devices automatically once they're configured to use the DNS server.
- Pi-hole: Acts as both an ad-blocker and a DNS server. Ideal for easy setup and maintenance.
- BIND9: Offers comprehensive DNS server capabilities for complex setups.
- dnsmasq: Lightweight and suitable for smaller networks or those new to running a DNS server.
contributors note: feel free to add any software you're aware of which might help with this to the list. Also, feel free to add instructions here for specific software; our goal is for Puter to be easy to setup with tools you're already familiar with.
- Choose and install DNS server software on a device within your network.
- Configure the DNS server to resolve
puter.local
andapi.puter.local
to the IP address of your Puter hosting device. - Update your router's DHCP settings to distribute the DNS server's IP address to all devices on the network.
By setting up a local DNS server, you gain the most flexibility and control over your network's domain name resolution, ensuring that all devices can access Puter and its API without manual configuration.
Please note the self-hosting feature is still in alpha and a public production
deployment is not recommended at this time. However, if you wish to host
publicly you can do so following the same steps you normally would to configure
a domain name and ensuring the api
subdomain points to the server as well.