{"id":115,"date":"2025-09-27T10:33:41","date_gmt":"2025-09-27T16:33:41","guid":{"rendered":"https:\/\/wtech.ninja\/?p=115"},"modified":"2025-09-27T10:40:16","modified_gmt":"2025-09-27T16:40:16","slug":"my-newer-wordpress-setup","status":"publish","type":"post","link":"https:\/\/wtech.ninja\/?p=115","title":{"rendered":"My newer wordpress setup"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">So, my current-as-of-writing wordpress setup is a wordpress container on proxmox, through cloudflare tunneling since I don&#8217;t have a static IP to my server.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">If you&#8217;re interested in replicating it, follow these steps:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Install ProxmoxVE onto a server<\/li>\n\n\n\n<li>set it up<\/li>\n\n\n\n<li>Install a wordpress container<\/li>\n\n\n\n<li>Install a cloudflared container<\/li>\n\n\n\n<li>configure your cloudflare tunnel<\/li>\n\n\n\n<li>change a wordpress setting<\/li>\n\n\n\n<li>profit<\/li>\n<\/ul>\n\n\n\n<p class=\"wp-block-paragraph\">For the sake of brevity I won&#8217;t walk you through installing and setting up proxmox. There are plenty of guides for that elsewhere.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">I will give a basic overview of everything else, though.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">WordPress<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To install a wordpress container, go to <a href=\"https:\/\/community-scripts.github.io\/ProxmoxVE\/\">communi<\/a>ty-scripts.github.io and search for wordpress, and install it by running the given command in the proxmox host&#8217;s shell, through the web ui.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once the container is running, I configured and accessed the wordpress site via ssh port forwarding, like so. <\/p>\n\n\n\n<p class=\"has-accent-3-background-color has-background wp-block-paragraph\">ssh <code>popolar -L 8080:192.168.1.209:80 -L 4430:192.168.1.209:443<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">In this command, popolar is the hostname of my host proxmox server that the wordpress container is running on, and 192.168.1.209 is the ip address of the wordpress container.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><strong>If you run the same command, you&#8217;ll have to change &#8220;popolar&#8221; to your proxmox server&#8217;s hostname or IP address, and you&#8217;ll have to change &#8220;192.168.1.209&#8221; to your wordpress container&#8217;s IP Address.<\/strong><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"> What I&#8217;m doing with this command is ssh&#8217;ing into the host, and telling it to direct all traffic that goes to my laptop&#8221;s <code>localhost:8080<\/code> to the proxmox host&#8217;s <code>192.168.1.209:80<\/code>, so that I can access the wordpress site by navigating to <code>localhost:8080<\/code> on my laptop.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve set up wordpress, you can proceed to install cloudflared.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Cloudflared<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">To install a cloudflared container, go to <a href=\"https:\/\/community-scripts.github.io\/ProxmoxVE\/\">community-scripts.github.io\/<\/a>ProxmoxVE\/ and search for cloudflared. Now, find the option without DDNS and install it.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have the container, you&#8217;ll have to go to dash.cloudflare.com &gt; Zero Trust &gt; Networks &gt; Tunnels, and click &#8220;Create a new tunnel&#8221; and then select cloudflared.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">After that, give it some name, and then proceed to &#8220;Install and run connectors&#8221;. Now, we&#8217;ve already got cloudflared installed in our container, so skip the first box of instructions and find the code line that says &#8220;<code>sudo cloudflared service install ...<\/code>&#8221; and copy it. It won&#8217;t match that line exactly, because the line will have a token after the &#8220;install&#8221;<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Now, enter the Console of your cloudflared container, and paste it in there and run it. You might have to manually type it in if your copy and paste aren&#8217;t working for some reason (mine weren&#8217;t). It&#8217;s long and will be a pain if that&#8217;s the case.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve run that, check cloudflare and see if the tunnel status is HEALTHY. If it is, proceed to edit the tunnel, and then you can edit &#8220;Published Application Routes&#8221; on cloudflare.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">As an example of what a route should look like, my config for this site looks like this: <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"401\" src=\"https:\/\/wtech.ninja\/wp-content\/uploads\/2025\/09\/Sat-Sep-27-101220-AM-MDT-2025-1024x401.png\" alt=\"\" class=\"wp-image-116\" srcset=\"https:\/\/wtech.ninja\/wp-content\/uploads\/2025\/09\/Sat-Sep-27-101220-AM-MDT-2025-1024x401.png 1024w, https:\/\/wtech.ninja\/wp-content\/uploads\/2025\/09\/Sat-Sep-27-101220-AM-MDT-2025-300x117.png 300w, https:\/\/wtech.ninja\/wp-content\/uploads\/2025\/09\/Sat-Sep-27-101220-AM-MDT-2025-768x301.png 768w, https:\/\/wtech.ninja\/wp-content\/uploads\/2025\/09\/Sat-Sep-27-101220-AM-MDT-2025-1536x601.png 1536w, https:\/\/wtech.ninja\/wp-content\/uploads\/2025\/09\/Sat-Sep-27-101220-AM-MDT-2025.png 1592w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p class=\"wp-block-paragraph\">My domain is wtech.ninja, the service type is HTTP and url is 192.168.1.209, because that is the ip address of the wordpress container. (The cloudflared container has it&#8217;s own IP address which is different)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Change a wordpress setting<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">Once you have that done, you&#8217;ll want to connect to your wordpress site via ssh port forwarding one last time, and navigate to the General Settings, and change the &#8220;WordPress Address (URL)&#8221; and &#8220;Site Address (URL)&#8221; to your proper hostname that you set up on cloudflare, instead of <code>localhost:80<\/code> or whatever it is.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Once you&#8217;ve changed that, try accessing the wordpress site via it&#8217;s hostname instead of using ssh forwarding, and if you&#8217;ve done everything correctly and the stars align, it might work!<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Random other thing<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">I was getting some random connection errors and had to go into the Console of my wordpress container, find the file <code>\/var\/www\/html\/wordpress\/wp-config.php<\/code> and add this line to it, just above the database settings:<\/p>\n\n\n\n<p class=\"has-accent-3-background-color has-background wp-block-paragraph\"><code>$_SERVER['HTTPS'] = 'on';<\/code><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Apparently since cloudflare talks to the server via http, but the clients talk to cloudflare via https, I had to set that in that file. It seems to have worked for me, anyway.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Hopefully this info can help someone else, and thanks for reading.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>So, my current-as-of-writing wordpress setup is a wordpress container on proxmox, through cloudflare tunneling since I don&#8217;t have a static IP to my server. If you&#8217;re interested in replicating it, follow these steps: For the sake of brevity I won&#8217;t walk you through installing and setting up proxmox. There are plenty of guides for that [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-115","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/wtech.ninja\/index.php?rest_route=\/wp\/v2\/posts\/115","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wtech.ninja\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wtech.ninja\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wtech.ninja\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wtech.ninja\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=115"}],"version-history":[{"count":4,"href":"https:\/\/wtech.ninja\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions"}],"predecessor-version":[{"id":120,"href":"https:\/\/wtech.ninja\/index.php?rest_route=\/wp\/v2\/posts\/115\/revisions\/120"}],"wp:attachment":[{"href":"https:\/\/wtech.ninja\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=115"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wtech.ninja\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=115"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wtech.ninja\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=115"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}