# Using Incus Profiles for VLANs

**URL:** https://discussion.scottibyte.com/t/using-incus-profiles-for-vlans/680
**Category:** Uncategorized
**Created:** [September 9, 2025, 12:57am UTC](https://discussion.scottibyte.com/t/using-incus-profiles-for-vlans/680 "2025-09-09T00:57:36Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![scott](https://discussion.scottibyte.com/letter_avatar_proxy/v4/letter/s/3e96dc/32.png) [@scott](https://discussion.scottibyte.com/u/scott)
#### Post date: [September 9, 2025, 12:57am UTC](https://discussion.scottibyte.com/t/using-incus-profiles-for-vlans/680/1 "2025-09-09T00:57:36Z")

</div>

Your Incus server is normally hosted on your main LAN. This tutorial shows how to host containers on your incus server, but presented on different VLANs.

I started by creating a demonstration VLAN. A VLAN has an address range different from the address range used by your default network. A “managed” router is required to add and configure the services for VLANs. You can create VLANs on a unmanaged router, but management is messy. For example, my gateway offers a DHCP server on my VLAN address scopes.

Every managed router/gateway device does this differently. I use a Ubiquiti UDM Pro and so the screenshot below shows creating a VLAN 100 network with the address range of 192.168.100.0/24. The gateway address for this network is 192.168.100.1. The gateway address tells devices on that network how to reach other networks and the Internet.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/9/9801f1ad4e4834fc7f3df499c858bb3287e8a7d7.jpeg)

To list the profiles on your Incus server:

```auto
incus profile list

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/0/01dff3619653134f71da3280dbeff8ca6ca3f110.png)

In my [Incus Containers Step by Step](https://www.youtube.com/watch?v=ULPuU9aKyoU) tutorial we create both a software bridge named bridge0 on your server and we create a profile named “bridgeprofile” that offers containers with addresses on your main LAN address range.

As a reminder, we can examine the bridgeprofile which very simply bridges the eth0 interface inside of a container to your main LAN.

```auto
incus profile edit bridgeprofile

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/9/9ddaeda9a79d6636f8f7132001aaaf7afd806ede.jpeg)

In almost every tutorial I create an incus container using the bridgeprofile.

```auto
incus launch images:ubuntu/24.04 Test -p default -p bridgeprofile

```

Notice that this “Test” container also includes the “default” profile. The default profile normally bridges a container to the Internet NAT network, unless it is overridden with something like the bridgeprofile.

The default profile has an important secondary function to provide the root file system and in which storage pool the root file system is located which you can see below.

```auto
incus profile edit default

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/4/41b3ee6c1f6c7188a01664067ecaa1825c85a38b.jpeg)

We created the “Test” container above using the bridgeprofile and that means that the container will have an address on my main LAN which is 172.16.0.0/16.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/d/d6a9d1bd65f9815ea486738c526d20a110d232a3.png)

What if I want my Test container to have an address on our new VLAN100? I start by creating a profile.

```auto
incus profile create mycloud

```

Then I edit the new profile.

```auto
incus profile edit mycloud

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/e/e4bfecbad4b9a7e47e94f992f0d4289b118aa89a.jpeg)

Assuming you are positioned on line one of the file in the screenshot above, do a CTRL ^ to mark the start of the file and a CTRL End (the end key on the keyboard) and then press CTRL K to delete everything. In lieu of that, a whole mess of CTRL K’s suffices.

Now insert the following in the editor.

```auto
config: {}
description: My Public Cloud Services
devices:
  eth0:
    nictype: macvlan
    parent: bridge0
    type: nic
    vlan: "100"
name: mycloud 

```

Now press CTRL O and Enter to write the file out and a CTRL X to exit the nano editor and your new “mycloud” profile is completed.

I can examine which profiles that the “Test” container is using with the following command.

```auto
incus config show Test | grep profiles -A5

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/6/69d134685aec9b6a011ee34ed96e60abe48151bb.png)

Let’s remove the “bridgeprofile” from the “Test” container.

```auto
incus profile remove Test bridgeprofile

```

![image](https://discussion.scottibyte.com/uploads/default/original/2X/5/5fc53fcfc48a9b3b2e3dabe1e39b1a6349f30006.png)

Let’s add the “mycloud” profile to the container.

```auto
incus profile add Test mycloud

```

![image](https://discussion.scottibyte.com/uploads/default/original/2X/d/dee88159f74378e2667d81684861cd7efabbebe1.png)

We can now example the profiles on the container.

```auto
incus config show Test | grep profiles -A5

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/6/6df0fa29072910b79565081842671c0efe8dfd67.png)

If I list the container, it now has an address on the 100 VLAN.

```auto
incus list

```

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/6/62e8f5adfabb5359491bbe8e3e7131f5c4ed6321.png)

Listing your profiles gives you a good idea of how many containers are using each profile.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/a/a32ba48a9e87402c931285c407d36043c6592dcc.jpeg)

Should you want to delete a profile, you must either remove the profile from the containers using it or delete the containers using it.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/7/7bef3b2a2870741f5e37a42984cb685e10046bc8.png)

In the tutorial, I stopped and deleted the one and only container using the “mycloud” profile so I could then delete the profile.

 ![image](https://discussion.scottibyte.com/uploads/default/original/2X/a/aa2f5c979d0bea90a714ebf9373e48627ffabc77.jpeg)

Incus profiles can be used for a lot of use cases. VLANs are just one typical use.
