[{"data":1,"prerenderedAt":191},["Reactive",2],{"blog/homelab-exposing-coolify-services-on-local-network":3},{"_path":4,"_dir":5,"_draft":6,"_partial":6,"_locale":7,"title":8,"description":9,"draft":6,"external":6,"categories":10,"tags":13,"date":19,"body":20,"_type":185,"_id":186,"_source":187,"_file":188,"_stem":189,"_extension":190},"/blog/homelab-exposing-coolify-services-on-local-network","blog",false,"","Coolify - Exposing services to the local network","How to access coolify deployed services on local network. Without a domain",[11,12],"Tinkering","HomeLab",[14,15,16,17,18],"coolify","reverse","homelab","local","network","2024-07-08T00:00:00.000Z",{"type":21,"children":22,"toc":183},"root",[23,31,36,43,48,53,58,72,77,98,140,145,150,167,172,177],{"type":24,"tag":25,"props":26,"children":27},"element","p",{},[28],{"type":29,"value":30},"text","Coolify is the new cool guy in town and while it works awesome mostly, there are still some topics not covered by documentation.. at least at the moment when this article is getting written.",{"type":24,"tag":25,"props":32,"children":33},{},[34],{"type":29,"value":35},"So, today's topic",{"type":24,"tag":37,"props":38,"children":40},"h4",{"id":39},"accessing-services-from-local-network-without-needing-a-domain",[41],{"type":29,"value":42},"Accessing services from local network... without needing a domain.",{"type":24,"tag":25,"props":44,"children":45},{},[46],{"type":29,"value":47},"By default you are asked (even though is not required) to setup a domain for your coolify instance. But this is not required and for a homelab setup where you will access services only from the local network it's ok to leave that empty... or just use anything on that field.",{"type":24,"tag":25,"props":49,"children":50},{},[51],{"type":29,"value":52},"Assuming you get over the initial coolify setup and deployed your resource.. how can you get to it!?",{"type":24,"tag":25,"props":54,"children":55},{},[56],{"type":29,"value":57},"Let's take as a concrete example n8n which is availabe in coolify.",{"type":24,"tag":25,"props":59,"children":60},{},[61,63,70],{"type":29,"value":62},"N8N is served on port 5678 but that's available only inside the container where it is running. To be able to connect to it via ",{"type":24,"tag":64,"props":65,"children":67},"code",{"className":66},[],[68],{"type":29,"value":69},"http://{your_homelab_server_ip_address}:5678",{"type":29,"value":71}," we need to expose the port on host.",{"type":24,"tag":25,"props":73,"children":74},{},[75],{"type":29,"value":76},"For this we need to slightly change the docker-compose.yaml file.",{"type":24,"tag":25,"props":78,"children":79},{},[80,82,88,90,96],{"type":29,"value":81},"Just add the ",{"type":24,"tag":64,"props":83,"children":85},{"className":84},[],[86],{"type":29,"value":87},"ports",{"type":29,"value":89}," section to the docker-compose file, on the same level as ",{"type":24,"tag":64,"props":91,"children":93},{"className":92},[],[94],{"type":29,"value":95},"environment",{"type":29,"value":97},", as bellow, save and redeploy.",{"type":24,"tag":99,"props":100,"children":104},"pre",{"className":101,"code":102,"language":103,"meta":7,"style":7},"language-yaml shiki shiki-themes github-dark","ports:\n  - '5678:5678'\n","yaml",[105],{"type":24,"tag":64,"props":106,"children":107},{"__ignoreMap":7},[108,125],{"type":24,"tag":109,"props":110,"children":113},"span",{"class":111,"line":112},"line",1,[114,119],{"type":24,"tag":109,"props":115,"children":117},{"style":116},"--shiki-default:#85E89D",[118],{"type":29,"value":87},{"type":24,"tag":109,"props":120,"children":122},{"style":121},"--shiki-default:#E1E4E8",[123],{"type":29,"value":124},":\n",{"type":24,"tag":109,"props":126,"children":128},{"class":111,"line":127},2,[129,134],{"type":24,"tag":109,"props":130,"children":131},{"style":121},[132],{"type":29,"value":133},"  - ",{"type":24,"tag":109,"props":135,"children":137},{"style":136},"--shiki-default:#9ECBFF",[138],{"type":29,"value":139},"'5678:5678'\n",{"type":24,"tag":25,"props":141,"children":142},{},[143],{"type":29,"value":144},"and that should do it.",{"type":24,"tag":25,"props":146,"children":147},{},[148],{"type":29,"value":149},"Quick video for it:",{"type":24,"tag":151,"props":152,"children":156},"video",{"controls":153,"className":154,"autoPlay":153,"muted":153},true,[155],"w-full",[157,159,165],{"type":29,"value":158},"\n  ",{"type":24,"tag":160,"props":161,"children":164},"source",{"src":162,"type":163},"/videos/12-coolify-export-port.mp4","video/mp4",[],{"type":29,"value":166},"\n  Your browser does not support the video tag.\n",{"type":24,"tag":25,"props":168,"children":169},{},[170],{"type":29,"value":171},"Thanks",{"type":24,"tag":25,"props":173,"children":174},{},[175],{"type":29,"value":176},"🙏🏻",{"type":24,"tag":178,"props":179,"children":180},"style",{},[181],{"type":29,"value":182},"html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}",{"title":7,"searchDepth":127,"depth":127,"links":184},[],"markdown","content:blog:12.homelab-exposing-coolify-services-on-local-network.mdx","content","blog/12.homelab-exposing-coolify-services-on-local-network.mdx","blog/12.homelab-exposing-coolify-services-on-local-network","mdx",1724422646752]