Nether portals
Portals of any shape
Nether portals can be any shape and size — the frame doesn’t have to be a rectangle. The inside of the portal must be at least 6 blocks (like 2×3) and at most 23×23. Besides obsidian, you can use crying obsidian in the frame.
Calculating portal coordinates
The /portal command calculates where to build a portal in the other dimension so it links to the portal near you.