diff options
author | Christian Cleberg <hello@cleberg.net> | 2023-12-02 23:27:35 -0600 |
---|---|---|
committer | Christian Cleberg <hello@cleberg.net> | 2023-12-02 23:27:35 -0600 |
commit | 3d4da5ac6000a4871c5caa80d1e61f2782da3069 (patch) | |
tree | 29f36b50823d22f4c7df0a3db3ede83192ae649f /blog/2023-06-30-self-hosting-voyager-lemmy-client.org | |
parent | dcf0186e16b6ac8f0e00a3aeb9734421ce548177 (diff) | |
download | cleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.tar.gz cleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.tar.bz2 cleberg.net-3d4da5ac6000a4871c5caa80d1e61f2782da3069.zip |
feat: finish converting md to org
Diffstat (limited to 'blog/2023-06-30-self-hosting-voyager-lemmy-client.org')
-rw-r--r-- | blog/2023-06-30-self-hosting-voyager-lemmy-client.org | 171 |
1 files changed, 88 insertions, 83 deletions
diff --git a/blog/2023-06-30-self-hosting-voyager-lemmy-client.org b/blog/2023-06-30-self-hosting-voyager-lemmy-client.org index 5eaacce..2530e07 100644 --- a/blog/2023-06-30-self-hosting-voyager-lemmy-client.org +++ b/blog/2023-06-30-self-hosting-voyager-lemmy-client.org @@ -1,54 +1,57 @@ -+++ -date = 2023-06-30 -title = "Self Hosting Voyager - A Lemmy Web Client" -description = "A guide on how to self-host your own instance of Voyager, a mobile-first Lemmy web client." -+++ - -## Installation Guide - -[Voyager](https://github.com/aeharding/voyager) is a mobile-first Lemmy web -client, based on iOS design standards. It follows very closely to Apollo's -design. - -This post is a guide showing how I was able to build and launch my own instance -of Voyager via Docker Compose. - -### Clone the Repository - +#+title: Self-Hosting Voyager: A Lemmy Web Client +#+date: 2023-06-30 + +** Installation Guide +:PROPERTIES: +:CUSTOM_ID: installation-guide +:END: +[[https://github.com/aeharding/voyager][Voyager]] is a mobile-first +Lemmy web client, based on iOS design standards. It follows very closely +to Apollo's design. + +This post is a guide showing how I was able to build and launch my own +instance of Voyager via Docker Compose. + +*** Clone the Repository +:PROPERTIES: +:CUSTOM_ID: clone-the-repository +:END: Start by cloning the repository and entering it: -```sh +#+begin_src sh git clone https://github.com/aeharding/voyager cd voyager -``` - -### Build the Image +#+end_src -With this repository, you can build the image yourself without any further -configuration. -When complete, it'll give you the image ID for you to run. +*** Build the Image +:PROPERTIES: +:CUSTOM_ID: build-the-image +:END: +With this repository, you can build the image yourself without any +further configuration. When complete, it'll give you the image ID for +you to run. -```sh +#+begin_src sh sudo docker build . # Successfully built 5f00723cb5be -``` +#+end_src -With the image ID above, you can run the container and pass the requested port -`5314` through or use a custom port, if you wish. +With the image ID above, you can run the container and pass the +requested port =5314= through or use a custom port, if you wish. -You can also set the `CUSTOM_LEMMY_SERVERS` environment variable if you want to -add to the default suggested login servers. -This must be set with a comma separated list of suggested servers. -The first instance in the list will be the default view for logged-out users. +You can also set the =CUSTOM_LEMMY_SERVERS= environment variable if you +want to add to the default suggested login servers. This must be set +with a comma separated list of suggested servers. The first instance in +the list will be the default view for logged-out users. -I will be using a `docker-compose.yml` file to run this container, instead of a -`docker run` command. +I will be using a =docker-compose.yml= file to run this container, +instead of a =docker run= command. -```sh +#+begin_src sh nano docker-compose.yml -``` +#+end_src -```conf +#+begin_src conf version: "2" services: voyager: @@ -58,67 +61,69 @@ services: - "<custom_port>:5314" environment: - CUSTOM_LEMMY_SERVERS=lemmy.dbzer0.com,lemmy.world,lemmy.ml,beehaw.org -``` +#+end_src -```sh +#+begin_src sh sudo docker-compose up -d -``` - -The web app will now be available at the following address: -`<machine_ip>:<custom_port>`. -If you are running it on your local device, try `localhost:<custom_port>`. +#+end_src -### Reverse Proxy +The web app will now be available at the following address: +=<machine_ip>:<custom_port>=. If you are running it on your local +device, try =localhost:<custom_port>=. -If you want to visit this app via an external URL or domain name, you'll need to -set up a reverse proxy. -The example below uses Nginx as a reverse proxy. +*** Reverse Proxy +:PROPERTIES: +:CUSTOM_ID: reverse-proxy +:END: +If you want to visit this app via an external URL or domain name, you'll +need to set up a reverse proxy. The example below uses Nginx as a +reverse proxy. -Simply create the configuration file, paste the contents below, save the file, -symlink the file, and restart Nginx. +Simply create the configuration file, paste the contents below, save the +file, symlink the file, and restart Nginx. -```sh +#+begin_src sh sudo nano /etc/nginx/sites-available/voyager -``` +#+end_src -```conf +#+begin_src conf server { - if ($host ~ ^[^.]+\.example\.com$) { - return 301 https://$host$request_uri; - } - - listen [::]:80; - listen 80; - server_name voyager.example.com; - return 404; + if ($host ~ ^[^.]+\.example\.com$) { + return 301 https://$host$request_uri; + } + + listen [::]:80; + listen 80; + server_name voyager.example.com; + return 404; } server { - listen [::]:443 ssl http2; - listen 443 ssl http2; - server_name voyager.example.com; - access_log /var/log/nginx/voyager.access.log; - error_log /var/log/nginx/voyager.error.log; - - location / { - proxy_http_version 1.1; - proxy_pass http://localhost:5314; - proxy_set_header Host $host; - } - - ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; - ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; - include /etc/letsencrypt/options-ssl-nginx.conf; - ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; + listen [::]:443 ssl http2; + listen 443 ssl http2; + server_name voyager.example.com; + access_log /var/log/nginx/voyager.access.log; + error_log /var/log/nginx/voyager.error.log; + + location / { + proxy_http_version 1.1; + proxy_pass http://localhost:5314; + proxy_set_header Host $host; + } + + ssl_certificate /etc/letsencrypt/live/example.com/fullchain.pem; + ssl_certificate_key /etc/letsencrypt/live/example.com/privkey.pem; + include /etc/letsencrypt/options-ssl-nginx.conf; + ssl_dhparam /etc/letsencrypt/ssl-dhparams.pem; } -``` +#+end_src -```sh +#+begin_src sh sudo ln sudo ln -s /etc/nginx/sites-available/voyager /etc/nginx/sites-enabled/voyager sudo systemctl restart nginx.service -``` +#+end_src -The site will now be available at the `server_name` you specified above! +The site will now be available at the =server_name= you specified above! -You can visit my instance at [voyager.cleberg.net](https://voyager.cleberg.net) -for an example. +You can visit my instance at +[[https://voyager.cleberg.net][voyager.cleberg.net]] for an example. |