this post was submitted on 19 Oct 2023
2 points (100.0% liked)

Self-Hosted Main

515 readers
1 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

For Example

We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.

Useful Lists

founded 1 year ago
MODERATORS
 

Hi

Stock nginx built into Synology DSM won't cut it, so I decided to install Nginx Proxy Manager. Before doing so, I created a macvlan and assigned the NPM container to use the assigned IP. Once install is finished, and I try to launch NPM, it fails to load. I tried the same install without macvlan, and it works and loads just fine. I have installed many other containers on macvlan, so I know what I am doing and have the knowledge and experience, but I have never run into this before where there seems to be a conflict I am not aware of.

Help? Anyone?

you are viewing a single comment's thread
view the rest of the comments
[–] isleepbad@alien.top 1 points 1 year ago (13 children)

Sorry. I wrote it for my notes and wasn't necessarily polished for external use.

The basic gist of it is:

  1. Reserve your IP range

  2. Create the docker network (compatible with MACVLANs)

  3. Create the macvlan on your Synology

  4. Set up your container with the new network

[–] Illuminated_Humanoid@alien.top 1 points 1 year ago (3 children)

Here, let me show you what I did and you tell me where I went wrong.

  1. SSH into Synology NAS and Create macvlan network with modified command below to my system:sudo docker network create -d macvlan \-o parent=eth0 \--subnet=192.168.1.0/24 \--gateway=192.168.1.1 \npm_network

  2. Install Nginx Proxy Manager docker container

  3. Assign NPM to use the new macvlan network and assign it an IP on the subnet that's not already in use with the following command:docker network connect --ip 192.168.1.99 npm_network nginx_proxy_manager

  4. Go into portainer and under container settings for NPM, ensure the container is connected to both the new macvlan with the info we used and also connected to the default bridge network.

This is where I hit a wall. I still cannot connect to my web interface at this point when I feel like I should be able to with the macvlan ip 192.168.1.99

What am I doing wrong?

[–] isleepbad@alien.top 1 points 1 year ago (2 children)

So basically all you did was create a docker network with no macvlan on your synology. The docker network you created will simply look for a macvlan and communicate with it. There needs to be an actual macvlan there to communicate with. You really should read through my responses again.

Here are some pointers:

  • Your step 2 needs an auxiliary address for your host. --aux-address="host=192.168.2.201"

  • Look at my step 3. You have to run those commands to setup the macvlan on your synology. You have to use your auxiliary host address in the series of commands I showed you. When you run them properly you will see the host show up in your router.

[–] Illuminated_Humanoid@alien.top 1 points 1 year ago (1 children)

Okay, so here's where I'm confused. From my understanding you say all I did is create a docker network and I need to create a macvlan but the 'npm_network' that I created literally says macvlan beside it in the network tab of either container manager or portainer. Even the command literally says 'create macvlan' so I am confused why you say that's not a macvlan and only a docker network.
Am I making sense? Also, two other outdated guides ive seen on this describe it the same way. The way you describe it is a first that I've seen. Not saying you're wrong, but there's certainly a difference I'm noticing.

[–] isleepbad@alien.top 1 points 1 year ago

Those other guides assume you already have a macvlan and want to use docker on it. Like I said, not many complete guides out there. Mine is the most comprehensive you'll find.

The gist of it is, you create a macvlan network on your NAS then you place a docker network on that macvlan network.

load more comments (9 replies)