Hyper Docs
  • Introduction
  • What is Hyper
  • Why Hyper
  • Regions
  • Pricing
  • Quota and Limits
  • FAQ
  • Getting Started
    • Generate API Credential
    • Install CLI
    • Part 1 - Starting and inspecting your first container
    • Part 2 - Working with multiple containers
    • Part 3 - Hyper Compose
    • Migrate data
      • hyper container as client
      • hyper container as server
  • Features
    • Container
      • Container
      • Logs
      • Compose
      • Cron
      • Service
      • Func
    • Storage
      • Volume
      • Snapshot
    • Network
      • Network
      • Floating IP
      • Port
      • Security Group
    • Console
      • Filter
  • Reference
    • CLI
      • attach
      • commit
      • config
      • create
      • exec
      • images
      • info
      • inspect
      • kill
      • load
      • login
      • logout
      • logs
      • port
      • ps
      • pull
      • push
      • rename
      • restart
      • rm
      • rmi
      • run
      • search
      • start
      • stats
      • stop
      • version
      • update
      • wait
      • Volume
        • create
        • init
        • inspect
        • ls
        • rm
      • Snapshot
        • create
        • ls
        • rm
      • FIP
        • allocate
        • attach
        • detach
        • ls
        • release
        • name
      • Security Group
        • create
        • ls
        • inspect
        • rm
        • update
      • Compose
        • create
        • down
        • up
        • rm
        • ps
        • pull
        • run
        • kill
        • start
        • stop
        • scale
      • Service
        • create
        • ls
        • inspect
        • scale
        • rolling-update
        • attach-fip
        • detach-fip
        • rm
      • Cron
        • create
        • inspect
        • ls
        • history
        • rm
      • Func
        • create
        • update
        • inspect
        • ls
        • rm
        • logs
        • call
        • get
    • API
      • 2016-04-04 [Ver. 1.23]
        • Container
          • List Containers
          • Create a container
          • Get container logs
          • Start a container
          • Stop a container
          • Restart a container
          • Resize a container
          • Rename a container
          • Kill a container
          • Attach to a container
          • Remove a container
          • Update a container
          • Get container stats
          • Inspect a container
          • Exec Create
          • Commit a container
        • Event
          • Monitor events with WebSocket
        • Misc
          • Display system-wide information
          • Show the hyper version information
          • Exec Start
          • Exec Resize
          • Exec Inspect
        • Image
          • Inspect Images
          • Search Images
          • List Images
          • Load Images
          • Create an image
          • Remove an image
          • Push an image
        • Volume
          • List volumes
          • Create a volume
          • Remove a volume
          • Init a volume
          • Inspect a volume
        • Snapshot
          • Create a snapshot
          • List snapshots
          • Inspect a snapshot
          • Remove a snapshot
        • Network
          • Allocate floating IP
          • Attach a floating IP to a (running) container
          • Detach floating IP from a (running) container
          • List floating IP
          • Release floating IP
          • Name floating IP
        • Security Group
          • Create a security group
          • Remove a security group
          • Inspect a security group
          • Update a security group
          • List security groups
        • Service
          • service create
          • service list
          • service inspect
          • service update
          • service remove
        • Compose
          • Compose up
          • Compose create
          • Compose down
          • Compose rm
          • Compose start
          • Compose stop
          • Compose kill
        • Cron
          • Cron create
          • Cron list
          • Cron inspect
          • Cron remove
          • Cron history
        • Func
          • Func create
          • Func update
          • Func list
          • Func inspect
          • Func remove
          • Func call
          • Func get
          • Func logs
          • Func status
    • Compose File Reference
    • Security Group Reference
  • FAQ
    • Pricing
    • Quota and Limits
    • Privacy Policy
    • Terms of Service
    • Acceptable Use Policy
  • Docs version
Powered by GitBook
On this page
  • Deleting Floating IP
  • Stop and restart containers
  1. Features
  2. Network

Floating IP

A floating IP or also called FIP, is a public accessible IP address that can be attached to one container. A Floating IP can also be remapped to other containers in the same region, and can be used this way to switch between different deployments.

You need to allocate new free IPs before assigning them to containers:

$ hyper fip allocate 1
Please note that Floating IP (FIP) is billed monthly ($1). The billing begins when a new IP is allocated, ends when it is released. Partial month is treated as a entire month. Do you want to continue? [y/n]: y
52.68.129.19
$ hyper fip attach 52.68.129.19 myweb
myweb

To detach a floating IP from a container:

$ hyper fip detach web
52.68.129.19

If you want to move the floating ip from one container to another, you must first detach it from the old container and then attach it again like this:

$ hyper fip detach myweb && hyper fip attach 52.68.129.19 myweb2

Deleting Floating IP

When you rm a container, the floating IP will be automatically detached.

You can also release the ip if there is no container attached:

$ hyper fip release 52.68.129.19
52.68.129.19

NOTE: floating IP is priced at a monthly rate. When an IP is allocated, you will be charged for that current month.

Stop and restart containers

When a container is stopped or restarted, the floating IP (if any) is still attached with the container, which means that when you (re)start the container, you don't need to attach the floating IP again.

$ hyper stop myweb
myweb
$ hyper ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS                      NAMES               PUBLIC IP
3259d441edae        ghost               "/entrypoint.sh npm s"   16 minutes ago      Exited (0) 4 seconds ago                               myweb                  23.236.114.91
$ hyper start myweb
myweb
$ hyper ps -a
CONTAINER ID        IMAGE               COMMAND                  CREATED             STATUS                      PORTS                      NAMES               PUBLIC IP
3259d441edae        ghost               "/entrypoint.sh npm s"   17 minutes ago      Up 4 seconds                0.0.0.0:2368->2368/tcp     myweb                23.236.114.91
PreviousNetworkNextPort

Last updated 7 years ago