{"id":18048787,"url":"https://github.com/marcelgarus/server","last_synced_at":"2025-08-24T08:11:31.004Z","repository":{"id":96407100,"uuid":"382710313","full_name":"MarcelGarus/server","owner":"MarcelGarus","description":"My server running marcelgarus.dev","archived":false,"fork":false,"pushed_at":"2024-10-22T20:24:16.000Z","size":149509,"stargazers_count":3,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T08:47:53.177Z","etag":null,"topics":["actix-web","blog","rust","server"],"latest_commit_sha":null,"homepage":"https://marcelgarus.dev","language":"CSS","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarcelGarus.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-07-03T21:12:53.000Z","updated_at":"2025-01-28T22:03:56.000Z","dependencies_parsed_at":"2023-03-07T08:15:39.761Z","dependency_job_id":"4a9b42ad-d768-499c-980f-d1fa3c7df292","html_url":"https://github.com/MarcelGarus/server","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelGarus%2Fserver","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelGarus%2Fserver/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelGarus%2Fserver/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarcelGarus%2Fserver/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarcelGarus","download_url":"https://codeload.github.com/MarcelGarus/server/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248198240,"owners_count":21063626,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["actix-web","blog","rust","server"],"created_at":"2024-10-30T20:15:23.675Z","updated_at":"2025-04-10T09:53:16.920Z","avatar_url":"https://github.com/MarcelGarus.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"This repository contains the code of my server, which is available at [marcelgarus.dev](https://marcelgarus.dev).\n\n# Setting up the server\n\nThis chapter describes my server setup, primarily for my future self.\nThe server runs Ubuntu 18.04 LTS 64bit; it's a small machine hosted by [Strato](https://strato.de).\n\n## Long-running commands\n\nUsing the GNU `screen` utility, you can connect to the server multiple times while retaining the same terminal state.\n\n`screen -S \u003cname\u003e` starts a new named screen session.\nDetach from a screen using ctrl+a ctrl+d.\n\n`screen -list` lists all screens in the form `\u003cpid\u003e.\u003cname\u003e`\n\nScreens can be re-connected to using `screen -d -r \u003cid\u003e`.\n\n## Firewall?\n\nNo Firewall is needed; only a few programs are listening on ports, so it's easy to get an overview.\nTo see which programs listen on ports, do:\n\n```bash\nnetstat -tulpn\n```\n\n## Setup the repo\n\n1.  Install Git\n    ```bash\n    apt install curl git nano build-essential pkg-config libssl-dev\n    ```\n2.  [Install Caddy](https://caddyserver.com/docs/install)\n3.  Clone this repo\n    ```bash\n    git clone https://github.com/MarcelGarus/server.git\n    cd server\n    ```\n4.  Make the production Caddyfile the system Caddyfile:\n    ```bash\n    cp production.Caddyfile /etc/caddy/Caddyfile\n    ```\n5.  Enable Caddy:\n    ```bash\n    systemctl enable caddy\n    ```\n\nDone! The server will run, even when the system restarts.\n\nLater on, you can apply updates like this:\n\n```bash\ngit pull \u0026\u0026 cargo run\n```\n\n## Setup DynDNS to route marcelgarus.dev traffic here (DynDNS via Namecheap)\n\n```bash\napt install ddclient\n```\n\nThis will automatically start a wizard, where you can enter random values.\nConfiguring is instead done using the configuration file:\n\n```bash\nnano /etc/ddclient.conf\n```\n\nThe content should be this:\n\n```bash\n## Update every 300 seconds.\ndaemon=300\n## Log stuff to these files.\ncache=/tmp/ddclient.cache\npid=/var/run/ddclient.pid\n## Get the public IP address via dyndns.org\nuse=web, web=checkip.dyndns.org\n# Update using Namecheap.\nprotocol=namecheap\nserver=dynamicdns.park-your-domain.com\n\nlogin=marcelgarus.dev\npassword='the-namecheap-dyn-dns-password'\nssl=yes\n@.marcelgarus.dev, *.marcelgarus.dev\n\nlogin=marcelgarus.de\npassword='the-namecheap-dyn-dns-password'\nssl=yes\n@.marcelgarus.de, *.marcelgarus.de\n\nlogin=mgar.us\npassword='the-namecheap-dyn-dns-password'\nssl=yes\n@.mgar.us, *.mgar.us\n\nlogin=marcel.jetzt\npassword='the-namecheap-dyn-dns-password'\nssl=yes\n@.marcel.jetzt, *.marcel.jetzt\n```\n\nTo test if it works:\n\n```bash\nddclient -daemon=0 -noquiet -debug\n```\n\nThe cache file is at `/tmp/ddclient.cache`, and you might need to delete it if you want to re-set the DynDNS A+ record, although the IP didn't change.\n\nMake `ddclient` start when the system is booted:\n\n```bash\nupdate-rc.d ddclient defaults\nupdate-rc.d ddclient enable\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelgarus%2Fserver","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarcelgarus%2Fserver","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarcelgarus%2Fserver/lists"}